diff --git a/externals/Vulkan-Headers b/externals/Vulkan-Headers index 78c359741..5ceb9ed48 160000 --- a/externals/Vulkan-Headers +++ b/externals/Vulkan-Headers @@ -1 +1 @@ -Subproject commit 78c359741d855213e8685278eb81bb62599f8e56 +Subproject commit 5ceb9ed481e58e705d0d9b5326537daedd06b97d diff --git a/externals/Vulkan-Utility-Libraries b/externals/Vulkan-Utility-Libraries index 0d5b49b80..4ee0833a3 160000 --- a/externals/Vulkan-Utility-Libraries +++ b/externals/Vulkan-Utility-Libraries @@ -1 +1 @@ -Subproject commit 0d5b49b80f17bca25e7f9321ad4e671a56f70887 +Subproject commit 4ee0833a3cdb834aa71c2b77ce5b01235b7b7170 diff --git a/externals/VulkanMemoryAllocator b/externals/VulkanMemoryAllocator index 89d3a6a5e..f378e7b3f 160000 --- a/externals/VulkanMemoryAllocator +++ b/externals/VulkanMemoryAllocator @@ -1 +1 @@ -Subproject commit 89d3a6a5ea35d140fe865ed493c89bde777c6a07 +Subproject commit f378e7b3f18f6e2b06b957f6ba7b1c7207d2a536 diff --git a/externals/vcpkg b/externals/vcpkg index 64f3d3d62..bc994510d 160000 --- a/externals/vcpkg +++ b/externals/vcpkg @@ -1 +1 @@ -Subproject commit 64f3d3d6201d9cea01d15ea6e793daf0bbcd47c7 +Subproject commit bc994510d2eb11aac7b43b03f67a7751d5bfe0e4 diff --git a/src/citron/discord_impl.cpp b/src/citron/discord_impl.cpp index acf803ffb..f8e7d2c2d 100644 --- a/src/citron/discord_impl.cpp +++ b/src/citron/discord_impl.cpp @@ -36,7 +36,7 @@ system_ DiscordEventHandlers handlers {}; // The number is the client ID for citron, it's used for images and the // application name -Discord_Initialize("1322413013248118888", & handlers, 1, nullptr); +Discord_Initialize("1361252452329848892", & handlers, 1, nullptr); } DiscordImpl::~DiscordImpl() { diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3791f7287..cd0b255a0 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -369,9 +369,6 @@ void RasterizerVulkan::Clear(u32 layer_count) { return; } - // Only log the clear depth value - there's no depth or stencil members in ClearSurface - LOG_INFO(Render_Vulkan, "Clear depth value: {}", regs.clear_depth); - std::scoped_lock lock{texture_cache.mutex}; texture_cache.UpdateRenderTargets(true); const Framebuffer* const framebuffer = texture_cache.GetFramebuffer(); @@ -977,8 +974,7 @@ void RasterizerVulkan::UpdateDynamicStates() { bool hasFloat = std::any_of( regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(), [](const auto& attrib) { - return attrib.type == - Tegra::Engines::Maxwell3D::Regs::VertexAttribute::Type::Float; + return attrib.type == Tegra::Engines::Maxwell3D::Regs::VertexAttribute::Type::Float; }); // For AMD drivers, disable logic_op if a float attribute is present. @@ -1290,33 +1286,8 @@ void RasterizerVulkan::UpdateDepthWriteEnable(Tegra::Engines::Maxwell3D::Regs& r if (!state_tracker.TouchDepthWriteEnable()) { return; } - - // Check if we're likely in a reversed depth scenario (clear depth near 0) - const bool likely_reversed_depth = (regs.clear_depth < 0.5f); - - // Get the original depth write enable state - bool depth_write_enable = regs.depth_write_enabled != 0; - bool modified = false; - - // Only force enable depth writes when: - // 1. We're using reversed depth (clear_depth < 0.5) - // 2. Depth testing is enabled - // 3. Original depth writes are disabled - // This selectively fixes the issue without affecting other games - if (likely_reversed_depth && regs.depth_test_enable && !depth_write_enable) { - depth_write_enable = true; - modified = true; - LOG_INFO(Render_Vulkan, "Reversed depth buffer with disabled depth writes detected, " - "enabling depth writes for improved visibility"); - } - - // Log when depth write is being modified - LOG_INFO(Render_Vulkan, "Depth write set to: {} ({}){}", - depth_write_enable ? "enabled" : "disabled", regs.depth_write_enabled ? "1" : "0", - modified ? " -> modified" : ""); - - scheduler.Record([depth_write_enable](vk::CommandBuffer cmdbuf) { - cmdbuf.SetDepthWriteEnableEXT(depth_write_enable); + scheduler.Record([enable = regs.depth_write_enabled](vk::CommandBuffer cmdbuf) { + cmdbuf.SetDepthWriteEnableEXT(enable); }); } @@ -1400,27 +1371,7 @@ void RasterizerVulkan::UpdateDepthCompareOp(Tegra::Engines::Maxwell3D::Regs& reg if (!state_tracker.TouchDepthCompareOp()) { return; } - - // Get the original depth comparison function requested by the game - auto original_func = regs.depth_test_func; - auto func_to_use = original_func; - - // Check for clear depth - we'll use this to determine how to handle depth - const bool likely_reversed_depth = (regs.clear_depth < 0.5f); - - // For reversed depth (clear_depth near 0), ALWAYS use GREATER_OR_EQUAL - // For normal depth (clear_depth near 1), ALWAYS use LESS_OR_EQUAL - if (likely_reversed_depth) { - func_to_use = - Maxwell::ComparisonOp::GreaterEqual_GL; // Maxwell::ComparisonOp::GreaterEqual_GL; - LOG_INFO(Render_Vulkan, - "Reversed depth buffer detected, using GREATER_OR_EQUAL for improved visibility"); - } else { - func_to_use = regs.depth_test_func; - } - - // Use the modified depth comparison function - scheduler.Record([func = func_to_use](vk::CommandBuffer cmdbuf) { + scheduler.Record([func = regs.depth_test_func](vk::CommandBuffer cmdbuf) { cmdbuf.SetDepthCompareOpEXT(MaxwellToVK::ComparisonOp(func)); }); } @@ -1525,38 +1476,13 @@ void RasterizerVulkan::UpdateBlending(Tegra::Engines::Maxwell3D::Regs& regs) { std::array setup_blends{}; for (size_t index = 0; index < Maxwell::NumRenderTargets; index++) { const auto blend_setup = [&](const T& guest_blend) { - // Check if we're likely in a reversed depth scenario (clear depth near 0), - // which would indicate we're in Civilization 7 where models have transparency - // issues - const bool likely_reversed_depth = (regs.clear_depth < 0.5f); - auto& host_blend = setup_blends[index]; - - if (likely_reversed_depth) { - // For reversed depth scenarios (likely Civilization 7), force ONE/ZERO blend - // factors to ensure models render as fully opaque - host_blend.srcColorBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.color_source); - host_blend.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; - host_blend.colorBlendOp = MaxwellToVK::BlendEquation(guest_blend.color_op); - host_blend.srcAlphaBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.alpha_source); - host_blend.dstAlphaBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.alpha_dest); - host_blend.alphaBlendOp = MaxwellToVK::BlendEquation(guest_blend.alpha_op); - } else { - // For normal depth scenarios, use the game's requested blend factors - host_blend.srcColorBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.color_source); - host_blend.dstColorBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.color_dest); - host_blend.colorBlendOp = MaxwellToVK::BlendEquation(guest_blend.color_op); - host_blend.srcAlphaBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.alpha_source); - host_blend.dstAlphaBlendFactor = - MaxwellToVK::BlendFactor(guest_blend.alpha_dest); - host_blend.alphaBlendOp = MaxwellToVK::BlendEquation(guest_blend.alpha_op); - } + host_blend.srcColorBlendFactor = MaxwellToVK::BlendFactor(guest_blend.color_source); + host_blend.dstColorBlendFactor = MaxwellToVK::BlendFactor(guest_blend.color_dest); + host_blend.colorBlendOp = MaxwellToVK::BlendEquation(guest_blend.color_op); + host_blend.srcAlphaBlendFactor = MaxwellToVK::BlendFactor(guest_blend.alpha_source); + host_blend.dstAlphaBlendFactor = MaxwellToVK::BlendFactor(guest_blend.alpha_dest); + host_blend.alphaBlendOp = MaxwellToVK::BlendEquation(guest_blend.alpha_op); }; if (!regs.blend_per_target_enabled) { blend_setup(regs.blend);