Commit graph

48156 commits

Author SHA1 Message Date
Brian Paul
9bd15aef86 svga: implement texture swizzling
This exposes the GL_EXT_texture_swizzle extension and allows the various
depth texture modes to be implemented properly.  This, plus a follow-on
texture/shadow change fixes quite a few piglit GLSL shadow sampler test
failures.
2011-09-23 07:58:48 -06:00
Brian Paul
49a6f5e68e svga: check that we don't exceed input/ouput register limits 2011-09-23 07:58:47 -06:00
Brian Paul
2f40e4aac7 svga: implement point sprite suppport
Emit the SVGA3D_RS_POINTSPRITEENABLE render state.
When sprite_coord_mode=PIPE_SPRITE_COORD_LOWER_LEFT emit extra frag
shader code to invert the Y coordinate of the incoming texcoord.
2011-09-23 07:58:47 -06:00
Brian Paul
9a41ecaddd svga: add translation for float formats 2011-09-23 07:58:47 -06:00
Brian Paul
73e840ab7d svga: check to avoid writing beyond end of constant buffer
See bug 688394
2011-09-23 07:58:47 -06:00
José Fonseca
974b6413f4 svga: Cleanup format capability checking.
Accurately describe what operations are supported when a format caps
entry is not advertised by the host, and which formats are never
supported, instead of making ad-hoc and often incorrect assumptions.
2011-09-23 07:58:47 -06:00
José Fonseca
ffeed5da6e svga: Don't use the new depth formats for surfaces that will never be sampled from.
Mitigates issues with hosts where support for these new depth formats is
flaky.
2011-09-23 07:58:46 -06:00
Jakob Bornecrantz
8bf3fb4eca svga: Share one texcoord between depth and fog 2011-09-23 07:58:46 -06:00
Jakob Bornecrantz
4f17830b3d svga: Only emit Z depth work if it is actually read 2011-09-23 07:58:46 -06:00
Jakob Bornecrantz
3b32e51cb1 svga: Fix vPos usage 2011-09-23 07:58:45 -06:00
Jakob Bornecrantz
166e9421c8 svga: Wip for passing depth in a texcoord
TODO: Can we pass this as the same texcoord as fog?
2011-09-23 07:58:45 -06:00
José Fonseca
6759ad53e2 svga: Add a comment about depth format selection. 2011-09-23 07:58:45 -06:00
José Fonseca
846a21d352 svga: Consider the new depth formats in svga_texture_from_handle(). 2011-09-23 07:58:45 -06:00
José Fonseca
f74c04c22c svgadump: Dump the new depth format names. 2011-09-23 07:58:45 -06:00
Jakob Bornecrantz
4e0ae3e34f svga: Expose the new depth formats 2011-09-23 07:58:45 -06:00
José Fonseca
fd69fc8744 svga: Coalesce multiple shader constants in a single command.
HWv8 feature.

Tested with GoogleEarth, Mesa demos.
2011-09-23 07:58:44 -06:00
José Fonseca
157309348e svgadump: Update for svga3d_reg.h header changes. 2011-09-23 07:58:44 -06:00
Brian Paul
2b74fb139c svga: updated svga3d_reg.h to latest public version 2011-09-23 07:58:44 -06:00
Alex Corscadden
2883e3c0b5 Allow RBUG to start blocked
It is sometimes useful to examine the first frame or and early frame of a
quickly executing and non-repeating application, this chain introduces a new
environment variable that is checked when creating contexts.  If
GALLIUM_RBUG_START_BLOCKED is set, then each context that is created is started
in a blocked state.  This allows time to connect rbug before anything is
rendered in the context.
2011-09-23 07:58:44 -06:00
Brian Paul
ddfdea88d8 draw/llvm: add additional null pointer checkin draw_pt_fetch_pipeline_or_emit_llvm() 2011-09-23 07:58:44 -06:00
Yuanhan Liu
1a662e7c18 intel: fix the wrong code to detect null texture.
There is already comments show how to detect a null texture. Fix the
code to match the comments.

This would fix the oglc divzero(basic.texQOrWEqualsZero) and
divzero(basic.texTrivialPrim) test case fail.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-23 13:34:26 +08:00
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
Marek Olšák
661b853f11 docs: update relnotes-7.12 with r600g changes 2011-09-23 03:03:45 +02: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