From: Dave Airlie Date: Tue, 18 Apr 2017 03:22:32 +0000 (+1000) Subject: radv: add support for 32 descriptor sets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd420a7417c30e17b55c24d74b0fb399bfe3a2d4;p=mesa.git radv: add support for 32 descriptor sets. This bumps the limit to the number of sets to 32, now that we have proper support for it. It also uses 1u in a few places to make things a bit safer. Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index d95daff2c79..8877f20b9ea 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1381,7 +1381,7 @@ radv_flush_descriptors(struct radv_cmd_buffer *cmd_buffer, } for (i = 0; i < MAX_SETS; i++) { - if (!(cmd_buffer->state.descriptors_dirty & (1 << i))) + if (!(cmd_buffer->state.descriptors_dirty & (1u << i))) continue; struct radv_descriptor_set *set = cmd_buffer->state.descriptors[i]; if (!set) @@ -1957,7 +1957,7 @@ void radv_bind_descriptor_set(struct radv_cmd_buffer *cmd_buffer, struct radeon_winsys *ws = cmd_buffer->device->ws; cmd_buffer->state.descriptors[idx] = set; - cmd_buffer->state.descriptors_dirty |= (1 << idx); + cmd_buffer->state.descriptors_dirty |= (1u << idx); if (!set) return; @@ -2067,7 +2067,7 @@ void radv_meta_push_descriptor_set( descriptorWriteCount, pDescriptorWrites, 0, NULL); cmd_buffer->state.descriptors[set] = push_set; - cmd_buffer->state.descriptors_dirty |= (1 << set); + cmd_buffer->state.descriptors_dirty |= (1u << set); } void radv_CmdPushDescriptorSetKHR( @@ -2092,7 +2092,7 @@ void radv_CmdPushDescriptorSetKHR( descriptorWriteCount, pDescriptorWrites, 0, NULL); cmd_buffer->state.descriptors[set] = push_set; - cmd_buffer->state.descriptors_dirty |= (1 << set); + cmd_buffer->state.descriptors_dirty |= (1u << set); cmd_buffer->state.push_descriptors_dirty = true; } @@ -2116,7 +2116,7 @@ void radv_CmdPushDescriptorSetWithTemplateKHR( descriptorUpdateTemplate, pData); cmd_buffer->state.descriptors[set] = push_set; - cmd_buffer->state.descriptors_dirty |= (1 << set); + cmd_buffer->state.descriptors_dirty |= (1u << set); cmd_buffer->state.push_descriptors_dirty = true; } @@ -2207,7 +2207,7 @@ void radv_CmdBindPipeline( for (unsigned i = 0; i < MAX_SETS; i++) { if (cmd_buffer->state.descriptors[i]) - cmd_buffer->state.descriptors_dirty |= (1 << i); + cmd_buffer->state.descriptors_dirty |= (1u << i); } switch (pipelineBindPoint) { diff --git a/src/amd/vulkan/radv_descriptor_set.h b/src/amd/vulkan/radv_descriptor_set.h index a9f4bc6497e..a90eb5c3076 100644 --- a/src/amd/vulkan/radv_descriptor_set.h +++ b/src/amd/vulkan/radv_descriptor_set.h @@ -26,7 +26,7 @@ #include -#define MAX_SETS 8 +#define MAX_SETS 32 struct radv_descriptor_set_binding_layout { VkDescriptorType type;