From 31dee99e052902bc08ddbb1009748dc982ac3211 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Sun, 5 Jun 2016 13:17:51 +1000 Subject: 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 --- src/mesa/main/shaderobj.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/shaderobj.c') diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 189317c3a46..8283555740b 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -99,14 +99,12 @@ _mesa_init_shader(struct gl_context *ctx, struct gl_shader *shader) * Called via ctx->Driver.NewShader() */ 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; - assert(_mesa_validate_shader_target(ctx, type)); 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; _mesa_init_shader(ctx, shader); } -- cgit v1.2.3