v3dv/descriptor: handle not having a sampler when combining texture and sampler id
authorAlejandro Piñeiro <apinheiro@igalia.com>
Sat, 11 Apr 2020 12:50:50 +0000 (14:50 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:29 +0000 (21:21 +0000)
commit9b98d3652283cf986380ffe574523c2ef2eedba8
tree3e7b02d10a3d57cc2a0e98ba7484e513620c6ab8
parent56b611a9cf29447a5b750a965adc0235d0e9eb68
v3dv/descriptor: handle not having a sampler when combining texture and sampler id

There are some texture operations (like mipmap query levels) that
doesn't require a sampler. In fact, you should ignore it. So we need
to take it into account when combining the
indexes. nir_tex_instr_src_index is returning a negative value to
identify that case, but as we are using a uint32_t to pack both values
(for convenience, easy to pack/unpack the hash table key), we just use
a uint value big enough to be a wrong sampler id.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_cmd_buffer.c
src/broadcom/vulkan/v3dv_pipeline.c
src/broadcom/vulkan/v3dv_private.h
src/broadcom/vulkan/v3dv_uniforms.c