[Mesa-dev] [PATCH 9/9] radv: add support for 32 descriptor sets.
Dave Airlie
airlied at gmail.com
Tue Apr 18 03:57:12 UTC 2017
From: Dave Airlie <airlied at redhat.com>
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.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_cmd_buffer.c | 12 ++++++------
src/amd/vulkan/radv_descriptor_set.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 31543ef..86b0262 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 a9f4bc6..a90eb5c 100644
--- a/src/amd/vulkan/radv_descriptor_set.h
+++ b/src/amd/vulkan/radv_descriptor_set.h
@@ -26,7 +26,7 @@
#include <vulkan/vulkan.h>
-#define MAX_SETS 8
+#define MAX_SETS 32
struct radv_descriptor_set_binding_layout {
VkDescriptorType type;
--
2.9.3
More information about the mesa-dev
mailing list