panvk: Don't try to update samplers if they are immutable

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12019>
This commit is contained in:
Tomeu Vizoso 2021-07-06 11:14:13 +02:00
parent 15ac51f758
commit 498e5f44fa
1 changed files with 4 additions and 2 deletions

View File

@ -666,9 +666,11 @@ panvk_write_descriptor_set(struct panvk_device *dev,
if (pDescriptorWrite->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER ||
pDescriptorWrite->descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER) {
unsigned sampler = binding_layout->sampler_idx + dest_offset + i;
panvk_set_sampler_desc(&set->samplers[sampler], info);
if (binding_layout->immutable_samplers == NULL) {
unsigned sampler = binding_layout->sampler_idx + dest_offset + i;
panvk_set_sampler_desc(&set->samplers[sampler], info);
}
}
if (pDescriptorWrite->descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE ||