From 33051f1eb42cd23a0a7c0dc37d2fb468c4578a13 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Thu, 6 Apr 2023 12:39:08 -0700 Subject: [PATCH] dzn: Early-out on no-op barriers Part-of: --- src/microsoft/ci/warp-fails.txt | 6 ------ src/microsoft/vulkan/dzn_cmd_buffer.c | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/microsoft/ci/warp-fails.txt b/src/microsoft/ci/warp-fails.txt index d538908..d368f4c 100644 --- a/src/microsoft/ci/warp-fails.txt +++ b/src/microsoft/ci/warp-fails.txt @@ -620,12 +620,6 @@ dEQP-VK.image.texel_view_compatible.graphic.extended.3d_image.texture_read.bc6h_ dEQP-VK.image.texel_view_compatible.graphic.extended.3d_image.texture_read.bc6h_ufloat_block.r32g32b32a32_uint,Fail dEQP-VK.image.texel_view_compatible.graphic.extended.3d_image.texture_read.bc7_unorm_block.r32g32b32a32_sint,Fail -# I don't see this locally, probably because I have a newer D3D that removed some bad barrier validation -dEQP-VK.image.depth_stencil_descriptor.depth_read_only_optimal.d32_sfloat.depth_att_stencil_none,Crash -dEQP-VK.image.depth_stencil_descriptor.depth_read_only_optimal.d16_unorm.depth_att_stencil_none,Crash -dEQP-VK.image.depth_stencil_descriptor.depth_read_only_optimal.x8_d24_unorm_pack32.depth_att_stencil_none,Crash -dEQP-VK.image.depth_stencil_descriptor.depth_read_only_stencil_attachment_optimal.d24_unorm_s8_uint.depth_att_stencil_rw,Crash - # This is due to pretending to resolve stencil sample 0 using min # This needs to be a blit shader instead, but that runs into problems since shader stencil export is optional dEQP-VK.imageless_framebuffer.depth_stencil_resolve,Fail diff --git a/src/microsoft/vulkan/dzn_cmd_buffer.c b/src/microsoft/vulkan/dzn_cmd_buffer.c index 90f0065..a87e3fa 100644 --- a/src/microsoft/vulkan/dzn_cmd_buffer.c +++ b/src/microsoft/vulkan/dzn_cmd_buffer.c @@ -1491,6 +1491,9 @@ dzn_CmdPipelineBarrier2_enhanced(VkCommandBuffer commandBuffer, VK_MULTIALLOC_DECL(&ma, D3D12_BUFFER_BARRIER, buffer_barriers, num_buffer_barriers); VK_MULTIALLOC_DECL(&ma, D3D12_TEXTURE_BARRIER, texture_barriers, num_image_barriers); + if (ma.size == 0) + return; + if (!vk_multialloc_alloc(&ma, &cmdbuf->vk.pool->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)) { vk_command_buffer_set_error(&cmdbuf->vk, VK_ERROR_OUT_OF_HOST_MEMORY); -- 2.7.4