mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
microsoft/compiler: Fix array-of-array handling for derefs of textures/images
Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342>
This commit is contained in:
parent
c9719b6d2e
commit
a7311ceafe
1 changed files with 6 additions and 0 deletions
|
|
@ -3609,6 +3609,12 @@ emit_deref(struct ntd_context* ctx, nir_deref_instr* instr)
|
|||
if (!base || !offset)
|
||||
return false;
|
||||
|
||||
if (glsl_type_is_array(instr->type)) {
|
||||
offset = dxil_emit_binop(&ctx->mod, DXIL_BINOP_MUL, offset,
|
||||
dxil_module_get_int32_const(&ctx->mod, glsl_get_aoa_size(instr->type)), 0);
|
||||
if (!offset)
|
||||
return false;
|
||||
}
|
||||
binding = dxil_emit_binop(&ctx->mod, DXIL_BINOP_ADD, base, offset, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue