summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/standalone_scaffolding.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-06-05 13:17:51 +1000
committerTimothy Arceri <[email protected]>2016-06-16 10:45:35 +1000
commit31dee99e052902bc08ddbb1009748dc982ac3211 (patch)
tree47e631d7bcd04cc59429b971ce8d685b6cce787b /src/compiler/glsl/standalone_scaffolding.cpp
parentbb1292e2261fa591cf66de443a1b0d4eb7f65cb2 (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/compiler/glsl/standalone_scaffolding.cpp')
-rw-r--r--src/compiler/glsl/standalone_scaffolding.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/glsl/standalone_scaffolding.cpp b/src/compiler/glsl/standalone_scaffolding.cpp
index 4edb7672cd0..396965af3b5 100644
--- a/src/compiler/glsl/standalone_scaffolding.cpp
+++ b/src/compiler/glsl/standalone_scaffolding.cpp
@@ -68,17 +68,16 @@ _mesa_shader_debug(struct gl_context *, GLenum, GLuint *,
}
struct gl_shader *
-_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
+_mesa_new_shader(struct gl_context *ctx, GLuint name, gl_shader_stage stage)
{
struct gl_shader *shader;
(void) ctx;
- assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER);
+ assert(stage == MESA_SHADER_FRAGMENT || stage == MESA_SHADER_VERTEX);
shader = rzalloc(NULL, struct gl_shader);
if (shader) {
- shader->Type = type;
- shader->Stage = _mesa_shader_enum_to_shader_stage(type);
+ shader->Stage = stage;
shader->Name = name;
shader->RefCount = 1;
}