diff --git a/Common/GPU/Vulkan/VulkanContext.cpp b/Common/GPU/Vulkan/VulkanContext.cpp index 7511906219..dc6d6600a2 100644 --- a/Common/GPU/Vulkan/VulkanContext.cpp +++ b/Common/GPU/Vulkan/VulkanContext.cpp @@ -574,7 +574,6 @@ void VulkanContext::ChooseDevice(int physical_device) { deviceFeatures_.enabled = {}; // Enable a few safe ones if they are available. deviceFeatures_.enabled.dualSrcBlend = deviceFeatures_.available.dualSrcBlend; - deviceFeatures_.enabled.wideLines = deviceFeatures_.available.wideLines; deviceFeatures_.enabled.logicOp = deviceFeatures_.available.logicOp; deviceFeatures_.enabled.depthClamp = deviceFeatures_.available.depthClamp; deviceFeatures_.enabled.depthBounds = deviceFeatures_.available.depthBounds; diff --git a/Common/GPU/Vulkan/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp index d0aeb9dcbc..45f1eef7a0 100644 --- a/Common/GPU/Vulkan/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -1456,7 +1456,6 @@ std::vector VKContext::GetFeatureList() const { AddFeature(features, "depthBounds", available.depthBounds, enabled.depthBounds); AddFeature(features, "depthClamp", available.depthClamp, enabled.depthClamp); AddFeature(features, "fillModeNonSolid", available.fillModeNonSolid, enabled.fillModeNonSolid); - AddFeature(features, "wideLines", available.wideLines, enabled.wideLines); AddFeature(features, "pipelineStatisticsQuery", available.pipelineStatisticsQuery, enabled.pipelineStatisticsQuery); AddFeature(features, "samplerAnisotropy", available.samplerAnisotropy, enabled.samplerAnisotropy); AddFeature(features, "textureCompressionBC", available.textureCompressionBC, enabled.textureCompressionBC); diff --git a/GPU/GPUState.h b/GPU/GPUState.h index af80811cb5..e91be6d1ab 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -471,7 +471,6 @@ enum { GPU_SUPPORTS_BLEND_MINMAX = FLAG_BIT(4), GPU_SUPPORTS_LOGIC_OP = FLAG_BIT(5), GPU_USE_DEPTH_RANGE_HACK = FLAG_BIT(6), - GPU_SUPPORTS_WIDE_LINES = FLAG_BIT(7), GPU_SUPPORTS_ANISOTROPY = FLAG_BIT(8), GPU_USE_CLEAR_RAM_HACK = FLAG_BIT(9), GPU_SUPPORTS_INSTANCE_RENDERING = FLAG_BIT(10), diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index c8a3e3306d..6fdbdb0ac5 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -353,10 +353,6 @@ void DrawEngineVulkan::DecodeVertsToPushBuffer(VulkanPushBuffer *push, uint32_t DecodeVerts(dest); } -void DrawEngineVulkan::SetLineWidth(float lineWidth) { - pipelineManager_->SetLineWidth(lineWidth); -} - VkResult DrawEngineVulkan::RecreateDescriptorPool(FrameData &frame, int newSize) { // Reallocate this desc pool larger, and "wipe" the cache. We might lose a tiny bit of descriptor set reuse but // only for this frame. diff --git a/GPU/Vulkan/DrawEngineVulkan.h b/GPU/Vulkan/DrawEngineVulkan.h index d72e852cc7..1507aaffce 100644 --- a/GPU/Vulkan/DrawEngineVulkan.h +++ b/GPU/Vulkan/DrawEngineVulkan.h @@ -186,7 +186,6 @@ public: return stats_; } - void SetLineWidth(float lineWidth); void SetDepalTexture(VkImageView depal) { if (boundDepal_ != depal) { boundDepal_ = depal; diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index 134f7c989b..c8184315ee 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -96,9 +96,6 @@ GPU_Vulkan::GPU_Vulkan(GraphicsContext *gfxCtx, Draw::DrawContext *draw) UpdateVsyncInterval(true); textureCacheVulkan_->NotifyConfigChanged(); - if (vulkan_->GetDeviceFeatures().enabled.wideLines) { - drawEngine_.SetLineWidth(PSP_CoreParameter().renderWidth / 480.0f); - } // Load shader cache. std::string discID = g_paramSFO.GetDiscID(); @@ -231,9 +228,6 @@ void GPU_Vulkan::CheckGPUFeatures() { } auto &enabledFeatures = vulkan_->GetDeviceFeatures().enabled; - if (enabledFeatures.wideLines) { - features |= GPU_SUPPORTS_WIDE_LINES; - } if (enabledFeatures.depthClamp) { features |= GPU_SUPPORTS_DEPTH_CLAMP; } @@ -308,9 +302,6 @@ void GPU_Vulkan::BeginHostFrame() { framebufferManager_->Resized(); drawEngine_.Resized(); textureCacheVulkan_->NotifyConfigChanged(); - if (vulkan_->GetDeviceFeatures().enabled.wideLines) { - drawEngine_.SetLineWidth(PSP_CoreParameter().renderWidth / 480.0f); - } resized_ = false; } @@ -378,7 +369,6 @@ void GPU_Vulkan::BuildReportingInfo() { CHECK_BOOL_FEATURE(depthBiasClamp); CHECK_BOOL_FEATURE(fillModeNonSolid); CHECK_BOOL_FEATURE(depthBounds); - CHECK_BOOL_FEATURE(wideLines); CHECK_BOOL_FEATURE(alphaToOne); CHECK_BOOL_FEATURE(multiViewport); CHECK_BOOL_FEATURE(samplerAnisotropy); diff --git a/GPU/Vulkan/PipelineManagerVulkan.cpp b/GPU/Vulkan/PipelineManagerVulkan.cpp index a7ade3555d..0c333d4bb4 100644 --- a/GPU/Vulkan/PipelineManagerVulkan.cpp +++ b/GPU/Vulkan/PipelineManagerVulkan.cpp @@ -165,7 +165,7 @@ static std::string CutFromMain(std::string str) { static VulkanPipeline *CreateVulkanPipeline(VkDevice device, VkPipelineCache pipelineCache, VkPipelineLayout layout, VkRenderPass renderPass, const VulkanPipelineRasterStateKey &key, - const DecVtxFormat *decFmt, VulkanVertexShader *vs, VulkanFragmentShader *fs, bool useHwTransform, float lineWidth) { + const DecVtxFormat *decFmt, VulkanVertexShader *vs, VulkanFragmentShader *fs, bool useHwTransform) { PROFILE_THIS_SCOPE("pipelinebuild"); bool useBlendConstant = false; @@ -233,7 +233,7 @@ static VulkanPipeline *CreateVulkanPipeline(VkDevice device, VkPipelineCache pip rs.depthBiasEnable = false; rs.cullMode = key.cullMode; rs.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; - rs.lineWidth = lineWidth; + rs.lineWidth = 1.0f; rs.rasterizerDiscardEnable = false; rs.polygonMode = VK_POLYGON_MODE_FILL; rs.depthClampEnable = key.depthClampEnable; @@ -381,7 +381,7 @@ VulkanPipeline *PipelineManagerVulkan::GetOrCreatePipeline(VkPipelineLayout layo VulkanPipeline *pipeline = CreateVulkanPipeline( vulkan_->GetDevice(), pipelineCache_, layout, renderPass, - rasterKey, decFmt, vs, fs, useHwTransform, lineWidth_); + rasterKey, decFmt, vs, fs, useHwTransform); pipelines_.Insert(key, pipeline); // Don't return placeholder null pipelines. @@ -573,22 +573,6 @@ std::string VulkanPipelineKey::GetDescription(DebugShaderStringType stringType) } } -void PipelineManagerVulkan::SetLineWidth(float lineWidth) { - if (lineWidth_ == lineWidth) - return; - lineWidth_ = lineWidth; - - // Wipe all line-drawing pipelines. - pipelines_.Iterate([&](const VulkanPipelineKey &key, VulkanPipeline *value) { - if (value->flags & PIPELINE_FLAG_USES_LINES) { - if (value->pipeline) - vulkan_->Delete().QueueDeletePipeline(value->pipeline); - delete value; - pipelines_.Remove(key); - } - }); -} - // For some reason this struct is only defined in the spec, not in the headers. struct VkPipelineCacheHeader { uint32_t headerSize; diff --git a/GPU/Vulkan/PipelineManagerVulkan.h b/GPU/Vulkan/PipelineManagerVulkan.h index 8646d5b8bf..929914643e 100644 --- a/GPU/Vulkan/PipelineManagerVulkan.h +++ b/GPU/Vulkan/PipelineManagerVulkan.h @@ -72,8 +72,6 @@ public: void Clear(); - void SetLineWidth(float lw); - void DeviceLost(); void DeviceRestore(VulkanContext *vulkan); @@ -89,6 +87,5 @@ private: DenseHashMap pipelines_; VkPipelineCache pipelineCache_ = VK_NULL_HANDLE; VulkanContext *vulkan_; - float lineWidth_ = 1.0f; bool cancelCache_ = false; };