summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_descriptor_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_descriptor_set.c')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 3924d04..c977318 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -91,6 +91,9 @@ VkResult anv_CreateDescriptorSetLayout(
uint32_t b = binding->binding;
assert(binding->descriptorCount > 0);
+#ifndef NDEBUG
+ set_layout->binding[b].type = binding->descriptorType;
+#endif
set_layout->binding[b].array_size = binding->descriptorCount;
set_layout->binding[b].descriptor_index = set_layout->size;
set_layout->size += binding->descriptorCount;
@@ -526,6 +529,8 @@ void anv_UpdateDescriptorSets(
&set->descriptors[bind_layout->descriptor_index];
desc += write->dstArrayElement;
+ assert(write->descriptorType == bind_layout->type);
+
switch (write->descriptorType) {
case VK_DESCRIPTOR_TYPE_SAMPLER:
for (uint32_t j = 0; j < write->descriptorCount; j++) {