mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 01:30:08 +01:00
glsl2: Perform some semantic checking of ARB_fcc layout qualifiers
The rest cannot be handled until built-in variables (i.e., gl_FragCoord) can be redeclared to add qualifiers.
This commit is contained in:
parent
f50f06552e
commit
8d8469eb2a
1 changed files with 13 additions and 0 deletions
|
|
@ -1542,6 +1542,19 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
|||
else
|
||||
var->interpolation = ir_var_smooth;
|
||||
|
||||
/* FINISHME: Apply the fragment coord convetion layout qualifiers.
|
||||
*/
|
||||
if ((qual->origin_upper_left || qual->pixel_center_integer)
|
||||
&& (strcmp(var->name, "gl_FragCoord") != 0)) {
|
||||
const char *const qual_string = (qual->origin_upper_left)
|
||||
? "origin_upper_left" : "pixel_center_integer";
|
||||
|
||||
_mesa_glsl_error(loc, state,
|
||||
"layout qualifier `%s' can only be applied to "
|
||||
"fragment shader input `gl_FragCoord'",
|
||||
qual_string);
|
||||
}
|
||||
|
||||
if (var->type->is_array() && (state->language_version >= 120)) {
|
||||
var->array_lvalue = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue