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. --- src/mesa/main/mtypes.h | 5 ++++- src/mesa/main/shaderapi.c | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index f2f0280..33075bd 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2319,7 +2319,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 38caa58..9f8cd70 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1850,6 +1850,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; } -- 1.8.3.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev