From: Jason Ekstrand Date: Thu, 30 Jul 2015 18:34:09 +0000 (-0700) Subject: vk/device: Make BATCH_SIZE a global #define X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c4a2dab7e70481868ef60bfad0946badb9057e0;p=mesa.git vk/device: Make BATCH_SIZE a global #define --- diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index ee7682a5d9a..a12076f790d 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -535,8 +535,6 @@ anv_device_init_border_colors(struct anv_device *device) memcpy(device->border_colors.map, border_colors, sizeof(border_colors)); } -static const uint32_t BATCH_SIZE = 8192; - VkResult anv_CreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, @@ -568,7 +566,7 @@ VkResult anv_CreateDevice( if (device->context_id == -1) goto fail_fd; - anv_bo_pool_init(&device->batch_bo_pool, device, BATCH_SIZE); + anv_bo_pool_init(&device->batch_bo_pool, device, ANV_CMD_BUFFER_BATCH_SIZE); anv_block_pool_init(&device->dynamic_state_block_pool, device, 2048); diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index f3f50002568..0437677de0a 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -690,6 +690,8 @@ struct anv_cmd_state { struct anv_descriptor_set_binding descriptors[MAX_SETS]; }; +#define ANV_CMD_BUFFER_BATCH_SIZE 8192 + struct anv_cmd_buffer { struct anv_device * device;