From 6bdb1216252d7918c6d5f99c4584663e0969e1f5 Mon Sep 17 00:00:00 2001 From: MaranBr Date: Thu, 13 Nov 2025 11:08:37 -0400 Subject: [PATCH] Fix conflicts --- .../renderer_vulkan/vk_graphics_pipeline.h | 3 +- .../renderer_vulkan/vk_rasterizer.cpp | 57 +++++++++---------- 2 files changed, 27 insertions(+), 33 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h index 650c8e07ed..7e9dbb583a 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h @@ -80,8 +80,7 @@ public: PipelineStatistics* pipeline_statistics, RenderPassCache& render_pass_cache, const GraphicsPipelineCacheKey& key, std::array stages, const std::array& infos); - // True if this pipeline was created with VK_DYNAMIC_STATE_VERTEX_INPUT_EXT - bool HasDynamicVertexInput() const noexcept { return key.state.dynamic_vertex_input; } + GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = delete; GraphicsPipeline(GraphicsPipeline&&) noexcept = delete; diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index e9f2902e81..d1963329d0 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -984,11 +984,11 @@ void RasterizerVulkan::UpdateDynamicStates() { 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(!has_float); - } + } UpdateLogicOpEnable(regs); } else { UpdateLogicOpEnable(regs); - } + } UpdateDepthClampEnable(regs); UpdateLineStippleEnable(regs); UpdateConservativeRasterizationMode(regs); @@ -1002,9 +1002,7 @@ void RasterizerVulkan::UpdateDynamicStates() { } } if (device.IsExtVertexInputDynamicStateSupported() && dynamic_state > 2) { - if (auto* gp = pipeline_cache.CurrentGraphicsPipeline(); gp && gp->HasDynamicVertexInput()) { - UpdateVertexInput(regs); - } + UpdateVertexInput(regs); } } @@ -1031,18 +1029,16 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg return; } if (!regs.viewport_scale_offset_enabled) { - float x = static_cast(regs.surface_clip.x); - float y = static_cast(regs.surface_clip.y); - float width = static_cast(regs.surface_clip.width); - float height = static_cast(regs.surface_clip.height); - - const bool lower_left = - regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft; - if (lower_left) { - // Vulkan viewport space is top-left; emulate lower-left with negative height. - y += height; - height = -height; - } + float x = static_cast(regs.surface_clip.x); + float y = static_cast(regs.surface_clip.y); + float width = static_cast(regs.surface_clip.width); + float height = static_cast(regs.surface_clip.height); + const bool lower_left = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft; + if (lower_left) { + // Vulkan viewport space is top-left; emulate lower-left with negative height. + y += height; + height = -height; + } VkViewport viewport{ .x = x, .y = y, @@ -1078,20 +1074,19 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs return; } if (!regs.viewport_scale_offset_enabled) { - u32 x = regs.surface_clip.x; - u32 y = regs.surface_clip.y; - u32 width = regs.surface_clip.width ? regs.surface_clip.width : 1u; - u32 height = regs.surface_clip.height ? regs.surface_clip.height : 1u; - - if (regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft) { - // Vulkan scissor is top-left; convert from lower-left coordinates. - y = regs.surface_clip.height - (y + height); - } - VkRect2D scissor{}; - scissor.offset.x = static_cast(x); - scissor.offset.y = static_cast(y); - scissor.extent.width = width; - scissor.extent.height = height; + u32 x = regs.surface_clip.x; + u32 y = regs.surface_clip.y; + u32 width = regs.surface_clip.width ? regs.surface_clip.width : 1u; + u32 height = regs.surface_clip.height ? regs.surface_clip.height : 1u; + if (regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft) { + // Vulkan scissor is top-left; convert from lower-left coordinates. + y = regs.surface_clip.height - (y + height); + } + VkRect2D scissor{}; + scissor.offset.x = static_cast(x); + scissor.offset.y = static_cast(y); + scissor.extent.width = width; + scissor.extent.height = height; scheduler.Record([scissor](vk::CommandBuffer cmdbuf) { cmdbuf.SetScissor(0, scissor); }); return; }