mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Vulkan: Remove wide line handling.
No longer used, since we convert lines to triangles now.
This commit is contained in:
parent
2718e81c0e
commit
60bd25582c
8 changed files with 3 additions and 40 deletions
|
@ -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;
|
||||
|
|
|
@ -1456,7 +1456,6 @@ std::vector<std::string> 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);
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -186,7 +186,6 @@ public:
|
|||
return stats_;
|
||||
}
|
||||
|
||||
void SetLineWidth(float lineWidth);
|
||||
void SetDepalTexture(VkImageView depal) {
|
||||
if (boundDepal_ != depal) {
|
||||
boundDepal_ = depal;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -72,8 +72,6 @@ public:
|
|||
|
||||
void Clear();
|
||||
|
||||
void SetLineWidth(float lw);
|
||||
|
||||
void DeviceLost();
|
||||
void DeviceRestore(VulkanContext *vulkan);
|
||||
|
||||
|
@ -89,6 +87,5 @@ private:
|
|||
DenseHashMap<VulkanPipelineKey, VulkanPipeline *, nullptr> pipelines_;
|
||||
VkPipelineCache pipelineCache_ = VK_NULL_HANDLE;
|
||||
VulkanContext *vulkan_;
|
||||
float lineWidth_ = 1.0f;
|
||||
bool cancelCache_ = false;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue