From e418bbcfac74230dfbf0c49b72c4f059cb1afc00 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Fri, 14 Mar 2025 11:05:32 +0100 Subject: [PATCH] tests: Mark a test about resource aliasing as todo on MoltenVK. As far as I know there is no way to implement this properly on Vulkan, and all the other Vulkan implementations essentially work by luck. In Vulkan the initial layout of a resource must always be UNDEFINED or PREINITIALIZED and it must be transitioned away from before any meaningful use of that image is done. Therefore it's possible to alias two images and let the second one inherit the content in the first one only if both already exist (and are in the same layout) before the first writing is done. If, as in this example, the second image is created after the first one has already been written to, the obligatory transition away from UNDEFINED or PREINITIALIZED will potentially wipe out the content. Therefore I am marking this as todo, not as a bug. I might also be that there is a bug in MoltenVK, and ultimately that's the reason why we're reading invalid data, but technically the Vulkan commands we generate are incorrect anyway. --- tests/d3d12.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index a76ff725..edcaee53 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -32900,6 +32900,7 @@ static void test_64kb_texture_alignment(void) transition_resource_state(command_list, textures[1], D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_COPY_SOURCE); get_resource_readback_with_command_list(textures[1], 0, &rb, queue, command_list); + todo_if(is_mvk_device(device)) check_readback_data_uint(&rb.rb, &box, 0xdeadbeef, 0); release_resource_readback(&rb);