nir/lower_io: fix handling for compact arrays with indirect derefs
this logic relies on constant indexing for compact arrays, but this is frequently not the case for compact array builtins (e.g., gl_TessLevelOuter). the usual strategy of lowering to temps isn't viable in TCS, which means io lowering has to be able to handle indirect access to these builtins without crashing cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27534>
This commit is contained in:

committed by
Marge Bot

parent
a512c2a8b5
commit
9e2c7314f2
@@ -216,7 +216,7 @@ get_io_offset(nir_builder *b, nir_deref_instr *deref,
|
||||
p++;
|
||||
}
|
||||
|
||||
if (path.path[0]->var->data.compact) {
|
||||
if (path.path[0]->var->data.compact && nir_src_is_const((*p)->arr.index)) {
|
||||
assert((*p)->deref_type == nir_deref_type_array);
|
||||
assert(glsl_type_is_scalar((*p)->type));
|
||||
|
||||
|
Reference in New Issue
Block a user