diff options
author | Paul Berry <[email protected]> | 2013-06-11 14:11:05 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-08-23 11:02:15 -0700 |
commit | 44e07de3acb34152f68308f38c80c9885d8b2fcf (patch) | |
tree | 45f671671d3fb75649ad90fe4bbeb78659e92970 /src/mesa/main/shaderapi.c | |
parent | f0072e3c6b0bd46d8ebf7ac0a2cf1bf63dc370e8 (diff) |
glsl: Refactor handling of gl_ClipDistance/gl_ClipVertex linkage rules for GS.
This patch extracts the following logic from
validate_vertex_shader_executable():
(a) Generate an error if the shader writes to both gl_ClipDistance and
gl_ClipVertex.
(b) Record whether the shader writes to gl_ClipDistance in
gl_shader_program for use by the back-end.
(c) Record the size of gl_ClipDistance in gl_shader_program for use by
transform feedback logic.
And moves it into a function that is shared between vertex and
geometry shaders.
Strictly speaking we only need to have shared logic for (b) and (c)
right now (since (a) only matters in compatibility contexts, and we're
only implementing geometry shaders in core contexts right now). But
the three are closely related enough that it seems sensible to keep
them together.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r-- | src/mesa/main/shaderapi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index d184b114cb9..4fe9d9ca252 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1871,6 +1871,7 @@ _mesa_copy_linked_program_data(gl_shader_type type, dst_gp->VerticesOut = src->Geom.VerticesOut; dst_gp->InputType = src->Geom.InputType; dst_gp->OutputType = src->Geom.OutputType; + dst_gp->UsesClipDistance = src->Geom.UsesClipDistance; } break; default: |