aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Ashton <[email protected]>2020-05-04 13:36:41 +0100
committerMarge Bot <[email protected]>2020-05-05 00:28:00 +0000
commit785803a2e5472bb497a598643b2386c60c60347e (patch)
tree1d84d28c1163e3bb6f38734736ebd0cda09b2916
parent24f9aea770711c8b968177b6e4ff15d8fb8fb48e (diff)
turnip: Remove RANGE_SIZE usage
These were removed from the latest Vulkan headers https://github.com/KhronosGroup/Vulkan-Docs/issues/1230 Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4878>
-rw-r--r--src/freedreno/vulkan/tu_cmd_buffer.c4
-rw-r--r--src/freedreno/vulkan/tu_private.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index 7dc99b6ceb2..fb57b97e34a 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -1586,7 +1586,7 @@ tu_cmd_buffer_destroy(struct tu_cmd_buffer *cmd_buffer)
list_del(&cmd_buffer->pool_link);
- for (unsigned i = 0; i < VK_PIPELINE_BIND_POINT_RANGE_SIZE; i++)
+ for (unsigned i = 0; i < MAX_BIND_POINTS; i++)
free(cmd_buffer->descriptors[i].push_set.set.mapped_ptr);
tu_cs_finish(&cmd_buffer->cs);
@@ -1611,7 +1611,7 @@ tu_reset_cmd_buffer(struct tu_cmd_buffer *cmd_buffer)
tu_cs_reset(&cmd_buffer->draw_epilogue_cs);
tu_cs_reset(&cmd_buffer->sub_cs);
- for (unsigned i = 0; i < VK_PIPELINE_BIND_POINT_RANGE_SIZE; i++) {
+ for (unsigned i = 0; i < MAX_BIND_POINTS; i++) {
cmd_buffer->descriptors[i].valid = 0;
cmd_buffer->descriptors[i].push_dirty = false;
}
diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h
index 35690afbede..99da10a568b 100644
--- a/src/freedreno/vulkan/tu_private.h
+++ b/src/freedreno/vulkan/tu_private.h
@@ -96,6 +96,7 @@ typedef uint32_t xcb_window_t;
#define NUM_META_FS_KEYS 13
#define TU_MAX_DRM_DEVICES 8
#define MAX_VIEWS 8
+#define MAX_BIND_POINTS 2 /* compute + graphics */
/* The Qualcomm driver exposes 0x20000058 */
#define MAX_STORAGE_BUFFER_RANGE 0x20000000
/* We use ldc for uniform buffer loads, just like the Qualcomm driver, so
@@ -1011,7 +1012,7 @@ struct tu_cmd_buffer
VkShaderStageFlags push_constant_stages;
struct tu_descriptor_set meta_push_descriptors;
- struct tu_descriptor_state descriptors[VK_PIPELINE_BIND_POINT_RANGE_SIZE];
+ struct tu_descriptor_state descriptors[MAX_BIND_POINTS];
struct tu_cmd_buffer_upload upload;