mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
Ensure that shader_in and shader_out are correctly set in declarations
This commit is contained in:
parent
93dad36844
commit
c96822cf31
1 changed files with 19 additions and 3 deletions
|
|
@ -1471,11 +1471,27 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
|||
|
||||
if (qual->uniform)
|
||||
var->shader_in = true;
|
||||
if (qual->varying) {
|
||||
if (qual->in)
|
||||
|
||||
/* Any 'in' or 'inout' variables at global scope must be marked as being
|
||||
* shader inputs. Likewise, any 'out' or 'inout' variables at global scope
|
||||
* must be marked as being shader outputs.
|
||||
*/
|
||||
if (state->current_function == NULL) {
|
||||
switch (var->mode) {
|
||||
case ir_var_in:
|
||||
case ir_var_uniform:
|
||||
var->shader_in = true;
|
||||
if (qual->out)
|
||||
break;
|
||||
case ir_var_out:
|
||||
var->shader_out = true;
|
||||
break;
|
||||
case ir_var_inout:
|
||||
var->shader_in = true;
|
||||
var->shader_out = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (qual->flat)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue