diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index ee35dc1e52..e6fc5c5639 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -201,7 +201,7 @@ if(WIN32) # I'm not sure we need all of these libs, but we link them in vs else() target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib) endif() - target_link_libraries(rpcs3 asmjit.lib avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS} ${vulkan} ${glslang} ${OSDependent} ${OGLCompiler} ${SPIRV}) + target_link_libraries(rpcs3 asmjit.lib avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS} VKstatic.1 glslang OSDependent OGLCompiler SPIRV) else() if(LLVM_FOUND) target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES}) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 2cd6b87bb7..ac557a5ebb 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -93,7 +93,7 @@ namespace vk switch (format) { case rsx::surface_depth_format::z16: return VK_FORMAT_D16_UNORM; - case rsx::surface_depth_format::z24s8: return VK_FORMAT_D16_UNORM; + case rsx::surface_depth_format::z24s8: return VK_FORMAT_D16_UNORM_S8_UINT; //Cant get D24_S8 to work on AMD (beta 5) } throw EXCEPTION("Invalid format (0x%x)", format); } @@ -626,9 +626,9 @@ void VKGSRender::init_render_pass(VkFormat surface_format, VkFormat depth_format attachments[0].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; //PRESENT_SRC_KHR?? attachments[0].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; - attachments[1].format = VK_FORMAT_D16_UNORM; /* Depth buffer format. Should be more elegant than this */ + attachments[1].format = depth_format; /* Depth buffer format. Should be more elegant than this */ attachments[1].samples = VK_SAMPLE_COUNT_1_BIT; - attachments[1].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD; + attachments[1].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[1].storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; attachments[1].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[1].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; diff --git a/rpcs3/Emu/RSX/VK/VKRenderTargets.h b/rpcs3/Emu/RSX/VK/VKRenderTargets.h index ef877b0052..4df472990e 100644 --- a/rpcs3/Emu/RSX/VK/VKRenderTargets.h +++ b/rpcs3/Emu/RSX/VK/VKRenderTargets.h @@ -54,7 +54,7 @@ namespace rsx range.layerCount = 1; range.levelCount = 1; - if (format == surface_depth_format::z24s8) + if (requested_format != VK_FORMAT_D16_UNORM) range.aspectMask |= VK_IMAGE_ASPECT_STENCIL_BIT; clear_depth.depth = 1.f; diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index 5a14627c5c..9fe0bc4db8 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -178,7 +178,7 @@ namespace vk if (usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) { - view_info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT/* | VK_IMAGE_ASPECT_STENCIL_BIT*/; + view_info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT; m_image_aspect = VK_IMAGE_ASPECT_DEPTH_BIT; }