diff options
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/main.cpp | 1 | ||||
-rw-r--r-- | src/glsl/standalone_scaffolding.cpp | 1 | ||||
-rw-r--r-- | src/glsl/test_optpass.cpp | 1 | ||||
-rw-r--r-- | src/glsl/tests/builtin_variable_test.cpp | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp index 2f59848adbf..3260c44710f 100644 --- a/src/glsl/main.cpp +++ b/src/glsl/main.cpp @@ -362,6 +362,7 @@ main(int argc, char **argv) shader->Type = GL_FRAGMENT_SHADER; else usage_fail(argv[0]); + shader->Stage = _mesa_shader_enum_to_shader_stage(shader->Type); shader->Source = load_text_file(whole_program, argv[optind]); if (shader->Source == NULL) { diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp index 73dfe5c38be..6a717458e60 100644 --- a/src/glsl/standalone_scaffolding.cpp +++ b/src/glsl/standalone_scaffolding.cpp @@ -76,6 +76,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; shader->RefCount = 1; } diff --git a/src/glsl/test_optpass.cpp b/src/glsl/test_optpass.cpp index 01f6f9585f0..bdb1e8ffdeb 100644 --- a/src/glsl/test_optpass.cpp +++ b/src/glsl/test_optpass.cpp @@ -204,6 +204,7 @@ int test_optpass(int argc, char **argv) struct gl_shader *shader = rzalloc(NULL, struct gl_shader); shader->Type = shader_type; + shader->Stage = _mesa_shader_enum_to_shader_stage(shader_type); string input = read_stdin_to_eof(); diff --git a/src/glsl/tests/builtin_variable_test.cpp b/src/glsl/tests/builtin_variable_test.cpp index 63949ee262e..9b4a097b1e4 100644 --- a/src/glsl/tests/builtin_variable_test.cpp +++ b/src/glsl/tests/builtin_variable_test.cpp @@ -65,6 +65,7 @@ common_builtin::SetUp() this->shader = rzalloc(this->mem_ctx, gl_shader); this->shader->Type = this->shader_type; + this->shader->Stage = _mesa_shader_enum_to_shader_stage(this->shader_type); this->state = new(mem_ctx) _mesa_glsl_parse_state(&this->ctx, this->shader->Type, |