v3dv: don't assume that bound descriptors have been written
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 12 Sep 2023 08:09:12 +0000 (10:09 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 12 Sep 2023 11:42:58 +0000 (11:42 +0000)
commit64b49fb501e960f0ddeeb9e9bce459d645f6923d
tree7b005a69b1f8620b49848930f05153af0e3b5a92
parent9d2bad8b37358377fdc21307329cb06f8c0d8fb4
v3dv: don't assume that bound descriptors have been written

The pipeline layout lifetime tests in CTS allocate some descriptors
and bind them to the command buffer without actually ever writing
valid resources to them since they never actually execute the command
buffers, so we want to be careful at bind time and not assume the
resources exist.

Fixes crashes in dEQP-VK.api.pipeline.pipeline_layout.lifetime.*

Fixes: 95f881adbd ('v3dv: add support for sampling simple 2D linear textures')
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25172>
src/broadcom/vulkan/v3dv_cmd_buffer.c