-
-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PromoteFormatToDepth #1997
Fix PromoteFormatToDepth #1997
Conversation
shad_log.txt |
This is because you have to add each texture format needed. |
shad_log.txt |
Sorry, I forgot to change a line. |
It now goes ingame! |
Thanks! I added the necessary Depht Format. If you have other games with this error, feel free to send more logs. |
Yakuza 0 doesn't crash anymore with promoteformatdepth with this PR 👍 |
I crashed on this assert in Bloodborne earlier today, while falling off a cliff in the forbidden forest, specifically with that Also would it make sense to add that log statement just before the |
Have you tried with the PR build or the zip file build? |
It doesn't affect performance. Thanks for the idea! [Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xe08b6588 |
} else if (fmt == vk::Format::eR8G8B8A8Srgb) { | ||
return vk::Format::eR32Uint; | ||
} else { | ||
LOG_ERROR(Render_Vulkan, "Unexpected Depth Format {}", vk::to_string(fmt)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need a separate log line for this, you can just chnage the unreachable below to UNREACHABLE_MSG("Unexpected Depth Format {}", vk::to_string(fmt));
I don't think this is actually correct, for one |
@squidbus Do you think I can use D32Sfloat because it is made for that right? |
That solves the depth format issue but it still needs to be verified that interpreting it this way is the correct thing to do here. |
0ca3902
to
076bd74
Compare
How can I know if this is correct? By testing, documentation, or something else? |
Well one way could be to find the draws using this in a RenderDoc capture and see if they're working correctly. |
This PR takes over #2032. |
Adding to image_view.cpp line 43:
LOG_ERROR(Render_Vulkan, "Depht Format {}", vk::to_string(format));
And to image_info.cpp line 315:
LOG_ERROR(Render_Vulkan, "Depht Format {}", vk::to_string(pixel_format));
When I launched a Unity game that had this error (Pure Farming 2018), the log showed me that R8G8B8A8Unorm was needed. I added it to
liverpool_to_vk.h
and log changed.Before:
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xe08b6588
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x7beef78d
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xb9c471f8c7cc37ff
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x54cd30c3f090d822
[Render.Vulkan] sampler.cpp:Sampler:14: Texture requires gamma correction
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x4ae148a6c30c94ab
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0xa3590771bc26c480
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x4364ba6b95ea889c
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x616f852af090d822
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xc01241ce766d0a0f
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x8b450099f090d822
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xc3bff6e3b6212b64
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x812ec1a2f090d822
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x812ec1a2f090d822
[Debug] liverpool_to_vk.h:PromoteFormatToDepth:82: Unreachable code!
After:
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xe08b6588
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x7beef78d
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xb9c471f8c7cc37ff
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x54cd30c3f090d822
[Render.Vulkan] sampler.cpp:Sampler:14: Texture requires gamma correction
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x4ae148a6c30c94ab
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0xa3590771bc26c480
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x4364ba6b95ea889c
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x616f852af090d822
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xc01241ce766d0a0f
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x8b450099f090d822
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0xc3bff6e3b6212b64
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x812ec1a2f090d822
<941 shader compilation (I wasn't going to copy everything.)>
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling vs shader 0x3192b094029c07d4
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x86479a572b36012
[Render.Vulkan] vk_pipeline_cache.cpp:CompileModule:478: Compiling fs shader 0x86479a572b36012
[Debug] resource_tracking_pass.cpp:operator():326: Assertion Failed!
If interested:
Log Before (Main):
shad_log.txt
Log After (My PR):
shad_log.txt
I made it return R32Uint because I was inspired by
tile_manager.cpp
which returns R32Uint to R8G8B8A8Unorm.Always ready for modifications or testing!