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:
committed by
Marge Bot
parent
6e39565e59
commit
f47d0829cb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user