summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorMarcin Slusarz <[email protected]>2012-06-16 20:30:14 +0200
committerMarcin Slusarz <[email protected]>2012-06-20 21:16:20 +0200
commit7e63b613a5a067462c450338e0bdce5b5976f6f1 (patch)
tree8d98c6204c058e6b9ac46249672c98c34831227d /src/mesa/state_tracker/st_extensions.c
parentf2f05e50b1e88b431cb98348bf67e6d5a35d8cf1 (diff)
st/mesa: fix transform feedback of unsubscripted gl_ClipDistance array
gl_ClipDistance needs special treatment in form of lowering pass which transforms gl_ClipDistance representation from float[] to vec4[]. There are 2 implementations - at glsl linker level (enabled by LowerClipDistance option) and at glsl_to_tgsi level (enabled unconditionally for gallium drivers). Second implementation is incomplete - it does not take into account transform feedback (see commit 642e5b413e0890b2070ba78fde42db381eaf02e5 "mesa: Fix transform feedback of unsubscripted gl_ClipDistance array" for details). There are 2 possible fixes: - adding transform feedback support into glsl_to_tgsi version - ripping gl_ClipDistance support from glsl_to_tgsi and enabling gl_ClipDistance lowering on glsl linker side This patch implements 2nd option. All it does is: - reverts most of the commit 59be691638200797583bce39a83f641d30d97492 "st/mesa: add support for gl_ClipDistance" - changes LowerClipDistance to true Fixes Piglit tests "EXT_transform_feedback/builtin-varyings gl_ClipDistance[{2,3,4,5,6,7,8}]-no-subscript" at least on nv50 and evergreen cards.
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 17f271f02c1..dacad9bfb91 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -222,6 +222,7 @@ void st_init_limits(struct st_context *st)
options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
else
options->MaxUnrollIterations = 255; /* SM3 limit */
+ options->LowerClipDistance = true;
}
/* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum number