diff options
author | Paul Berry <[email protected]> | 2012-01-04 13:57:52 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-01-11 07:57:56 -0800 |
commit | 642e5b413e0890b2070ba78fde42db381eaf02e5 (patch) | |
tree | e17e0e11a9addc41172a3863e92198500abfe690 /src/mesa | |
parent | be4e9f7a0ccb7aa0edef5e5b589bdbbfd4eab3cb (diff) |
mesa: Fix transform feedback of unsubscripted gl_ClipDistance array.
On drivers that set gl_shader_compiler_options::LowerClipDistance (for
example i965), we need to handle transform feedback of gl_ClipDistance
specially, to account for the fact that the hardware represents it as
an array of vec4's rather than an array of floats.
The previous way this was accounted for (translating the request for
gl_ClipDistance[n] to a request for a component of
gl_ClipDistanceMESA[n/4]) doesn't work when performing transform
feedback on the whole unsubscripted array, because we need to keep
track of the size of the gl_ClipDistance array prior to the lowering
pass. So I replaced it with a boolean is_clip_distance_mesa, which
switches on the special logic that is needed to handle the lowered
version of gl_ClipDistance.
Fixes Piglit tests "EXT_transform_feedback/builtin-varyings
gl_ClipDistance[{1,2,3,5,6,7}]-no-subscript".
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 64d8c8d3f71..bb46ba0c035 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2277,6 +2277,8 @@ struct gl_shader_program /** Vertex shader state - copied into gl_vertex_program at link time */ struct { GLboolean UsesClipDistance; /**< True if gl_ClipDistance is written to. */ + GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or + 0 if not present. */ } Vert; /* post-link info: */ |