aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp2
-rw-r--r--mesalib/src/mesa/program/program.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index 23d479c32..beb0c093b 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -2801,7 +2801,7 @@ get_mesa_program(struct gl_context *ctx,
int i;
struct gl_program *prog;
GLenum target;
- const char *target_string = _mesa_glsl_shader_target_name(shader->Type);
+ const char *target_string = _mesa_shader_enum_to_string(shader->Type);
struct gl_shader_compiler_options *options =
&ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)];
diff --git a/mesalib/src/mesa/program/program.h b/mesalib/src/mesa/program/program.h
index 353ccab47..baff47376 100644
--- a/mesalib/src/mesa/program/program.h
+++ b/mesalib/src/mesa/program/program.h
@@ -210,14 +210,16 @@ _mesa_program_target_to_index(GLenum v)
static inline GLenum
_mesa_program_index_to_target(GLuint i)
{
- static const GLenum enums[MESA_SHADER_TYPES] = {
+ static const GLenum enums[] = {
GL_VERTEX_PROGRAM_ARB,
GL_GEOMETRY_PROGRAM_NV,
GL_FRAGMENT_PROGRAM_ARB
};
- if(i >= MESA_SHADER_TYPES)
+ STATIC_ASSERT(Elements(enums) == MESA_SHADER_TYPES);
+ if(i >= MESA_SHADER_TYPES) {
+ assert(!"Unexpected program index");
return 0;
- else
+ } else
return enums[i];
}