summaryrefslogtreecommitdiffstats
path: root/src/glsl/lower_packed_varyings.cpp
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2014-01-07 10:58:56 -0800
committerPaul Berry <[email protected]>2014-01-08 07:31:45 -0800
commite3b86f07da4ba9a4db6b8aae4072af6f1638b7cc (patch)
tree1b3c89c2a65cdefd6c39974e19ac337962df42b9 /src/glsl/lower_packed_varyings.cpp
parent65511e5f22e2ba0a5ebd9210319a55d80ea5334e (diff)
mesa: Use gl_shader::Stage instead of gl_shader::Type where possible.
This reduces confusion since gl_shader::Type is sometimes GL_SHADER_PROGRAM_MESA but is more frequently GL_SHADER_{VERTEX,GEOMETRY,FRAGMENT}. It also has the advantage that when switching on gl_shader::Stage, the compiler will alert if one of the possible enum types is unhandled. Finally, many functions in src/glsl (especially those dealing with linking) already use gl_shader_stage to represent pipeline stages; using gl_shader::Stage in those functions avoids the need for a conversion. Note: in the process I changed _mesa_write_shader_to_file() so that if it encounters an unexpected shader stage, it will use a file suffix of "????" rather than "geom". Reviewed-by: Brian Paul <[email protected]> v2: Split from patch "mesa: Store gl_shader_stage enum in gl_shader objects." Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/lower_packed_varyings.cpp')
-rw-r--r--src/glsl/lower_packed_varyings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/lower_packed_varyings.cpp b/src/glsl/lower_packed_varyings.cpp
index 9edef5d0487..c23d1801b4e 100644
--- a/src/glsl/lower_packed_varyings.cpp
+++ b/src/glsl/lower_packed_varyings.cpp
@@ -669,7 +669,7 @@ lower_packed_varyings(void *mem_ctx, unsigned location_base,
gs_input_vertices, &new_instructions);
visitor.run(instructions);
if (mode == ir_var_shader_out) {
- if (shader->Type == GL_GEOMETRY_SHADER) {
+ if (shader->Stage == MESA_SHADER_GEOMETRY) {
/* For geometry shaders, outputs need to be lowered before each call
* to EmitVertex()
*/