summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-06-12 17:15:46 +0200
committerMarek Olšák <[email protected]>2013-07-02 17:02:14 +0200
commit030ca230e25192307336cb39f1ee414d0392b620 (patch)
treed77e85b3517380fded6c54ce6a1c3ef1da025f1f /src/mesa/drivers
parent84f367e69a876e473b4293483c5842b47d27d493 (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/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 12986cc403d..584b4c23f7d 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -117,17 +117,13 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
for (stage = 0; stage < ARRAY_SIZE(shProg->_LinkedShaders); stage++) {
struct brw_shader *shader =
(struct brw_shader *)shProg->_LinkedShaders[stage];
- static const GLenum targets[] = {
- GL_VERTEX_PROGRAM_ARB,
- GL_FRAGMENT_PROGRAM_ARB,
- GL_GEOMETRY_PROGRAM_NV
- };
if (!shader)
continue;
struct gl_program *prog =
- ctx->Driver.NewProgram(ctx, targets[stage], shader->base.Name);
+ ctx->Driver.NewProgram(ctx, _mesa_program_index_to_target(stage),
+ shader->base.Name);
if (!prog)
return false;
prog->Parameters = _mesa_new_parameter_list();