summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-10-23 10:59:57 -0700
committerPaul Berry <[email protected]>2013-10-24 22:00:13 -0700
commit11634e491bf6d7d930f00c5b4f62fd4e8cb4314d (patch)
treecb142dcb12b6b31ab88e545f40686650e6374286 /src/mesa/main/shaderapi.c
parent44b7ebe52d6f4b220a1c943bac2e571bb593f7e1 (diff)
glsl: Move UsesClipDistance from gl_{vertex,geometry}_program into gl_program.
This will make it easier for back-ends to share code between geometry shader and vertex shader compilation. Also, it is renamed to "UsesClipDistanceOut" to clarify that (a) in geometry shaders, it refers to the gl_ClipDistance output rather than the gl_ClipDistance input, and (b) it is irrelevant in fragment shaders. 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.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index d3677c8516b..53f0cab7c55 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1855,10 +1855,8 @@ _mesa_copy_linked_program_data(gl_shader_type type,
struct gl_program *dst)
{
switch (type) {
- case MESA_SHADER_VERTEX: {
- struct gl_vertex_program *dst_vp = (struct gl_vertex_program *) dst;
- dst_vp->UsesClipDistance = src->Vert.UsesClipDistance;
- }
+ case MESA_SHADER_VERTEX:
+ dst->UsesClipDistanceOut = src->Vert.UsesClipDistance;
break;
case MESA_SHADER_GEOMETRY: {
struct gl_geometry_program *dst_gp = (struct gl_geometry_program *) dst;
@@ -1866,7 +1864,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;
+ dst->UsesClipDistanceOut = src->Geom.UsesClipDistance;
dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive;
}
break;