Xiang, Haihao [Wed, 5 Jan 2011 05:32:40 +0000 (13:32 +0800)]
i965: use BLT to clear buffer if possible on Sandybridge
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=32713
Eric Anholt [Wed, 5 Jan 2011 00:29:26 +0000 (16:29 -0800)]
i965: Add support for SRGB DXT1 formats.
This makes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc
match
fbo-generatemipmap-formats GL_EXT_texture_compression_s3tc
and swrast in bad DXT1_RGBA alpha=0 handling, but it means we won't
unpack and repack someone's textures into uncompressed SARGB8 format.
Vinson Lee [Wed, 5 Jan 2011 00:39:19 +0000 (16:39 -0800)]
glcpp: Add test for recursive #define.
Eric Anholt [Tue, 4 Jan 2011 23:25:35 +0000 (15:25 -0800)]
mesa: Fix the baseFormat for GL_COMPRESSED_SLUMINANCE_EXT.
It's just LUMINANCE, not LUMINANCE_ALPHA. Fixes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc assertion failure
when it tries to pack the L8 channels into LUMINANCE_ALPHA and wonders
why it's trying to do that.
Eric Anholt [Tue, 4 Jan 2011 21:44:34 +0000 (13:44 -0800)]
intel: Merge our choosetexformat fallbacks into core.
We now share the type/format -> MESA_FORMAT_* mappings with software
mesa, and the core supports most of the fallbacks hardware drivers
will want.
Eric Anholt [Fri, 24 Sep 2010 00:17:08 +0000 (17:17 -0700)]
mesa: Make _mesa_choose_tex_format() choose formats out of a supported table.
Right now this is just tweaking the current code to look at the table.
Choosing actually supported formats will come later.
Vinson Lee [Tue, 4 Jan 2011 21:18:19 +0000 (13:18 -0800)]
glcpp: Add division by zero test cases.
Marek Olšák [Wed, 22 Dec 2010 18:29:56 +0000 (19:29 +0100)]
mesa: preserve 10 bits of precision in the texstore general path for ARGB2101010
Use make_temp_float_image instead of _make_temp_chan_image.
The latter converts the texture to 8 bits/component, losing 2 bits.
Marek Olšák [Sat, 18 Dec 2010 09:31:33 +0000 (10:31 +0100)]
st/mesa: advertise GL_ARB_half_float_pixel
This extension doesn't appear to need any driver-specific parts.
Marek Olšák [Tue, 4 Jan 2011 20:54:23 +0000 (21:54 +0100)]
r300/compiler: disable the rename_regs pass for loops
This workaround fixes rendering of kwin thumbnails.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Alex Deucher [Tue, 4 Jan 2011 20:37:12 +0000 (15:37 -0500)]
r600g: support up to 64 shader constants
From the r600 ISA:
Each ALU clause can lock up to four sets of constants
into the constant cache. Each set (one cache line) is
16 128-bit constants. These are split into two groups.
Each group can be from a different constant buffer
(out of 16 buffers). Each group of two constants consists
of either [Line] and [Line+1] or [line + loop_ctr]
and [line + loop_ctr +1].
For supporting more than 64 constants, we need to
break the code into multiple ALU clauses based
on what sets of constants are needed in that clause.
Note: This is a candidate for the 7.10 branch.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tom Stellard [Tue, 4 Jan 2011 18:53:49 +0000 (10:53 -0800)]
r300/compiler: Fix black terrain in Civ4
rc_inst_can_use_presub() wasn't checking for too many RGB sources in
Alpha instructions or too many Alpha sources in RGB instructions.
Note: This is a candidate for the 7.10 branch.
Chad Versace [Thu, 16 Dec 2010 19:06:19 +0000 (11:06 -0800)]
glsl: Check that integer vertex outputs are qualified with flat
Perform this check in ast_declarator_list::hir().
From section 4.3.6 of the GLSL 1.30 spec:
"If a vertex output is a signed or unsigned integer or integer
vector, then it must be qualified with the interpolation
qualifier
flat."
Chad Versace [Thu, 16 Dec 2010 00:32:47 +0000 (16:32 -0800)]
glsl: Allow redeclaration of gl_Color and its variants in GLSL 1.30
Allow redeclaration of the following built-in variables with an
interpolation qualifier in language versions >= 1.30:
* gl_FrontColor
* gl_BackColor
* gl_FrontSecondaryColor
* gl_BackSecondaryColor
* gl_Color
* gl_SecondaryColor
See section 4.3.7 of the GLSL 1.30 spec.
Chad Versace [Wed, 15 Dec 2010 23:58:49 +0000 (15:58 -0800)]
glsl: Comment ast_type_qualifier.flags
Eric Anholt [Tue, 4 Jan 2011 18:00:51 +0000 (10:00 -0800)]
intel: When validating an FBO's combined depth/stencil, use the given FBO.
We were looking at the current draw buffer instead to see whether the
depth/stencil combination matched. So you'd get told your framebuffer
was complete, until you bound it and went to draw and we decided that
it was incomplete.
Eric Anholt [Tue, 4 Jan 2011 17:57:21 +0000 (09:57 -0800)]
intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.
The _ColorDrawBuffers is a piece of computed state that gets for the
current draw/read buffers at _mesa_update_state time. However, this
function actually gets used for non-current draw/read buffers when
checking if an FBO is complete from the driver's perspective. So,
instead of trying to just look at the attachment points that are
currently referenced by glDrawBuffers, look at all attachment points
to see if they're driver-supported formats. This appears to actually
be more in line with the intent of the spec, too.
Fixes a segfault in my upcoming fbo-clear-formats piglit test, and
hopefully bug #30278
Christoph Bumiller [Tue, 4 Jan 2011 17:20:05 +0000 (18:20 +0100)]
Merge remote branch 'origin/nvc0'
Brian Paul [Tue, 4 Jan 2011 15:28:16 +0000 (08:28 -0700)]
st/mesa: skip glDrawPixels/glBitmap-related code for ES build
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32560
Christoph Bumiller [Tue, 4 Jan 2011 15:16:52 +0000 (16:16 +0100)]
nvc0: fix index size method value for u8 indices
Christoph Bumiller [Tue, 4 Jan 2011 00:52:12 +0000 (01:52 +0100)]
nvc0: set the correct FP header bit for multiple colour outputs
Christoph Bumiller [Tue, 4 Jan 2011 00:14:00 +0000 (01:14 +0100)]
nvc0: delete memory caches and fence on screen destruction
Christoph Bumiller [Mon, 3 Jan 2011 00:21:02 +0000 (01:21 +0100)]
nvc0: use mov instead of ld for scalar const loads
Christoph Bumiller [Sun, 2 Jan 2011 21:39:50 +0000 (22:39 +0100)]
nvc0: fix resource unmap after vertex push
Christoph Bumiller [Sun, 2 Jan 2011 16:44:06 +0000 (17:44 +0100)]
nvc0: use the proper typed opcodes in constant folding
Christoph Bumiller [Sun, 2 Jan 2011 12:25:06 +0000 (13:25 +0100)]
nvc0: demagic GP invocation count bitfield
Christoph Bumiller [Tue, 4 Jan 2011 15:13:42 +0000 (16:13 +0100)]
nvc0: rewrite the 9097 GRAPH macros
Brian Paul [Tue, 4 Jan 2011 14:24:36 +0000 (07:24 -0700)]
i965g: include brw_types.h instead of GL/gl.h
Alternately, some search&replace could be used to replace all
occurances of GLint with int, etc. in the driver.
Brian Paul [Tue, 4 Jan 2011 14:13:40 +0000 (07:13 -0700)]
osmesa: pass context to _mesa_update_framebuffer_visual()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32814
Vinson Lee [Tue, 4 Jan 2011 09:08:47 +0000 (01:08 -0800)]
llvmpipe: Include p_compiler.h in lp_scene_queue.h.
Include p_compiler.h for boolean symbol.
Vinson Lee [Tue, 4 Jan 2011 09:01:18 +0000 (01:01 -0800)]
llvmpipe: Include p_compiler.h in lp_perf.h.
Include p_compiler.h for int64_t symbol.
Vinson Lee [Tue, 4 Jan 2011 08:54:14 +0000 (00:54 -0800)]
llvmpipe: Include missing headers in lp_bld_depth.h
Include p_compiler.h for boolean symbol.
Include p_state.h for pipe_stencil_state symbol.
Vinson Lee [Tue, 4 Jan 2011 08:50:48 +0000 (00:50 -0800)]
llvmpipe: Include p_compiler.h in lp_bld_alpha.h.
Include p_compiler.h for boolean symbol.
Add forward declaration for gallivm_state struct.
Vinson Lee [Tue, 4 Jan 2011 08:44:23 +0000 (00:44 -0800)]
i965g: Include p_compiler.h in intel_decode.h.
Include p_compiler.h for uint32_t symbol.
Vinson Lee [Tue, 4 Jan 2011 08:41:10 +0000 (00:41 -0800)]
i965g: Include gl.h in intel_structs.h.
Include gl.h for OpenGL symbols.
Zhenyu Wang [Tue, 4 Jan 2011 07:25:43 +0000 (15:25 +0800)]
i965: Use last vertex convention for quad provoking vertex on sandybridge
Until we know how hw converts quads to polygon in beginning of
3D pipeline, for now unconditionally use last vertex convention.
Fix glean/clipFlat case.
Vinson Lee [Tue, 4 Jan 2011 06:42:12 +0000 (22:42 -0800)]
mesa: Include mtypes.h in renderbuffer.h.
Include mtypes.h for gl_buffer_index symbol.
This is a follow-up to commit
65da73c5f87bc39c76ba9e45945da95fff354308.
Zhenyu Wang [Tue, 4 Jan 2011 05:57:16 +0000 (13:57 +0800)]
i965: Correct comment for gen6 fb write control message setting
Remove incorrect headless comment for gen6 fb write message.
Note current SIMD16 mode has already done right for control message.
Zhenyu Wang [Tue, 4 Jan 2011 05:46:13 +0000 (13:46 +0800)]
i965: Fix provoking vertex select in clip state for sandybridge
Triangle fan provoking vertex for first convention should be
'vertex 1' in sandybridge clip state.
Partly fix glean/clipFlat case
Brian Paul [Tue, 4 Jan 2011 00:14:21 +0000 (17:14 -0700)]
mesa: fix AL44 texture fetch function nybble -> float conversion
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32804
Eric Anholt [Mon, 3 Jan 2011 23:04:19 +0000 (15:04 -0800)]
intel: Bump libdrm configure.ac requirement for the gen6 BLT ring support.
Eric Anholt [Mon, 3 Jan 2011 03:29:20 +0000 (19:29 -0800)]
intel: Use tri clears when we don't know how to blit clear the format.
Bug #32207. Fixes ARB_texture_rg/fbo-clear-formats (see my
fbo-clear-formats piglit branch currently)
Eric Anholt [Mon, 3 Jan 2011 02:12:29 +0000 (18:12 -0800)]
mesa: Also report the number of renderbuffer alpha bits for GL_LUMINANCE_ALPHA.
Noticed by code inspection.
Eric Anholt [Mon, 3 Jan 2011 02:11:34 +0000 (18:11 -0800)]
mesa: Also report renderbuffer red/green size for GL_RED and GL_RG.
Noticed by code inspection.
Eric Anholt [Mon, 3 Jan 2011 01:58:07 +0000 (17:58 -0800)]
mesa: Use the common logic for "is this baseformat a color format?"
When figuring out whether a renderbuffer should be used to set the
visual bits of an FBO, we were missing important baseformats like
GL_RED, GL_RG, and GL_LUMINANCE.
Eric Anholt [Mon, 3 Jan 2011 02:01:39 +0000 (18:01 -0800)]
mesa: Allow color renderbuffers besides just RGB and RGBA.
We did so already for textures to do ARB_fbo's
GL_ALPHA/GL_LUMINANCE/etc. support and for ARB_texture_rg's GL_RED and
GL_RG, but this path was missed.
Eric Anholt [Mon, 3 Jan 2011 01:57:47 +0000 (17:57 -0800)]
mesa: Update comment about the list of BaseFormats for gl_formats.
Eric Anholt [Mon, 3 Jan 2011 01:04:57 +0000 (17:04 -0800)]
intel: Handle forced swrast clears before other clear bits.
Fixes a potential segfault on a non-native depthbuffer, and possible
accidental swrast fallback on extra color buffers.
Brian Paul [Mon, 3 Jan 2011 20:57:13 +0000 (13:57 -0700)]
st/mesa: fix renderbuffer pointer check in st_Clear()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=30694
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Brian Paul [Mon, 3 Jan 2011 20:52:12 +0000 (13:52 -0700)]
mesa: s/GLuint/gl_buffer_index/
Brian Paul [Mon, 3 Jan 2011 20:47:55 +0000 (13:47 -0700)]
st/mesa: 80-column wrapping
Brian Paul [Mon, 3 Jan 2011 20:42:05 +0000 (13:42 -0700)]
st/mesa: 80-column wrapping
Chia-I Wu [Mon, 3 Jan 2011 17:05:22 +0000 (01:05 +0800)]
autoconf: Fix --with-driver=xlib --enable-openvg.
st/egl should be enabled with --enable-openvg even the driver is xlib or
osmesa. Also, GLX_DIRECT_RENDERING should not be defined because libdrm
is not checked.
Chia-I Wu [Mon, 3 Jan 2011 16:53:19 +0000 (00:53 +0800)]
docs: Add an example for EGL_DRIVERS_PATH.
EGL_DRIVERS_PATH can be set to test EGL without installation.
Dave Airlie [Sun, 2 Jan 2011 20:02:43 +0000 (06:02 +1000)]
radeon: fix build on non-KMS systems.
Reported on irc by adamk.
Kenneth Graunke [Sat, 1 Jan 2011 20:29:24 +0000 (12:29 -0800)]
glsl: Really remove unused "instructions" parameter.
I forgot about this file, and it didn't show up until I tried to do
"make builtins" from a clean build.
Kenneth Graunke [Sat, 1 Jan 2011 20:01:09 +0000 (12:01 -0800)]
glsl: Remove unused "instructions" parameter.
I think was used long ago, when we actually read the builtins into the
shader's instruction stream directly, rather than creating a separate
shader and linking the two. It doesn't seem to serve any purpose now.
Brian Paul [Fri, 31 Dec 2010 23:37:41 +0000 (16:37 -0700)]
mapi: add missing newline in error message
Brian Paul [Fri, 31 Dec 2010 16:14:19 +0000 (09:14 -0700)]
egl: add missing case in _eglError()
Henri Verbeet [Wed, 22 Dec 2010 07:28:39 +0000 (08:28 +0100)]
st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().
Vinson Lee [Thu, 30 Dec 2010 09:54:35 +0000 (01:54 -0800)]
util: Add forward declarations in u_index_modify.h.
Vinson Lee [Thu, 30 Dec 2010 09:51:27 +0000 (01:51 -0800)]
tgsi: Clean up header file inclusion in tgsi_text.h.
Vinson Lee [Thu, 30 Dec 2010 09:49:26 +0000 (01:49 -0800)]
graw: Include p_shader_tokens.h for tgsi_token struct.
Vinson Lee [Thu, 30 Dec 2010 09:40:53 +0000 (01:40 -0800)]
tgsi: Clean up header file inclusion in tgsi_sanity.h.
Vinson Lee [Thu, 30 Dec 2010 09:26:47 +0000 (01:26 -0800)]
x86: Clean up header file inclusion in mmx.h.
Vinson Lee [Thu, 30 Dec 2010 09:05:33 +0000 (01:05 -0800)]
tnl: Clean up header file inclusion in t_vertex.h.
Vinson Lee [Thu, 30 Dec 2010 08:57:03 +0000 (00:57 -0800)]
vbo: Clean up header file inclusion in vbo.h.
Vinson Lee [Thu, 30 Dec 2010 08:50:56 +0000 (00:50 -0800)]
tnl: Clean up header file inclusion in t_vp_build.h.
Vinson Lee [Thu, 30 Dec 2010 08:46:13 +0000 (00:46 -0800)]
tnl: Clean up header file inclusion in tnl.h.
Ben Skeggs [Thu, 30 Dec 2010 02:34:12 +0000 (12:34 +1000)]
drm/nvc0: don't un-bind every subchannel on init
The initial values in the grctx are 0x0000 anyway, and re-binding them
all to 0x0000 destroys some init done by the nouveau drm.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Marek Olšák [Wed, 29 Dec 2010 03:52:55 +0000 (04:52 +0100)]
util: add a way to store translated indices to a user memory in u_index_modify
I am about to use the upload buffer in r300g instead.
Marek Olšák [Wed, 29 Dec 2010 03:04:32 +0000 (04:04 +0100)]
r300g: support user buffers as constant buffers
Eric Anholt [Wed, 29 Dec 2010 01:19:10 +0000 (17:19 -0800)]
i965: Do lowering of array indexing of a vector in the FS.
Fixes a regression in ember since switching to the native FS backend,
and the new piglit tests glsl-fs-vec4-indexing-{2,3} for catching this.
Eric Anholt [Tue, 28 Dec 2010 21:55:14 +0000 (13:55 -0800)]
i965: Fix regression in FS comparisons on original gen4 due to gen6 changes.
Fixes 26 piglit cases on my GM965.
Eric Anholt [Tue, 28 Dec 2010 05:08:59 +0000 (21:08 -0800)]
i965: Factor out the ir comparision to BRW_CONDITIONAL_* code.
Vinson Lee [Tue, 28 Dec 2010 07:20:35 +0000 (23:20 -0800)]
glcpp: Add negative tests for redefintions with valueless macros.
Dave Airlie [Tue, 28 Dec 2010 06:52:19 +0000 (16:52 +1000)]
tgsi_dump: fix assert due to missing property name.
Marek Olšák [Tue, 28 Dec 2010 03:52:36 +0000 (04:52 +0100)]
r300g: rename aos to vertex arrays
Marek Olšák [Mon, 27 Dec 2010 15:15:24 +0000 (16:15 +0100)]
r300g: mark vertex arrays as dirty after a buffer_offset change
We shouldn't hit this bug in theory.
NOTE: This is a candidate for the 7.10 branch.
Zhenyu Wang [Tue, 28 Dec 2010 03:03:45 +0000 (11:03 +0800)]
i965: Fix occlusion query on sandybridge
Clear target query buffer fixed occlusion query on sandybridge.
https://bugs.freedesktop.org/show_bug.cgi?id=32167
Zhenyu Wang [Tue, 28 Dec 2010 01:21:20 +0000 (09:21 +0800)]
Revert "i965: upload multisample state for fragment program change"
This reverts commit
de6fd527a545f8344e074312544517d05573fb72.
Revert this workaround as it seems the real trouble is caused by
lineloop, which doesn't require GS convert on sandybridge actually.
Kenneth Graunke [Mon, 27 Dec 2010 23:44:52 +0000 (15:44 -0800)]
i965: Internally enable GL_NV_blend_square on ES2.
Hopefully should fix bug #32520.
Christoph Bumiller [Mon, 27 Dec 2010 19:57:54 +0000 (20:57 +0100)]
nvc0: reference the vertex buffers
Christoph Bumiller [Mon, 27 Dec 2010 19:59:53 +0000 (20:59 +0100)]
nvc0: reenable some shader optimizations
CSE and constants folding.
Christoph Bumiller [Mon, 27 Dec 2010 12:59:43 +0000 (13:59 +0100)]
nvc0: use VTX_ATTR for stride 0 vertex attributes
Christoph Bumiller [Mon, 27 Dec 2010 12:57:46 +0000 (13:57 +0100)]
nvc0: implement VRAM buffer transfers with bounce buffers
Christoph Bumiller [Thu, 23 Dec 2010 20:52:48 +0000 (21:52 +0100)]
nvc0: init miptree transfer layer stride
Xiang, Haihao [Mon, 27 Dec 2010 08:39:08 +0000 (16:39 +0800)]
i965: don't spawn GS thread for LINELOOP on Sandybridge
LINELOOP is converted to LINESTRIP at the beginning of the 3D pipeline.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=32596
Kenneth Graunke [Mon, 27 Dec 2010 08:40:26 +0000 (00:40 -0800)]
i965: Flatten if-statements beyond depth 16 on pre-gen6.
Gen4 and Gen5 hardware can have a maximum supported nesting depth of 16.
Previously, shaders with control flow nested 17 levels deep would
cause a driver assertion or segmentation fault.
Gen6 (Sandybridge) hardware no longer has this restriction.
Fixes fd.o bug #31967.
Kenneth Graunke [Mon, 27 Dec 2010 08:22:38 +0000 (00:22 -0800)]
glsl: Support if-flattening beyond a given maximum nesting depth.
This adds a new optional max_depth parameter (defaulting to 0) to
lower_if_to_cond_assign, and makes the pass only flatten if-statements
nested deeper than that.
By default, all if-statements will be flattened, just like before.
This patch also renames do_if_to_cond_assign to lower_if_to_cond_assign,
to match the new naming conventions.
Christoph Bumiller [Thu, 23 Dec 2010 13:36:20 +0000 (14:36 +0100)]
nvc0: respond please inline to PIPE_SHADER_CAP_SUBROUTINES
Christoph Bumiller [Thu, 23 Dec 2010 14:21:36 +0000 (15:21 +0100)]
nvc0: fix layer stride state
Christoph Bumiller [Wed, 22 Dec 2010 22:36:31 +0000 (23:36 +0100)]
nvc0: use most defs/decls from nouveau_pushbuf.h
Ben Skeggs [Mon, 20 Dec 2010 20:41:09 +0000 (06:41 +1000)]
nvc0: remove unused 'buf' parameter in pipe_buffer_unmap
Ben Skeggs [Mon, 20 Dec 2010 20:33:17 +0000 (06:33 +1000)]
nvc0: BEGIN_RING->BEGIN_RING_NI in a couple of places
Ben Skeggs [Mon, 20 Dec 2010 20:32:13 +0000 (06:32 +1000)]
nvc0: fence.bo is mappable, mark it as such
Ben Skeggs [Mon, 20 Dec 2010 20:30:39 +0000 (06:30 +1000)]
Merge remote branch 'origin/master' into nvc0-new
Conflicts:
src/gallium/drivers/nouveau/nouveau_winsys.h
Ben Skeggs [Mon, 20 Dec 2010 03:39:36 +0000 (13:39 +1000)]
nouveau: fix includes for latest libdrm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Tom Fogal [Tue, 21 Dec 2010 02:24:29 +0000 (19:24 -0700)]
Regenerate gl_mangle.h.
NOTE: This is a candidate for the 7.10 branch.
Jerome Glisse [Mon, 20 Dec 2010 20:30:42 +0000 (15:30 -0500)]
r600g: properly unset vertex buffer
Fix bug http://bugs.freedesktop.org/show_bug.cgi?id=32455
Signed-off-by: Jerome Glisse <jglisse@redhat.com>