Commit graph

41116 commits

Author SHA1 Message Date
Yuanhan Liu
cd6b8421ca i965: fix the constant interp bitmask for flat mode
Fix the constant interpolation enable bit mask for flat light mode.
FRAG_BIT_COL0 attribute bit might be 0, in which case we need to
shift one more bit right.

This would fix the oglc specularColor test fail on both Sandybridge and
Ivybridge.

v2: move the constant interp bitmask setup code into for(; attr <
FRAG_ATTRIB_MAX; attr++) loop suggested by Eric.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2011-09-23 10:49:42 +08:00
Stéphane Marchesin
e3c94fac4e i915g: Don't generate useless swizzles before texture accesses.
That helps reduce the number of texture indirections, which are very limited on i915.
2011-09-22 19:26:33 -07:00
Stéphane Marchesin
79a0499369 i915g: Fix whitespace. 2011-09-22 19:26:32 -07:00
Brian Paul
7276ab2c36 st/mesa: remove unnecessary st_texture_match_image() parameters
We didn't use the face parameter and the level parameter can be found
in the gl_texture_image.
2011-09-22 16:43:45 -06:00
Stéphane Marchesin
687e62a5d7 i915g: Fix peephole optimization for MOVs. 2011-09-22 12:43:24 -07:00
Stéphane Marchesin
7cba40306e i915g: Add unsupported PIPE_CAP_MIN_TEXEL_OFFSET/PIPE_CAP_MAX_TEXEL_OFFSET. 2011-09-22 12:01:19 -07:00
Eric Anholt
86939e05d2 intel: Unindent the blit call in PBO blit uploads.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-22 11:03:26 -07:00
Eric Anholt
275ce9631b intel: Drop gratuitous flush in PBO blit upload.
Since the blit gets sequenced after other batchbuffer rendering like
normal, there's no need to push things out early.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 11:03:24 -07:00
Eric Anholt
3bb536e4c7 intel: Clean up check_pbo_format to ignore internalFormat.
All that matters here is the format of the texture, not the
internalformat (which might mean various different pixel formats).  In
one case, the pbo upload for MESA_FORMAT_YCBCR would have swapped the
channels for MESA_FORMAT_YCBCR_REV.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 11:03:22 -07:00
Eric Anholt
0ba2390947 intel: Move more of the PBO blit upload logic into that function.
This also improves the debugging output in the failure paths so you
get more than just "failed", and don't get spammed with "failed" when
you didn't even have a PBO to try.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 11:03:20 -07:00
Eric Anholt
d58a3182b1 intel: Remove stale comment about non-intel gl_buffer_objects.
This hasn't been true since dd26899ca3
in 2009.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 11:03:17 -07:00
Eric Anholt
bc0335fc0e intel: Remove the pbo zero-copy code.
There were notes about the possibility of slowdowns due to zcopy from
a PBO due to thrashing around of the region.  Slowdowns are even more
likely now that textures are generally tiled, which a zcopy wouldn't
get.  Additionally, there were no checks on the buffer size to ensure
that the hardware-required rounding was present, which could result in
GPU hangs on large zcopy PBOs.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 11:03:13 -07:00
Eric Anholt
57024e084a intel: Remove extra FreeTextureImageBuffer() from glTexImage*.
The core code does this before calling in to us.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 11:03:10 -07:00
Eric Anholt
03e623a27b i965: Add support for GL_EXT_packed_float.
This doesn't cover support for this format as a renderbuffer yet.  The
spec allows implementations to not support it, though it is something
we do want to support.

Only one failure in piglit on gen6, which is texwrap with bordercolor
(as usual).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-22 10:58:34 -07:00
Eric Anholt
2fd8c4e3ed i965: Add support for GL_EXT_texture_shared_exponent.
Only one failure in piglit on gen6, which is texwrap with bordercolor
(as usual).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-22 10:58:34 -07:00
Brian Paul
9e9a76eea1 mesa: remove support for GL_APPLE_client_storage extension
AFAIK, there are few users of this extension and I can see a couple
reasons why this is probably broken in Mesa anyway.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 10:45:09 -06:00
Brian Paul
980f6f1b37 mesa: move gl_texture_image::Width/Height/DepthScale fields to swrast
These fields were only used for swrast so move them into
swrast_texture_image.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 10:44:57 -06:00
Brian Paul
eaf376ba35 mesa: move gl_texture_image::_IsPowerOfTwo into swrast
It's only used by swrast.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-09-22 10:44:36 -06:00
Michel Dänzer
de414f4915 st/mesa: Finalize texture on render-to-texture.
This makes sure that stObj->pt exists and is up to date.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39193 and piglit
fbo-incomplete-texture-03.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>

NOTE: This is a candidate for the 7.11 branch.
2011-09-22 17:01:18 +02:00
Brian Paul
4beb8f9e9d st/mesa: Convert size assertions to conditionals in st_texture_image_copy.
Prevents potential assertion failures in piglit fbo-incomplete-texture-03 test.

NOTE: This is a candidate for the 7.11 branch.
2011-09-22 17:01:18 +02:00
Christoph Bumiller
0cf1a55568 d3d1x: setup draw info primitive restart parameters 2011-09-22 16:53:54 +02:00
Brian Paul
4465efc3bf draw: add support for guard-band clipping 2011-09-22 08:26:40 -06:00
José Fonseca
a5c0fb51c6 draw: Reduce the number of vertex shader variants per context to 128. 2011-09-22 08:26:40 -06:00
Kurt Daverman
3c56280d33 draw: Respect max_indices from the renderer. 2011-09-22 08:26:40 -06:00
Brian Paul
37ef7c22ab translate: check for PIPE_SUBSYSTEM_EMBEDDED 2011-09-22 08:26:36 -06:00
Jakob Bornecrantz
c8c2fc9a7a tgsi: Check in scan for fs position and depth reads 2011-09-22 08:26:36 -06:00
Brian Paul
379353e16b svga: skip assertion when index_bias < 0
See bug 688383
2011-09-22 08:26:36 -06:00
Brian Paul
1a35fde7c8 svga: fix the test for sRGB texture formats
The pipe_sampler_view::format field should be prefered over the resource/
texture format.  The former is used to override the texture format for
sRGB decode enable/disable, etc.

Also, use new util_format_is_srgb() helper to catch all sRGB formats.

This fixes the piglit tex-srgb test for GL_EXT_texture_sRGB_decode.
2011-09-22 08:26:36 -06:00
Brian Paul
ff6cf60cb8 gallium/util: add util_format_is_srgb() helper 2011-09-22 08:26:36 -06:00
Keith Whitwell
553930424d util: add u_bit_scan helper 2011-09-22 08:26:36 -06:00
José Fonseca
ffb1996f61 util: Allow to make the depth/stencil format queries without repeatedly looking up the format description.
All functions here should take struct util_format_description * IMO, to
incentive efficient code.
2011-09-22 08:26:36 -06:00
Keith Whitwell
c40c1599bb util: single call to util_format_description in fill_rect 2011-09-22 08:26:35 -06:00
José Fonseca
f2a2ba9c6c util: Handle conversion between depth stencil formats. 2011-09-22 08:26:35 -06:00
Stéphane Marchesin
51f641291d i915g: Add an optimization to get rid of useless movs, in particular at the end of some shaders. 2011-09-21 18:01:43 -07:00
Stéphane Marchesin
fc1fbb2dc1 i915g: Fix some whitespace problems. 2011-09-21 18:01:41 -07:00
Stéphane Marchesin
bfe507bcff i915g: Blend equation separate seems to work. 2011-09-21 18:01:41 -07:00
Stéphane Marchesin
ef1fa4467f i915g: Add ifdef'd out code to dump compiled shaders. 2011-09-21 18:01:40 -07:00
Stéphane Marchesin
9a15b1eb95 i915g: Fix bug in shader optimizer. 2011-09-21 18:01:39 -07:00
Stéphane Marchesin
ca8492c284 i915g: Remove stale function prototype. 2011-09-21 18:01:38 -07:00
Brian Paul
559a0cd1fc svga: call u_default_redefine_user_buffer() to fix failed assertion
This fixes a regression from a8cf4b6acf

The problem occured when two successive glDrawArrays calls accessed
subsequent elements in user-space arrays.  The user-space array
from the first call wasn't being grown to accomodate the second
draw call's elements.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-09-21 16:32:00 -06:00
Eric Anholt
a140c3e783 meta: Don't hang on to program refcounts after metaops are done.
Fixes piglit ARB_shader_objects/clear-with-deleted.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39577
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-09-21 10:17:54 -07:00
Eric Anholt
d4444b8e5b i965/vs: Return a dummy value when visiting ir_texture.
While the program won't successfully link in the end, this avoids
possible assertion failure in the driver during linking if
this->result isn't initialized with something already.
2011-09-21 09:46:39 -07:00
Eric Anholt
d158f6e73b i965/gen6+: When only BFC is written, use BFC as the color.
Fixes piglit vertex-program-two-side enabled back back2
2011-09-21 09:46:39 -07:00
Eric Anholt
447c488d77 i965/gen6+: Respect the VERTEX_PROGRAM_TWO_SIDE flag for shaders.
Fixes piglit:
vertex-program-two-side enabled front back front2 back2
vertex-program-two-side enabled front back
vertex-program-two-side enabled front2 back2
2011-09-21 09:46:39 -07:00
Eric Anholt
b68e3422ed mesa: Add a context flag indicating whether two-sided lighting should happen.
The 965 driver was ignoring the VERTEX_PROGRAM_TWO_SIDE flag and only
looking at fixed-function state.
2011-09-21 09:46:38 -07:00
Brian Paul
169f57255a util: remove stray debug code 2011-09-21 08:26:29 -06:00
Brian Paul
0e6646db32 mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()
We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was
done in Yuanhan Liu's original patch.

Take geometry shaders support into account too.

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2011-09-21 08:22:07 -06:00
Brian Paul
51002968c9 gallivm: fix build with llvm 3.0svn
https://bugs.freedesktop.org/show_bug.cgi?id=41065
2011-09-21 07:24:03 -06:00
Brian Paul
4ef82cee6d tnl: include swrast/s_chan.h to fix sse build 2011-09-21 06:49:33 -06:00
Chia-I Wu
4a96a02de7 st/vega: fix drawing images with alpha channel
Checking if the paints are opaque in renderer_validate_blend() does not
work.  We could be drawing images.  Remove the check from
renderer_validate_blend() and take image drawing into consideration in
blend_use_shader().

The bug was introduced by 3f0a966807,
which affects the lookup demo.
2011-09-21 12:01:21 +08:00