mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
lavapipe: do not read sampler descriptor info during update if layout has immutables
this is illegal Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>
This commit is contained in:
parent
4b28ed0d7b
commit
e3e4ff0b84
1 changed files with 11 additions and 7 deletions
|
|
@ -388,17 +388,21 @@ VKAPI_ATTR void VKAPI_CALL lvp_UpdateDescriptorSets(
|
|||
for (uint32_t j = 0; j < write->descriptorCount; j++) {
|
||||
LVP_FROM_HANDLE(lvp_image_view, iview,
|
||||
write->pImageInfo[j].imageView);
|
||||
LVP_FROM_HANDLE(lvp_sampler, sampler,
|
||||
write->pImageInfo[j].sampler);
|
||||
|
||||
desc[j].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||
desc[j].info.iview = iview;
|
||||
|
||||
/* If this descriptor has an immutable sampler, we don't want
|
||||
* to stomp on it.
|
||||
/*
|
||||
* All consecutive bindings updated via a single VkWriteDescriptorSet structure, except those
|
||||
* with a descriptorCount of zero, must all either use immutable samplers or must all not
|
||||
* use immutable samplers
|
||||
*/
|
||||
if (sampler)
|
||||
if (bind_layout->immutable_samplers) {
|
||||
desc[j].info.sampler = bind_layout->immutable_samplers[j];
|
||||
} else {
|
||||
LVP_FROM_HANDLE(lvp_sampler, sampler,
|
||||
write->pImageInfo[j].sampler);
|
||||
|
||||
desc[j].info.sampler = sampler;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue