mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
gallivm/nir: fix const compact
Since adding support for compacts this crashes with indirects don't get the const address unless it's a const. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381>
This commit is contained in:
parent
96a5ced65f
commit
d7aed02bcc
1 changed files with 1 additions and 1 deletions
|
|
@ -922,7 +922,7 @@ get_deref_offset(struct lp_build_nir_context *bld_base, nir_deref_instr *instr,
|
||||||
uint32_t const_offset = 0;
|
uint32_t const_offset = 0;
|
||||||
LLVMValueRef offset = NULL;
|
LLVMValueRef offset = NULL;
|
||||||
|
|
||||||
if (var->data.compact) {
|
if (var->data.compact && nir_src_is_const(instr->arr.index)) {
|
||||||
assert(instr->deref_type == nir_deref_type_array);
|
assert(instr->deref_type == nir_deref_type_array);
|
||||||
const_offset = nir_src_as_uint(instr->arr.index);
|
const_offset = nir_src_as_uint(instr->arr.index);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue