summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-03-23 10:51:53 -0700
committerPaul Berry <[email protected]>2013-08-01 20:22:07 -0700
commitfc5fa56c86df066514e1ca4eff16c1f179884188 (patch)
treea6e56165db17d48f4f3491a34c3750474caa36fb /src/mesa
parent13022c9c5f3cb67c76ed76eae9cd8a49355874a5 (diff)
mesa: Copy linked program data for GS.
The documentation for gl_shader_program.Geom and gl_geometry_program says that the former is copied to the latter at link time, but this wasn't happening. This patch causes _mesa_ir_link_shader() to perform the copy, and updates comment accordingly. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h5
-rw-r--r--src/mesa/main/shaderapi.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c166645aa0f..83de3dda893 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2320,7 +2320,10 @@ struct gl_shader_program
/** Post-link gl_FragDepth layout for ARB_conservative_depth. */
enum gl_frag_depth_layout FragDepthLayout;
- /** Geometry shader state - copied into gl_geometry_program at link time */
+ /**
+ * Geometry shader state - copied into gl_geometry_program by
+ * _mesa_copy_linked_program_data().
+ */
struct {
GLint VerticesIn;
GLint VerticesOut;
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 8a0909be13f..858cec57f7c 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1859,6 +1859,14 @@ _mesa_copy_linked_program_data(gl_shader_type type,
dst_vp->UsesClipDistance = src->Vert.UsesClipDistance;
}
break;
+ case MESA_SHADER_GEOMETRY: {
+ struct gl_geometry_program *dst_gp = (struct gl_geometry_program *) dst;
+ dst_gp->VerticesIn = src->Geom.VerticesIn;
+ dst_gp->VerticesOut = src->Geom.VerticesOut;
+ dst_gp->InputType = src->Geom.InputType;
+ dst_gp->OutputType = src->Geom.OutputType;
+ }
+ break;
default:
break;
}