From 785803a2e5472bb497a598643b2386c60c60347e Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 4 May 2020 13:36:41 +0100 Subject: [PATCH] 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 Reviewed-by: Jason Ekstrand Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 4 ++-- src/freedreno/vulkan/tu_private.h | 3 ++- 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; -- 2.30.2