diff options
author | Paul Berry <[email protected]> | 2013-10-23 12:55:24 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-10-24 21:59:39 -0700 |
commit | 44b7ebe52d6f4b220a1c943bac2e571bb593f7e1 (patch) | |
tree | c8bc49ddc35435b1afdb9fdc23fec82b4fcf17bf /src/glsl/link_varyings.cpp | |
parent | fe36154ff3b2c095cf21462dd7ed6b5ae374fccc (diff) |
glsl/gs: Fix transform feedback of gl_ClipDistance.
Since gl_ClipDistance is lowered from an array of floats to an array
of vec4's during compilation, transform feedback has special logic to
keep track of the pre-lowered array size so that attempting to perform
transform feedback on gl_ClipDistance produces a result with the
correct size.
Previously, this special logic always consulted the vertex shader's
size for gl_ClipDistance. This patch fixes it so that it uses the
geometry shader's size for gl_ClipDistance when a geometry shader is
in use.
Fixes piglit test spec/glsl-1.50/transform-feedback-type-and-size.
v2: Change the type of LastClipDistanceArraySize to "unsigned", and
clarify the comment above it.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r-- | src/glsl/link_varyings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp index 4ba6d8a2057..c503645fda1 100644 --- a/src/glsl/link_varyings.cpp +++ b/src/glsl/link_varyings.cpp @@ -328,7 +328,7 @@ tfeedback_decl::assign_location(struct gl_context *ctx, const unsigned vector_elements = this->matched_candidate->type->fields.array->vector_elements; unsigned actual_array_size = this->is_clip_distance_mesa ? - prog->Vert.ClipDistanceArraySize : + prog->LastClipDistanceArraySize : this->matched_candidate->type->array_size(); if (this->is_subscripted) { |