mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 00:40:32 +01:00
anv/descriptor_set: Set descriptor type for immuatable samplers
This commit is contained in:
parent
64e1c84059
commit
bfbb238dea
1 changed files with 11 additions and 2 deletions
|
|
@ -399,8 +399,17 @@ anv_descriptor_set_create(struct anv_device *device,
|
|||
struct anv_descriptor *desc = set->descriptors;
|
||||
for (uint32_t b = 0; b < layout->binding_count; b++) {
|
||||
if (layout->binding[b].immutable_samplers) {
|
||||
for (uint32_t i = 0; i < layout->binding[b].array_size; i++)
|
||||
desc[i].sampler = layout->binding[b].immutable_samplers[i];
|
||||
for (uint32_t i = 0; i < layout->binding[b].array_size; i++) {
|
||||
/* The type will get changed to COMBINED_IMAGE_SAMPLER in
|
||||
* UpdateDescriptorSets if needed. However, if the descriptor
|
||||
* set has an immutable sampler, UpdateDescriptorSets may never
|
||||
* touch it, so we need to make sure it's 100% valid now.
|
||||
*/
|
||||
desc[i] = (struct anv_descriptor) {
|
||||
.type = VK_DESCRIPTOR_TYPE_SAMPLER,
|
||||
.sampler = layout->binding[b].immutable_samplers[i],
|
||||
};
|
||||
}
|
||||
}
|
||||
desc += layout->binding[b].array_size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue