diff options
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r-- | src/mesa/main/shaderapi.c | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index b65c0dc6c37..07250cd768c 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -731,26 +731,34 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, case GL_GEOMETRY_VERTICES_OUT: if (!has_core_gs) break; - if (check_gs_query(ctx, shProg)) - *params = shProg->Geom.VerticesOut; + if (check_gs_query(ctx, shProg)) { + *params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]-> + Geom.VerticesOut; + } return; case GL_GEOMETRY_SHADER_INVOCATIONS: if (!has_core_gs || !ctx->Extensions.ARB_gpu_shader5) break; - if (check_gs_query(ctx, shProg)) - *params = shProg->Geom.Invocations; + if (check_gs_query(ctx, shProg)) { + *params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]-> + Geom.Invocations; + } return; case GL_GEOMETRY_INPUT_TYPE: if (!has_core_gs) break; - if (check_gs_query(ctx, shProg)) - *params = shProg->Geom.InputType; + if (check_gs_query(ctx, shProg)) { + *params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]-> + Geom.InputType; + } return; case GL_GEOMETRY_OUTPUT_TYPE: if (!has_core_gs) break; - if (check_gs_query(ctx, shProg)) - *params = shProg->Geom.OutputType; + if (check_gs_query(ctx, shProg)) { + *params = shProg->_LinkedShaders[MESA_SHADER_GEOMETRY]-> + Geom.OutputType; + } return; case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: { unsigned i; @@ -825,8 +833,10 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, case GL_TESS_CONTROL_OUTPUT_VERTICES: if (!has_tess) break; - if (check_tcs_query(ctx, shProg)) - *params = shProg->TessCtrl.VerticesOut; + if (check_tcs_query(ctx, shProg)) { + *params = shProg->_LinkedShaders[MESA_SHADER_TESS_CTRL]-> + TessCtrl.VerticesOut; + } return; case GL_TESS_GEN_MODE: if (!has_tess) @@ -2159,7 +2169,8 @@ _mesa_copy_linked_program_data(gl_shader_stage type, case MESA_SHADER_TESS_CTRL: { struct gl_tess_ctrl_program *dst_tcp = (struct gl_tess_ctrl_program *) dst; - dst_tcp->VerticesOut = src->TessCtrl.VerticesOut; + dst_tcp->VerticesOut = + src->_LinkedShaders[MESA_SHADER_TESS_CTRL]->TessCtrl.VerticesOut; break; } case MESA_SHADER_TESS_EVAL: { @@ -2177,11 +2188,13 @@ _mesa_copy_linked_program_data(gl_shader_stage type, } case MESA_SHADER_GEOMETRY: { struct gl_geometry_program *dst_gp = (struct gl_geometry_program *) dst; + struct gl_shader *geom_sh = src->_LinkedShaders[MESA_SHADER_GEOMETRY]; + dst_gp->VerticesIn = src->Geom.VerticesIn; - dst_gp->VerticesOut = src->Geom.VerticesOut; - dst_gp->Invocations = src->Geom.Invocations; - dst_gp->InputType = src->Geom.InputType; - dst_gp->OutputType = src->Geom.OutputType; + dst_gp->VerticesOut = geom_sh->Geom.VerticesOut; + dst_gp->Invocations = geom_sh->Geom.Invocations; + dst_gp->InputType = geom_sh->Geom.InputType; + dst_gp->OutputType = geom_sh->Geom.OutputType; dst->ClipDistanceArraySize = src->Geom.ClipDistanceArraySize; dst->CullDistanceArraySize = src->Geom.CullDistanceArraySize; dst_gp->UsesEndPrimitive = src->Geom.UsesEndPrimitive; |