vkr: remove unneeded param from *_POOL_OBJECTS macros

The first argument is the identifier (e.g., cmd or set) of the object.
Because these macros create multiple objects, it is useless.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
macos/master
Chia-I Wu 3 years ago
parent bc6f87c13c
commit 8d59962251
  1. 4
      src/venus/vkr_command_buffer.c
  2. 6
      src/venus/vkr_common.h
  3. 4
      src/venus/vkr_descriptor_set.c

@ -59,7 +59,7 @@ vkr_dispatch_vkAllocateCommandBuffers(struct vn_dispatch_context *dispatch,
{ {
struct vkr_context *ctx = dispatch->data; struct vkr_context *ctx = dispatch->data;
ALLOCATE_POOL_OBJECTS(cmd, command_buffer, COMMAND_BUFFER, CommandBuffer, ALLOCATE_POOL_OBJECTS(command_buffer, COMMAND_BUFFER, CommandBuffer,
vkAllocateCommandBuffers, commandBufferCount, commandPool, vkAllocateCommandBuffers, commandBufferCount, commandPool,
command_pool, COMMAND_POOL); command_pool, COMMAND_POOL);
} }
@ -70,7 +70,7 @@ vkr_dispatch_vkFreeCommandBuffers(struct vn_dispatch_context *dispatch,
{ {
struct vkr_context *ctx = dispatch->data; struct vkr_context *ctx = dispatch->data;
FREE_POOL_OBJECTS(cmd, command_buffer, COMMAND_BUFFER, vkFreeCommandBuffers, FREE_POOL_OBJECTS(command_buffer, COMMAND_BUFFER, vkFreeCommandBuffers,
pCommandBuffers, commandBufferCount, commandPool); pCommandBuffers, commandBufferCount, commandPool);
} }

@ -87,8 +87,8 @@
\ \
list_del(&obj->base.track_head) list_del(&obj->base.track_head)
#define ALLOCATE_POOL_OBJECTS(obj, vkr_type, vk_type, vk_obj, vk_cmd, arg_count, \ #define ALLOCATE_POOL_OBJECTS(vkr_type, vk_type, vk_obj, vk_cmd, arg_count, arg_pool, \
arg_pool, vkr_pool_type, vk_pool_type) \ vkr_pool_type, vk_pool_type) \
do { \ do { \
struct vkr_device *dev = (struct vkr_device *)args->device; \ struct vkr_device *dev = (struct vkr_device *)args->device; \
if (!dev || dev->base.type != VK_OBJECT_TYPE_DEVICE) { \ if (!dev || dev->base.type != VK_OBJECT_TYPE_DEVICE) { \
@ -141,7 +141,7 @@
util_hash_table_remove_u64(ctx->object_table, obj->id); \ util_hash_table_remove_u64(ctx->object_table, obj->id); \
} while (0) } while (0)
#define FREE_POOL_OBJECTS(obj, vkr_type, vk_type, vk_cmd, arg_obj, arg_count, arg_pool) \ #define FREE_POOL_OBJECTS(vkr_type, vk_type, vk_cmd, arg_obj, arg_count, arg_pool) \
do { \ do { \
struct list_head free_list; \ struct list_head free_list; \
\ \

@ -103,7 +103,7 @@ vkr_dispatch_vkAllocateDescriptorSets(struct vn_dispatch_context *dispatch,
{ {
struct vkr_context *ctx = dispatch->data; struct vkr_context *ctx = dispatch->data;
ALLOCATE_POOL_OBJECTS(set, descriptor_set, DESCRIPTOR_SET, DescriptorSet, ALLOCATE_POOL_OBJECTS(descriptor_set, DESCRIPTOR_SET, DescriptorSet,
vkAllocateDescriptorSets, descriptorSetCount, descriptorPool, vkAllocateDescriptorSets, descriptorSetCount, descriptorPool,
descriptor_pool, DESCRIPTOR_POOL); descriptor_pool, DESCRIPTOR_POOL);
} }
@ -114,7 +114,7 @@ vkr_dispatch_vkFreeDescriptorSets(struct vn_dispatch_context *dispatch,
{ {
struct vkr_context *ctx = dispatch->data; struct vkr_context *ctx = dispatch->data;
FREE_POOL_OBJECTS(set, descriptor_set, DESCRIPTOR_SET, vkFreeDescriptorSets, FREE_POOL_OBJECTS(descriptor_set, DESCRIPTOR_SET, vkFreeDescriptorSets,
pDescriptorSets, descriptorSetCount, descriptorPool); pDescriptorSets, descriptorSetCount, descriptorPool);
args->ret = VK_SUCCESS; args->ret = VK_SUCCESS;

Loading…
Cancel
Save