nir: add max_array_access data field

Will be used in following patches for glsl linking validation.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28538>
This commit is contained in:
Timothy Arceri 2024-03-18 11:42:29 +11:00 committed by Marge Bot
parent acbf3ad1fb
commit f24e6a5062
2 changed files with 8 additions and 0 deletions

View File

@ -443,6 +443,7 @@ nir_visitor::visit(ir_variable *ir)
var->data.from_named_ifc_block = ir->data.from_named_ifc_block;
var->data.compact = false;
var->data.used = ir->data.used;
var->data.max_array_access = ir->data.max_array_access;
switch(ir->data.mode) {
case ir_var_auto:

View File

@ -606,6 +606,13 @@ typedef struct nir_variable {
*/
unsigned explicit_location : 1;
/**
* Highest element accessed with a constant array index
*
* Not used for non-array variables. -1 is never accessed.
*/
int max_array_access;
/**
* Is this varying used by transform feedback?
*