diff options
author | Marek Olšák <[email protected]> | 2020-03-31 10:03:55 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-27 12:49:53 +0000 |
commit | ad5da3e63ee368e3fa420d4785c698273614683b (patch) | |
tree | 2d8f5e0e32c9671cd7c1f851b0ea0eb307ef62c8 /src/mesa/drivers/dri/i915 | |
parent | 531728d6cbf0eb7d87698b9f03d0083ca0e2a7c0 (diff) |
mesa: replace GLenum target with gl_shader_stage in NewProgram
So that the GLSL compiler doesn't have to use the GLenum conversion
functions.
Reviewed-by: Timothy Arceri <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4756>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 6493ab99b1e..95a60d1cce0 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1121,22 +1121,22 @@ track_params(struct i915_fragment_program *p) } static struct gl_program * -i915NewProgram(struct gl_context * ctx, GLenum target, GLuint id, +i915NewProgram(struct gl_context * ctx, gl_shader_stage stage, GLuint id, bool is_arb_asm) { - switch (target) { - case GL_VERTEX_PROGRAM_ARB: { + switch (stage) { + case MESA_SHADER_VERTEX: { struct gl_program *prog = rzalloc(NULL, struct gl_program); - return _mesa_init_gl_program(prog, target, id, is_arb_asm); + return _mesa_init_gl_program(prog, stage, id, is_arb_asm); } - case GL_FRAGMENT_PROGRAM_ARB:{ + case MESA_SHADER_FRAGMENT:{ struct i915_fragment_program *prog = rzalloc(NULL, struct i915_fragment_program); if (prog) { i915_init_program(I915_CONTEXT(ctx), prog); - return _mesa_init_gl_program(&prog->FragProg, target, id, + return _mesa_init_gl_program(&prog->FragProg, stage, id, is_arb_asm); } else @@ -1146,7 +1146,7 @@ i915NewProgram(struct gl_context * ctx, GLenum target, GLuint id, default: /* Just fallback: */ - return _mesa_new_program(ctx, target, id, is_arb_asm); + return _mesa_new_program(ctx, stage, id, is_arb_asm); } } |