diff --git a/src/venus/vkr_common.h b/src/venus/vkr_common.h index 7793481..9137245 100644 --- a/src/venus/vkr_common.h +++ b/src/venus/vkr_common.h @@ -74,11 +74,8 @@ #define DESTROY_OBJECT(obj, vkr_type, vk_obj, vk_cmd, vk_arg) \ struct vkr_##vkr_type *obj = (struct vkr_##vkr_type *)(uintptr_t)args->vk_arg; \ - if (!obj || obj->base.type != VK_OBJECT_TYPE_##vk_obj) { \ - if (obj) \ - vkr_cs_decoder_set_fatal(&ctx->decoder); \ + if (!obj) \ return; \ - } \ \ vn_replace_##vk_cmd##_args_handle(args); \ vk_cmd(args->device, args->vk_arg, NULL); \ @@ -92,7 +89,7 @@ \ struct vkr_##vkr_pool_type *pool = \ (struct vkr_##vkr_pool_type *)(uintptr_t)args->pAllocateInfo->arg_pool; \ - if (!pool || pool->base.type != VK_OBJECT_TYPE_##vk_pool_type) { \ + if (!pool) { \ vkr_cs_decoder_set_fatal(&ctx->decoder); \ return; \ } \ @@ -137,10 +134,6 @@ struct vkr_##vkr_type *obj = (struct vkr_##vkr_type *)args->arg_obj[i]; \ if (!obj) \ continue; \ - if (obj->base.type != VK_OBJECT_TYPE_##vk_type) { \ - vkr_cs_decoder_set_fatal(&ctx->decoder); \ - return; \ - } \ \ list_del(&obj->base.track_head); \ list_addtail(&obj->base.track_head, &free_list); \ diff --git a/src/venus/vkr_descriptor_set.c b/src/venus/vkr_descriptor_set.c index f660538..3790a90 100644 --- a/src/venus/vkr_descriptor_set.c +++ b/src/venus/vkr_descriptor_set.c @@ -83,7 +83,7 @@ vkr_dispatch_vkResetDescriptorPool(struct vn_dispatch_context *dispatch, struct vkr_descriptor_pool *pool = (struct vkr_descriptor_pool *)(uintptr_t)args->descriptorPool; - if (!pool || pool->base.type != VK_OBJECT_TYPE_DESCRIPTOR_POOL) { + if (!pool) { vkr_cs_decoder_set_fatal(&ctx->decoder); return; } diff --git a/src/venus/vkr_device_memory.c b/src/venus/vkr_device_memory.c index 3707695..fe0c67e 100644 --- a/src/venus/vkr_device_memory.c +++ b/src/venus/vkr_device_memory.c @@ -160,11 +160,8 @@ vkr_dispatch_vkFreeMemory(struct vn_dispatch_context *dispatch, struct vkr_context *ctx = dispatch->data; struct vkr_device_memory *mem = (struct vkr_device_memory *)(uintptr_t)args->memory; - if (!mem || mem->base.type != VK_OBJECT_TYPE_DEVICE_MEMORY) { - if (mem) - vkr_cs_decoder_set_fatal(&ctx->decoder); + if (!mem) return; - } vn_replace_vkFreeMemory_args_handle(args); vkFreeMemory(args->device, args->memory, NULL);