diff options
author | Marek Olšák <[email protected]> | 2013-06-12 17:15:46 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-07-02 17:02:14 +0200 |
commit | 030ca230e25192307336cb39f1ee414d0392b620 (patch) | |
tree | d77e85b3517380fded6c54ce6a1c3ef1da025f1f /src/mesa/state_tracker/st_glsl_to_tgsi.cpp | |
parent | 84f367e69a876e473b4293483c5842b47d27d493 (diff) |
mesa: renumber shader indices according to their placement in pipeline
See my explanation in mtypes.h.
v2: don't do this in gallium
v3: also updated the comment at the gl_shader_type definition
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_glsl_to_tgsi.cpp')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 32bc2b37b10..64e0a8a46eb 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5271,15 +5271,11 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) linked_prog = get_mesa_program(ctx, prog, prog->_LinkedShaders[i]); if (linked_prog) { - static const GLenum targets[] = { - GL_VERTEX_PROGRAM_ARB, - GL_FRAGMENT_PROGRAM_ARB, - GL_GEOMETRY_PROGRAM_NV - }; - _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, linked_prog); - if (!ctx->Driver.ProgramStringNotify(ctx, targets[i], linked_prog)) { + if (!ctx->Driver.ProgramStringNotify(ctx, + _mesa_program_index_to_target(i), + linked_prog)) { _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, NULL); _mesa_reference_program(ctx, &linked_prog, NULL); |