summaryrefslogtreecommitdiffstats
path: root/src/mesa/slang
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-07-02 15:34:58 -0600
committerBrian Paul <[email protected]>2010-07-02 15:36:14 -0600
commitae8164a67b05cdc6d9b520b9704330537f3a6024 (patch)
treeb523da694edbb1ab6f6ed43a685e56089e18909f /src/mesa/slang
parentd981bde38472d8d3bb74dab67eccd7c82915a566 (diff)
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.
Diffstat (limited to 'src/mesa/slang')
-rw-r--r--src/mesa/slang/slang_link.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/slang/slang_link.c b/src/mesa/slang/slang_link.c
index d4656ed493c..8aa007bd1ec 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);