diff options
| author | Aleksandr Popovich <alekpopo@pm.me> | 2025-05-17 20:22:25 +0000 |
|---|---|---|
| committer | CamilleLaVey <camillelavey@noreply.localhost> | 2025-05-17 20:22:25 +0000 |
| commit | 049cc54f4c3c1c4c38f4b308fca37e507a32f35f (patch) | |
| tree | 05dcf907f7f456cc632397346542640cb554d6b5 /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
| parent | 9d7075254d9ce70f75eed5b9709504cf0d3cc0bc (diff) | |
fixes vulkan issues and android settings (#105)
- removes provoking vertex, vertex input, dynamic state if not supported
- moves dynamic state to be a 0-3 slider and vertex input its own checkbox
- the rich presence was disabled on linux.
- there were duplicate settings in "edens veil"?
- weird behavior of the vertex input checkbox on per game setting
- adds xenoblade 2 to the d24 conversion control function
- adds the flush logs by line setting to android.
- adds the memory layout setting to android
- Adds the option to show building shaders on the android overlay.
Signed-off-by: Aleksandr Popovich <alekpopo@pm.me>
Co-authored-by: swurl <swurl@swurl.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/105
Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Co-committed-by: Aleksandr Popovich <alekpopo@pm.me>
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index d0cff37f61..62c057bfb4 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -952,28 +952,28 @@ void RasterizerVulkan::UpdateDynamicStates() { UpdateDepthBiasEnable(regs); } if (device.IsExtExtendedDynamicState3EnablesSupported()) { - using namespace Tegra::Engines;
-
- if (device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_OPEN_SOURCE
- || device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_PROPRIETARY) {
- struct In {
- const Maxwell3D::Regs::VertexAttribute::Type d;
- In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {}
- bool operator()(Maxwell3D::Regs::VertexAttribute n) const {
- return n.type == d;
- }
- };
-
- auto has_float = std::any_of(
- regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(),
- In(Maxwell3D::Regs::VertexAttribute::Type::Float));
-
- if (regs.logic_op.enable)
- regs.logic_op.enable = static_cast<u32>(!has_float);
-
- UpdateLogicOpEnable(regs);
- } else
- UpdateLogicOpEnable(regs);
+ using namespace Tegra::Engines; + + if (device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_OPEN_SOURCE + || device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_PROPRIETARY) { + struct In { + const Maxwell3D::Regs::VertexAttribute::Type d; + In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {} + bool operator()(Maxwell3D::Regs::VertexAttribute n) const { + return n.type == d; + } + }; + + auto has_float = std::any_of( + regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(), + In(Maxwell3D::Regs::VertexAttribute::Type::Float)); + + if (regs.logic_op.enable) + regs.logic_op.enable = static_cast<u32>(!has_float); + + UpdateLogicOpEnable(regs); + } else + UpdateLogicOpEnable(regs); UpdateDepthClampEnable(regs); } } @@ -1103,12 +1103,21 @@ void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs) { regs.zeta.format == Tegra::DepthFormat::X8Z24_UNORM || regs.zeta.format == Tegra::DepthFormat::S8Z24_UNORM || regs.zeta.format == Tegra::DepthFormat::V8Z24_UNORM; - if (is_d24 && !device.SupportsD24DepthBuffer() && program_id == 0x1006A800016E000ULL) { - // Only activate this in Super Smash Brothers Ultimate + + size_t length = sizeof(NEEDS_D24) / sizeof(u64); + bool needs_convert = false; + for (size_t i = 0; i < length; ++i) { + if (NEEDS_D24[i] == program_id) { + needs_convert = true; + break; + } + } + + if (is_d24 && !device.SupportsD24DepthBuffer() && needs_convert) { // the base formulas can be obtained from here: // https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-output-merger-stage-depth-bias - const double rescale_factor = - static_cast<double>(1ULL << (32 - 24)) / (static_cast<double>(0x1.ep+127)); + const double rescale_factor = static_cast<double>(1ULL << (32 - 24)) + / (static_cast<double>(0x1.ep+127)); units = static_cast<float>(static_cast<double>(units) * rescale_factor); } scheduler.Record([constant = units, clamp = regs.depth_bias_clamp, |
