mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
broadcom/compiler: handle vec2 load/store index
In vulkan, we load descriptors via vulkan resource index, which returns a vec2, of which we want component 0 which holds the actual index. Typically, this will be cleaned-up by the time we get to emitting VIR so the index is a single scalar component, but there are some cases where this might no be the case, so make sure we don't assume it to be a scalar, like we do in other places. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19313>
This commit is contained in:
parent
2ab70c1004
commit
8cd50ef071
1 changed files with 2 additions and 2 deletions
|
|
@ -595,9 +595,9 @@ ntq_emit_tmu_general(struct v3d_compile *c, nir_intrinsic_instr *instr,
|
|||
*/
|
||||
base_offset = vir_uniform_ui(c, 0);
|
||||
} else {
|
||||
uint32_t idx = is_store ? 1 : 0;
|
||||
base_offset = vir_uniform(c, QUNIFORM_SSBO_OFFSET,
|
||||
nir_src_as_uint(instr->src[is_store ?
|
||||
1 : 0]));
|
||||
nir_src_comp_as_uint(instr->src[idx], 0));
|
||||
}
|
||||
|
||||
/* We are ready to emit TMU register writes now, but before we actually
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue