From ae8164a67b05cdc6d9b520b9704330537f3a6024 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Jul 2010 15:34:58 -0600 Subject: mesa: add geometry shader fields to gl_shader_program These 3 fields are per shader-program. Copy them into the geometry program at link time for convenient access later. Also, add some missing glGetProgramiv() queries. --- src/mesa/slang/slang_link.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa/slang') diff --git a/src/mesa/slang/slang_link.c b/src/mesa/slang/slang_link.c index d4656ed493..8aa007bd1e 100644 --- a/src/mesa/slang/slang_link.c +++ b/src/mesa/slang/slang_link.c @@ -1096,7 +1096,7 @@ _slang_link(GLcontext *ctx, "Geometry shader without a vertex shader is illegal!\n"); return; } - if (shProg->GeometryProgram->VerticesOut == 0) { + if (shProg->Geom.VerticesOut == 0) { link_error(shProg, "GEOMETRY_VERTICES_OUT is zero\n"); return; @@ -1166,6 +1166,11 @@ _slang_link(GLcontext *ctx, /* Compute initial program's TexturesUsed info */ _mesa_update_shader_textures_used(&shProg->GeometryProgram->Base); + /* Copy some per-shader-program fields to per-shader object */ + shProg->GeometryProgram->VerticesOut = shProg->Geom.VerticesOut; + shProg->GeometryProgram->InputType = shProg->Geom.InputType; + shProg->GeometryProgram->OutputType = shProg->Geom.OutputType; + /* notify driver that a new fragment program has been compiled/linked */ geomNotify = ctx->Driver.ProgramStringNotify(ctx, MESA_GEOMETRY_PROGRAM, &shProg->GeometryProgram->Base); -- cgit v1.2.3