diff options
author | Eric Anholt <[email protected]> | 2013-06-12 16:57:11 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-06-21 10:04:29 -0700 |
commit | faf3dbad0d30ed36ae6010a90ca2513edb591148 (patch) | |
tree | 77dfcda58e211cb78801cfaee2d3e9e837993979 /src/mesa/program | |
parent | 426ca34b7a2c3b9edfc0189daece8de3aff80627 (diff) |
mesa: Use shared code for converting shader targets to short strings.
We were duplicating this code all over the place, and they all would need
updating for the next set of shader targets.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 191e2911912..2739df72577 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2810,22 +2810,19 @@ get_mesa_program(struct gl_context *ctx, int i; struct gl_program *prog; GLenum target; - const char *target_string; + const char *target_string = _mesa_glsl_shader_target_name(shader->Type); struct gl_shader_compiler_options *options = &ctx->ShaderCompilerOptions[_mesa_shader_type_to_index(shader->Type)]; switch (shader->Type) { case GL_VERTEX_SHADER: target = GL_VERTEX_PROGRAM_ARB; - target_string = "vertex"; break; case GL_FRAGMENT_SHADER: target = GL_FRAGMENT_PROGRAM_ARB; - target_string = "fragment"; break; case GL_GEOMETRY_SHADER: target = GL_GEOMETRY_PROGRAM_NV; - target_string = "geometry"; break; default: assert(!"should not be reached"); |