diff options
author | Timothy Arceri <[email protected]> | 2016-06-05 13:17:51 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-06-16 10:45:35 +1000 |
commit | 31dee99e052902bc08ddbb1009748dc982ac3211 (patch) | |
tree | 47e631d7bcd04cc59429b971ce8d685b6cce787b /src/mesa/state_tracker/st_glsl_to_nir.cpp | |
parent | bb1292e2261fa591cf66de443a1b0d4eb7f65cb2 (diff) |
mesa/glsl: stop using GL shader type internally
Instead use the internal gl_shader_stage enum everywhere. This
makes things more consistent and gets rid of unnecessary
conversions.
Ideally it would be nice to remove the Type field from gl_shader
altogether but currently it is used to differentiate between
gl_shader and gl_shader_program in the ShaderObjects hash table.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_glsl_to_nir.cpp')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 98c075fcb2c..a8805645b6e 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -422,12 +422,12 @@ st_nir_get_mesa_program(struct gl_context *ctx, struct st_vertex_program *stvp; struct st_fragment_program *stfp; - switch (shader->Type) { - case GL_VERTEX_SHADER: + switch (shader->Stage) { + case MESA_SHADER_VERTEX: stvp = (struct st_vertex_program *)prog; stvp->shader_program = shader_program; break; - case GL_FRAGMENT_SHADER: + case MESA_SHADER_FRAGMENT: stfp = (struct st_fragment_program *)prog; stfp->shader_program = shader_program; break; |