"compute shader variables cannot be given "
"explicit locations");
return;
+ default:
+ fail = true;
+ break;
};
if (fail) {
? (qual_location + FRAG_RESULT_DATA0)
: (qual_location + VARYING_SLOT_VAR0);
break;
- case MESA_SHADER_COMPUTE:
+ default:
assert(!"Unexpected shader type");
break;
}
case MESA_SHADER_COMPUTE:
/* Invariance isn't meaningful in compute shaders. */
break;
+ default:
+ break;
}
}
}
/* Memory qualifiers are allowed on buffer and image variables, while
- * the format qualifier is only accept for images.
+ * the format qualifier is only accepted for images.
*/
- if (var_mode == ir_var_shader_storage || field_type->is_image()) {
+ if (var_mode == ir_var_shader_storage ||
+ field_type->without_array()->is_image()) {
/* For readonly and writeonly qualifiers the field definition,
* if set, overwrites the layout qualifier.
*/
fields[i].memory_restrict = qual->flags.q.restrict_flag ||
(layout && layout->flags.q.restrict_flag);
- if (field_type->is_image()) {
+ if (field_type->without_array()->is_image()) {
if (qual->flags.q.explicit_image_format) {
- if (qual->image_base_type != field_type->sampled_type) {
+ if (qual->image_base_type !=
+ field_type->without_array()->sampled_type) {
_mesa_glsl_error(&loc, state, "format qualifier doesn't "
"match the base data type of the image");
}