mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 00:30:11 +01:00
nir: add used field to nir variables
Will be use in a following path by the glsl nir based linker. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25371>
This commit is contained in:
parent
0bfae24640
commit
f2e87c5c28
2 changed files with 10 additions and 0 deletions
|
|
@ -561,6 +561,7 @@ nir_visitor::visit(ir_variable *ir)
|
|||
var->data.matrix_layout = ir->data.matrix_layout;
|
||||
var->data.from_named_ifc_block = ir->data.from_named_ifc_block;
|
||||
var->data.compact = false;
|
||||
var->data.used = ir->data.used;
|
||||
|
||||
switch(ir->data.mode) {
|
||||
case ir_var_auto:
|
||||
|
|
|
|||
|
|
@ -648,6 +648,15 @@ typedef struct nir_variable {
|
|||
*/
|
||||
unsigned must_be_shader_input : 1;
|
||||
|
||||
/**
|
||||
* Has this variable been used for reading or writing?
|
||||
*
|
||||
* Several GLSL semantic checks require knowledge of whether or not a
|
||||
* variable has been used. For example, it is an error to redeclare a
|
||||
* variable as invariant after it has been used.
|
||||
*/
|
||||
unsigned used:1;
|
||||
|
||||
/**
|
||||
* How the variable was declared. See nir_var_declaration_type.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue