aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-05 17:18:15 +0100
committermarha <marha@users.sourceforge.net>2014-01-05 17:18:15 +0100
commit0fd65ec557757ec8760a96400a09b8a8a92a7b14 (patch)
tree961d86d49281cf94e2dc85ffb88c6b1491036338 /mesalib/src/mesa/program
parent68c12003597662f95eac07ddeee99637f7caa3e5 (diff)
parent1b37f71714e2ca4af60bd050adbbb7969534dfd6 (diff)
downloadvcxsrv-0fd65ec557757ec8760a96400a09b8a8a92a7b14.tar.gz
vcxsrv-0fd65ec557757ec8760a96400a09b8a8a92a7b14.tar.bz2
vcxsrv-0fd65ec557757ec8760a96400a09b8a8a92a7b14.zip
Merge remote-tracking branch 'origin/released'
* origin/released: randrproto libXau libxcb mesa mkfontscale pixman git update 5 Jan 2014
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];
}