summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
authorGregory Hainaut <[email protected]>2013-06-28 17:18:35 -0700
committerIan Romanick <[email protected]>2014-03-25 10:25:25 -0700
commit4caa9db71ce05dc2cc86177ca42655c2011fbe4a (patch)
tree525a073f1192e185ba35fdb8f3610fd213d7c02a /src/mesa/drivers/common/meta.c
parentde4f85f52d0002cfd0105e932141cfdb108f1a61 (diff)
mesa/sso: Add gl_pipeline_object parameter to _mesa_use_shader_program
Extend use_shader_program to support a different target. Allow to reuse the function to update the pipeline state. Note I bypass the flush when target isn't current. Maybe it would be better to create a new UseProgramStages driver function This was originally included in another patch, but it was split out by Ian Romanick. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r--src/mesa/drivers/common/meta.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index dbc6ab2a701..acf927b09a0 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -899,16 +899,19 @@ _mesa_meta_end(struct gl_context *ctx)
if (ctx->Extensions.ARB_vertex_shader) {
_mesa_use_shader_program(ctx, GL_VERTEX_SHADER,
- save->Shader[MESA_SHADER_VERTEX]);
+ save->Shader[MESA_SHADER_VERTEX],
+ ctx->_Shader);
}
if (_mesa_has_geometry_shaders(ctx))
_mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB,
- save->Shader[MESA_SHADER_GEOMETRY]);
+ save->Shader[MESA_SHADER_GEOMETRY],
+ ctx->_Shader);
if (ctx->Extensions.ARB_fragment_shader)
_mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER,
- save->Shader[MESA_SHADER_FRAGMENT]);
+ save->Shader[MESA_SHADER_FRAGMENT],
+ ctx->_Shader);
_mesa_reference_shader_program(ctx, &ctx->_Shader->ActiveProgram,
save->ActiveShader);