summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp10
-rw-r--r--src/mesa/main/context.c8
-rw-r--r--src/mesa/main/mtypes.h12
-rw-r--r--src/mesa/main/shaderapi.c14
-rw-r--r--src/mesa/main/shaderapi.h2
-rw-r--r--src/mesa/main/shaderobj.c4
-rw-r--r--src/mesa/main/shaderobj.h6
-rw-r--r--src/mesa/main/uniform_query.cpp6
-rw-r--r--src/mesa/main/uniforms.c4
-rw-r--r--src/mesa/program/ir_to_mesa.cpp18
-rw-r--r--src/mesa/program/program.c2
-rw-r--r--src/mesa/program/program.h8
-rw-r--r--src/mesa/program/sampler.cpp2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp12
15 files changed, 55 insertions, 55 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 78c06fcd680..8d202a2d425 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -463,7 +463,7 @@ brw_initialize_context_constants(struct brw_context *brw)
}
/* We want the GLSL compiler to emit code that uses condition codes */
- for (int i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (int i = 0; i < MESA_SHADER_STAGES; i++) {
ctx->ShaderCompilerOptions[i].MaxIfDepth = brw->gen < 6 ? 16 : UINT_MAX;
ctx->ShaderCompilerOptions[i].EmitCondCodes = true;
ctx->ShaderCompilerOptions[i].EmitNoNoise = true;
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 3f59c804ca5..a40df6d17a4 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -82,7 +82,7 @@ brw_shader_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
static void
brw_lower_packing_builtins(struct brw_context *brw,
- gl_shader_type shader_type,
+ gl_shader_stage shader_type,
exec_list *ir)
{
int ops = LOWER_PACK_SNORM_2x16
@@ -132,7 +132,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
return false;
prog->Parameters = _mesa_new_parameter_list();
- _mesa_copy_linked_program_data((gl_shader_type) stage, shProg, prog);
+ _mesa_copy_linked_program_data((gl_shader_stage) stage, shProg, prog);
void *mem_ctx = ralloc_context(NULL);
bool progress;
@@ -145,7 +145,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
/* lower_packing_builtins() inserts arithmetic instructions, so it
* must precede lower_instructions().
*/
- brw_lower_packing_builtins(brw, (gl_shader_type) stage, shader->ir);
+ brw_lower_packing_builtins(brw, (gl_shader_stage) stage, shader->ir);
do_mat_op_to_vec(shader->ir);
const int bitfield_insert = brw->gen >= 7
? BITFIELD_INSERT_TO_BFM_BFI
@@ -261,7 +261,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
if (ctx->Shader.Flags & GLSL_DUMP) {
printf("\n");
printf("GLSL IR for linked %s program %d:\n",
- _mesa_shader_enum_to_string(shader->base.Type), shProg->Name);
+ _mesa_progshader_enum_to_string(shader->base.Type), shProg->Name);
_mesa_print_ir(shader->base.ir, NULL);
printf("\n");
}
@@ -274,7 +274,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
continue;
printf("GLSL %s shader %d source for linked program %d:\n",
- _mesa_shader_enum_to_string(sh->Type),
+ _mesa_progshader_enum_to_string(sh->Type),
i,
shProg->Name);
printf("%s", sh->Source);
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 658499fa4e3..76e2eccfd5c 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1851,14 +1851,14 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
#ifdef DEBUG
if (ctx->Shader.Flags & GLSL_LOG) {
- struct gl_shader_program *shProg[MESA_SHADER_TYPES];
- gl_shader_type i;
+ struct gl_shader_program *shProg[MESA_SHADER_STAGES];
+ gl_shader_stage i;
shProg[MESA_SHADER_VERTEX] = ctx->Shader.CurrentVertexProgram;
shProg[MESA_SHADER_GEOMETRY] = ctx->Shader.CurrentGeometryProgram;
shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentFragmentProgram;
- for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
if (shProg[i] == NULL || shProg[i]->_Used
|| shProg[i]->_LinkedShaders[i] == NULL)
continue;
@@ -1875,7 +1875,7 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
_mesa_append_uniforms_to_file(shProg[i]->_LinkedShaders[i]);
}
- for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
if (shProg[i] != NULL)
shProg[i]->_Used = GL_TRUE;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a5294b01858..9e2083c53bb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2399,9 +2399,9 @@ typedef enum
MESA_SHADER_VERTEX = 0,
MESA_SHADER_GEOMETRY = 1,
MESA_SHADER_FRAGMENT = 2,
-} gl_shader_type;
+} gl_shader_stage;
-#define MESA_SHADER_TYPES (MESA_SHADER_FRAGMENT + 1)
+#define MESA_SHADER_STAGES (MESA_SHADER_FRAGMENT + 1)
struct gl_uniform_buffer_variable
@@ -2482,7 +2482,7 @@ struct gl_active_atomic_buffer
GLuint MinimumSize;
/** Shader stages making use of it. */
- GLboolean StageReferences[MESA_SHADER_TYPES];
+ GLboolean StageReferences[MESA_SHADER_STAGES];
};
/**
@@ -2620,7 +2620,7 @@ struct gl_shader_program
* This is used to maintain the Binding values of the stage's UniformBlocks[]
* and to answer the GL_UNIFORM_BLOCK_REFERENCED_BY_*_SHADER queries.
*/
- int *UniformBlockStageIndex[MESA_SHADER_TYPES];
+ int *UniformBlockStageIndex[MESA_SHADER_STAGES];
/**
* Map of active uniform names to locations
@@ -2650,7 +2650,7 @@ struct gl_shader_program
* \c MESA_SHADER_* defines. Entries for non-existent stages will be
* \c NULL.
*/
- struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES];
+ struct gl_shader *_LinkedShaders[MESA_SHADER_STAGES];
};
@@ -3907,7 +3907,7 @@ struct gl_context
struct gl_ati_fragment_shader_state ATIFragmentShader;
struct gl_shader_state Shader; /**< GLSL shader object state */
- struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES];
+ struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_STAGES];
struct gl_query_state Query; /**< occlusion, timer queries */
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 57511e83e43..fc76f232eee 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -108,7 +108,7 @@ _mesa_init_shader_state(struct gl_context *ctx)
* are generated by the GLSL compiler.
*/
struct gl_shader_compiler_options options;
- gl_shader_type sh;
+ gl_shader_stage sh;
memset(&options, 0, sizeof(options));
options.MaxUnrollIterations = 32;
@@ -117,7 +117,7 @@ _mesa_init_shader_state(struct gl_context *ctx)
/* Default pragma settings */
options.DefaultPragmas.Optimize = GL_TRUE;
- for (sh = 0; sh < MESA_SHADER_TYPES; ++sh)
+ for (sh = 0; sh < MESA_SHADER_STAGES; ++sh)
memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
ctx->Shader.Flags = get_shader_flags();
@@ -778,7 +778,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
if (!sh)
return;
- options = &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(sh->Type)];
+ options = &ctx->ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(sh->Type)];
/* set default pragma state for shader */
sh->Pragmas = options->DefaultPragmas;
@@ -791,7 +791,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
} else {
if (ctx->Shader.Flags & GLSL_DUMP) {
printf("GLSL source for %s shader %d:\n",
- _mesa_shader_enum_to_string(sh->Type), sh->Name);
+ _mesa_progshader_enum_to_string(sh->Type), sh->Name);
printf("%s\n", sh->Source);
}
@@ -823,7 +823,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
if (!sh->CompileStatus) {
if (ctx->Shader.Flags & GLSL_DUMP_ON_ERROR) {
fprintf(stderr, "GLSL source for %s shader %d:\n",
- _mesa_shader_enum_to_string(sh->Type), sh->Name);
+ _mesa_progshader_enum_to_string(sh->Type), sh->Name);
fprintf(stderr, "%s\n", sh->Source);
fprintf(stderr, "Info Log:\n%s\n", sh->InfoLog);
fflush(stderr);
@@ -898,7 +898,7 @@ print_shader_info(const struct gl_shader_program *shProg)
printf("Mesa: glUseProgram(%u)\n", shProg->Name);
for (i = 0; i < shProg->NumShaders; i++) {
printf(" %s shader %u, checksum %u\n",
- _mesa_shader_enum_to_string(shProg->Shaders[i]->Type),
+ _mesa_progshader_enum_to_string(shProg->Shaders[i]->Type),
shProg->Shaders[i]->Name,
shProg->Shaders[i]->SourceChecksum);
}
@@ -1836,7 +1836,7 @@ _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string)
* object to a specific gl_program object.
*/
void
-_mesa_copy_linked_program_data(gl_shader_type type,
+_mesa_copy_linked_program_data(gl_shader_stage type,
const struct gl_shader_program *src,
struct gl_program *dst)
{
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index fe58e7de9bd..4822e32c270 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -211,7 +211,7 @@ extern GLuint GLAPIENTRY
_mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
extern void
-_mesa_copy_linked_program_data(gl_shader_type type,
+_mesa_copy_linked_program_data(gl_shader_stage type,
const struct gl_shader_program *src,
struct gl_program *dst);
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 0d794ad9693..3076fb425c9 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -307,7 +307,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg)
{
GLuint i;
- gl_shader_type sh;
+ gl_shader_stage sh;
assert(shProg->Type == GL_SHADER_PROGRAM_MESA);
@@ -346,7 +346,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
shProg->TransformFeedback.NumVarying = 0;
- for (sh = 0; sh < MESA_SHADER_TYPES; sh++) {
+ for (sh = 0; sh < MESA_SHADER_STAGES; sh++) {
if (shProg->_LinkedShaders[sh] != NULL) {
ctx->Driver.DeleteShader(ctx, shProg->_LinkedShaders[sh]);
shProg->_LinkedShaders[sh] = NULL;
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index 155058d7187..517557088b8 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -101,8 +101,8 @@ extern void
_mesa_free_shader_state(struct gl_context *ctx);
-static inline gl_shader_type
-_mesa_shader_type_to_index(GLenum v)
+static inline gl_shader_stage
+_mesa_shader_enum_to_shader_stage(GLenum v)
{
switch (v) {
case GL_VERTEX_SHADER:
@@ -112,7 +112,7 @@ _mesa_shader_type_to_index(GLenum v)
case GL_GEOMETRY_SHADER:
return MESA_SHADER_GEOMETRY;
default:
- ASSERT(0 && "bad value in _mesa_shader_type_to_index()");
+ ASSERT(0 && "bad value in _mesa_shader_enum_to_shader_stage()");
return MESA_SHADER_VERTEX;
}
}
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 61bcbcb8afd..d90193e03a5 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -445,14 +445,14 @@ log_uniform(const void *values, enum glsl_base_type basicType,
static void
log_program_parameters(const struct gl_shader_program *shProg)
{
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
if (shProg->_LinkedShaders[i] == NULL)
continue;
const struct gl_program *const prog = shProg->_LinkedShaders[i]->Program;
printf("Program %d %s shader parameters:\n",
- shProg->Name, _mesa_shader_enum_to_string(prog->Target));
+ shProg->Name, _mesa_progshader_enum_to_string(prog->Target));
for (unsigned j = 0; j < prog->Parameters->NumParameters; j++) {
printf("%s: %p %f %f %f %f\n",
prog->Parameters->Parameters[j].Name,
@@ -784,7 +784,7 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
int i;
bool flushed = false;
- for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
struct gl_shader *const sh = shProg->_LinkedShaders[i];
int j;
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 17e24f6788d..071d668f3bd 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -68,7 +68,7 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
{
GLuint s;
struct gl_shader *shader =
- shProg->_LinkedShaders[_mesa_program_target_to_index(prog->Target)];
+ shProg->_LinkedShaders[_mesa_program_enum_to_shader_stage(prog->Target)];
assert(shader);
@@ -642,7 +642,7 @@ _mesa_UniformBlockBinding(GLuint program,
shProg->UniformBlocks[uniformBlockIndex].Binding = uniformBlockBinding;
- for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
int stage_index = shProg->UniformBlockStageIndex[i][uniformBlockIndex];
if (stage_index != -1) {
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index beb0c093b5e..ae4a6e2dec6 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2392,7 +2392,7 @@ class add_uniform_to_shader : public program_resource_visitor {
public:
add_uniform_to_shader(struct gl_shader_program *shader_program,
struct gl_program_parameter_list *params,
- gl_shader_type shader_type)
+ gl_shader_stage shader_type)
: shader_program(shader_program), params(params), idx(-1),
shader_type(shader_type)
{
@@ -2414,7 +2414,7 @@ private:
struct gl_shader_program *shader_program;
struct gl_program_parameter_list *params;
int idx;
- gl_shader_type shader_type;
+ gl_shader_stage shader_type;
};
} /* anonymous namespace */
@@ -2494,7 +2494,7 @@ _mesa_generate_parameters_list_for_uniforms(struct gl_shader_program
*params)
{
add_uniform_to_shader add(shader_program, params,
- _mesa_shader_type_to_index(sh->Type));
+ _mesa_shader_enum_to_shader_stage(sh->Type));
foreach_list(node, sh->ir) {
ir_variable *var = ((ir_instruction *) node)->as_variable();
@@ -2801,9 +2801,9 @@ get_mesa_program(struct gl_context *ctx,
int i;
struct gl_program *prog;
GLenum target;
- const char *target_string = _mesa_shader_enum_to_string(shader->Type);
+ const char *target_string = _mesa_progshader_enum_to_string(shader->Type);
struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)];
+ &ctx->ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(shader->Type)];
switch (shader->Type) {
case GL_VERTEX_SHADER:
@@ -3000,14 +3000,14 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
assert(prog->LinkStatus);
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
if (prog->_LinkedShaders[i] == NULL)
continue;
bool progress;
exec_list *ir = prog->_LinkedShaders[i]->ir;
const struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(prog->_LinkedShaders[i]->Type)];
+ &ctx->ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(prog->_LinkedShaders[i]->Type)];
do {
progress = false;
@@ -3055,7 +3055,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
validate_ir_tree(ir);
}
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
struct gl_program *linked_prog;
if (prog->_LinkedShaders[i] == NULL)
@@ -3064,7 +3064,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
linked_prog = get_mesa_program(ctx, prog, prog->_LinkedShaders[i]);
if (linked_prog) {
- _mesa_copy_linked_program_data((gl_shader_type) i, prog, linked_prog);
+ _mesa_copy_linked_program_data((gl_shader_stage) i, prog, linked_prog);
_mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program,
linked_prog);
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index cdf1c03fa91..45748fdc93c 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -891,7 +891,7 @@ _mesa_find_free_register(const GLboolean used[],
*/
GLboolean
_mesa_valid_register_index(const struct gl_context *ctx,
- gl_shader_type shaderType,
+ gl_shader_stage shaderType,
gl_register_file file, GLint index)
{
const struct gl_program_constants *c;
diff --git a/src/mesa/program/program.h b/src/mesa/program/program.h
index baff473764d..4015b4c202b 100644
--- a/src/mesa/program/program.h
+++ b/src/mesa/program/program.h
@@ -181,7 +181,7 @@ _mesa_find_free_register(const GLboolean used[],
extern GLboolean
_mesa_valid_register_index(const struct gl_context *ctx,
- gl_shader_type shaderType,
+ gl_shader_stage shaderType,
gl_register_file file, GLint index);
extern void
@@ -192,7 +192,7 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
const struct gl_fragment_program *prog);
static inline GLuint
-_mesa_program_target_to_index(GLenum v)
+_mesa_program_enum_to_shader_stage(GLenum v)
{
switch (v) {
case GL_VERTEX_PROGRAM_ARB:
@@ -215,8 +215,8 @@ _mesa_program_index_to_target(GLuint i)
GL_GEOMETRY_PROGRAM_NV,
GL_FRAGMENT_PROGRAM_ARB
};
- STATIC_ASSERT(Elements(enums) == MESA_SHADER_TYPES);
- if(i >= MESA_SHADER_TYPES) {
+ STATIC_ASSERT(Elements(enums) == MESA_SHADER_STAGES);
+ if(i >= MESA_SHADER_STAGES) {
assert(!"Unexpected program index");
return 0;
} else
diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp
index 9b941273092..e6532be84d3 100644
--- a/src/mesa/program/sampler.cpp
+++ b/src/mesa/program/sampler.cpp
@@ -111,7 +111,7 @@ _mesa_get_sampler_uniform_value(class ir_dereference *sampler,
{
get_sampler_name getname(sampler, shader_program);
- GLuint shader = _mesa_program_target_to_index(prog->Target);
+ GLuint shader = _mesa_program_enum_to_shader_stage(prog->Target);
sampler->accept(&getname);
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index eb12426a544..b2131ed48b3 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4996,7 +4996,7 @@ st_translate_program(
* prog->ParameterValues to get reallocated (e.g., anything that adds a
* program constant) has to happen before creating this linkage.
*/
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
if (program->shader_program->_LinkedShaders[i] == NULL)
continue;
@@ -5037,7 +5037,7 @@ get_mesa_program(struct gl_context *ctx,
GLenum target;
bool progress;
struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)];
+ &ctx->ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(shader->Type)];
struct pipe_screen *pscreen = ctx->st->pipe->screen;
unsigned ptarget;
@@ -5143,7 +5143,7 @@ get_mesa_program(struct gl_context *ctx,
if (ctx->Shader.Flags & GLSL_DUMP) {
printf("\n");
printf("GLSL IR for linked %s program %d:\n",
- _mesa_shader_enum_to_string(shader->Type),
+ _mesa_progshader_enum_to_string(shader->Type),
shader_program->Name);
_mesa_print_ir(shader->ir, NULL);
printf("\n");
@@ -5236,14 +5236,14 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
assert(prog->LinkStatus);
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
if (prog->_LinkedShaders[i] == NULL)
continue;
bool progress;
exec_list *ir = prog->_LinkedShaders[i]->ir;
const struct gl_shader_compiler_options *options =
- &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(prog->_LinkedShaders[i]->Type)];
+ &ctx->ShaderCompilerOptions[_mesa_shader_enum_to_shader_stage(prog->_LinkedShaders[i]->Type)];
/* If there are forms of indirect addressing that the driver
* cannot handle, perform the lowering pass.
@@ -5306,7 +5306,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
validate_ir_tree(ir);
}
- for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
struct gl_program *linked_prog;
if (prog->_LinkedShaders[i] == NULL)