mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
v3dv/pipeline: fix adding texture/samplers array elements to texture/sampler map
For arrays we are adding one entry on the map per array element. This makes getting back the descriptor for each array element easier, as for example, for ubo arrays, each array element can be bound to a different descriptor buffer. For samplers arrays this would also make sense. Fixes crashes on tests like: dEQP-VK.binding_model.shader_access.primary_cmd_buf.combined_image_sampler_mutable.fragment.descriptor_array.2d Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
6e39565e59
commit
f47d0829cb
1 changed files with 2 additions and 2 deletions
|
|
@ -553,8 +553,8 @@ lower_tex_src_to_offset(nir_builder *b, nir_tex_instr *instr, unsigned src_idx,
|
|||
&pipeline->sampler_map : &pipeline->texture_map,
|
||||
deref->var->data.descriptor_set,
|
||||
deref->var->data.binding,
|
||||
deref->var->data.index,
|
||||
binding_layout->array_size) + base_index;
|
||||
deref->var->data.index + base_index,
|
||||
binding_layout->array_size);
|
||||
if (is_sampler)
|
||||
instr->sampler_index = desc_index;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue