From 1a2dadcb2eb3313e9ce1f1547137f0f3b92adac9 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Sun, 15 Feb 2026 22:15:58 -0400 Subject: [PATCH] [vulkan] Unique representation logic fix. --- .../renderer_vulkan/fixed_pipeline_state.cpp | 7 ------- src/video_core/renderer_vulkan/fixed_pipeline_state.h | 7 ------- .../renderer_vulkan/vk_graphics_pipeline.cpp | 11 ++++------- src/video_core/vulkan_common/vulkan_device.h | 1 + 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp index fe6730bd13..b07f5927b3 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp @@ -127,13 +127,6 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d, DynamicFe depth_bounds_min = static_cast(regs.depth_bounds[0]); depth_bounds_max = static_cast(regs.depth_bounds[1]); - depth_bias = std::bit_cast(regs.depth_bias); - depth_bias_clamp = std::bit_cast(regs.depth_bias_clamp); - slope_scale_depth_bias = std::bit_cast(regs.slope_scale_depth_bias); - - line_width_smooth = std::bit_cast(regs.line_width_smooth); - line_width_aliased = std::bit_cast(regs.line_width_aliased); - line_stipple_factor = regs.line_stipple_params.factor; line_stipple_pattern = regs.line_stipple_params.pattern; diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.h b/src/video_core/renderer_vulkan/fixed_pipeline_state.h index efe4e57960..030c62a883 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.h +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.h @@ -236,13 +236,6 @@ struct FixedPipelineState { u32 depth_bounds_min; u32 depth_bounds_max; - u32 depth_bias; - u32 depth_bias_clamp; - u32 slope_scale_depth_bias; - - u32 line_width_smooth; - u32 line_width_aliased; - u32 line_stipple_factor; u32 line_stipple_pattern; diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index f3b8ae490d..2ac95150de 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -5,7 +5,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include -#include #include #include @@ -708,12 +707,10 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { dynamic.cull_enable ? MaxwellToVK::CullFace(dynamic.CullFace()) : VK_CULL_MODE_NONE), .frontFace = MaxwellToVK::FrontFace(dynamic.FrontFace()), .depthBiasEnable = (dynamic.depth_bias_enable != 0 ? VK_TRUE : VK_FALSE), - .depthBiasConstantFactor = std::bit_cast(key.state.depth_bias) / 2.0f, - .depthBiasClamp = std::bit_cast(key.state.depth_bias_clamp), - .depthBiasSlopeFactor = std::bit_cast(key.state.slope_scale_depth_bias), - .lineWidth = key.state.smooth_lines != 0 - ? std::bit_cast(key.state.line_width_smooth) - : std::bit_cast(key.state.line_width_aliased), + .depthBiasConstantFactor = 0.0f, + .depthBiasClamp = 0.0f, + .depthBiasSlopeFactor = 0.0f, + .lineWidth = 1.0f, }; const bool line_rasterization_supported = device.IsExtLineRasterizationSupported(); const bool any_stippled_lines_supported = diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 884f8c3b12..d52b8aafc4 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -48,6 +48,7 @@ VK_DEFINE_HANDLE(VmaAllocator) // Define all features which may be used by the implementation and require an extension here. #define FOR_EACH_VK_FEATURE_EXT(FEATURE) \ + FEATURE(EXT, ConditionalRendering, CONDITIONAL_RENDERING, conditional_rendering) \ FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \ FEATURE(EXT, DepthBiasControl, DEPTH_BIAS_CONTROL, depth_bias_control) \ FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \