radv: add support for 32 descriptor sets.
authorDave Airlie <airlied@redhat.com>
Tue, 18 Apr 2017 03:22:32 +0000 (13:22 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 18 Apr 2017 23:00:43 +0000 (09:00 +1000)
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 <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_descriptor_set.h

index d95daff2c791db7191796ebc7b08cfc3b7b33164..8877f20b9ea7c3bf4c710c1648246a21095db2ee 100644 (file)
@@ -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) {
index a9f4bc6497e8899fd584c450bcbf25d087822e3f..a90eb5c307634348f46be213a1d632f358375b36 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <vulkan/vulkan.h>
 
-#define MAX_SETS         8
+#define MAX_SETS         32
 
 struct radv_descriptor_set_binding_layout {
    VkDescriptorType type;