summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp1
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/shaderobj.c1
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp1
4 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index a40df6d17a4..c0d6aa27eeb 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -40,6 +40,7 @@ brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
shader = rzalloc(NULL, struct brw_shader);
if (shader) {
shader->base.Type = type;
+ shader->base.Stage = _mesa_shader_enum_to_shader_stage(type);
shader->base.Name = name;
_mesa_init_shader(ctx, &shader->base);
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 04bc4d4660f..37e05927d8c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2319,6 +2319,7 @@ struct gl_shader
* Must be the first field.
*/
GLenum Type;
+ gl_shader_stage Stage;
GLuint Name; /**< AKA the handle */
GLchar *Label; /**< GL_KHR_debug */
GLint RefCount; /**< Reference count */
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 3076fb425c9..dc81bbc7717 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -110,6 +110,7 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
shader = rzalloc(NULL, struct gl_shader);
if (shader) {
shader->Type = type;
+ shader->Stage = _mesa_shader_enum_to_shader_stage(type);
shader->Name = name;
_mesa_init_shader(ctx, shader);
}
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index b2131ed48b3..bd4eb5e3f20 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5207,6 +5207,7 @@ st_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
shader = rzalloc(NULL, struct gl_shader);
if (shader) {
shader->Type = type;
+ shader->Stage = _mesa_shader_enum_to_shader_stage(type);
shader->Name = name;
_mesa_init_shader(ctx, shader);
}