glsl: Fix gl_shader_stage enum unsigned comparison
Replace -1 with MESA_SHADER_NONE enum value to fix sign related warning:
external/mesa3d/src/compiler/glsl/link_varyings.cpp:1415:25: warning: comparison of constant -1 with expression of type 'gl_shader_stage' is always true [-Wtautological-constant-out-of-range-compare]
(consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT))) {
~~~~~~~~~~~~~~ ^ ~~
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
@@ -1324,6 +1324,8 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type,
|
||||
case MESA_SHADER_COMPUTE:
|
||||
/* Compute shaders don't have varyings. */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1461,6 +1463,8 @@ _mesa_glsl_initialize_variables(exec_list *instructions,
|
||||
case MESA_SHADER_COMPUTE:
|
||||
gen.generate_cs_special_vars();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user