From 40219e204a4c1a7674e90711400db060dcc4d998 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:27:32 +0100 Subject: [PATCH] post-merge fixes --- src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp | 2 +- src/Cafe/HW/Latte/Renderer/Vulkan/VKRBase.h | 7 ------- src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp | 8 -------- src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h | 1 - src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp | 2 -- 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp b/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp index 19511747..2c32eeb9 100644 --- a/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp +++ b/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp @@ -146,7 +146,7 @@ void RendererOutputShader::SetUniformParameters(const LatteTextureView& texture_ { sint32 effectiveWidth, effectiveHeight; texture_view.baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0); - auto setUniforms = [&](RendererShader* shader, const UniformLocations& locations){ + auto setUniforms = [&](const std::unique_ptr& shader, const UniformLocations& locations){ float res[2]; if (locations.m_loc_textureSrcResolution != -1) { diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VKRBase.h b/src/Cafe/HW/Latte/Renderer/Vulkan/VKRBase.h index acc81efc..9c7e03f3 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VKRBase.h +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VKRBase.h @@ -235,11 +235,4 @@ public: ~VKRObjectDescriptorSet() override; VkDescriptorSet descriptorSet{ VK_NULL_HANDLE }; -}; - -class VKRObjectSampler : public VKRDestructibleObject -{ -public: - ~VKRObjectSampler() override; - VkSampler sampler { VK_NULL_HANDLE }; }; \ No newline at end of file diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp index dd9949f3..f407b751 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp @@ -3229,8 +3229,6 @@ VkDescriptorSetInfo::~VkDescriptorSetInfo() auto renderer = VulkanRenderer::GetInstance(); renderer->ReleaseDestructibleObject(m_vkObjDescriptorSet); - for(auto& sampler : m_vkObjSamplers) - renderer->ReleaseDestructibleObject(sampler); m_vkObjDescriptorSet = nullptr; } @@ -4147,9 +4145,3 @@ VKRObjectDescriptorSet::~VKRObjectDescriptorSet() vkFreeDescriptorSets(vkr->GetLogicalDevice(), vkr->GetDescriptorPool(), 1, &descriptorSet); performanceMonitor.vk.numDescriptorSets.decrement(); } - -VKRObjectSampler::~VKRObjectSampler() -{ - auto vkr = VulkanRenderer::GetInstance(); - vkDestroySampler(vkr->GetLogicalDevice(), sampler, nullptr); -} diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h index df47b366..fe35a8ad 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h @@ -25,7 +25,6 @@ struct VkSupportedFormatInfo_t struct VkDescriptorSetInfo { VKRObjectDescriptorSet* m_vkObjDescriptorSet{}; - std::vector m_vkObjSamplers{}; ~VkDescriptorSetInfo(); diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp index 9465645c..7c1d8299 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRendererCore.cpp @@ -1167,8 +1167,6 @@ void VulkanRenderer::draw_prepareDescriptorSets(PipelineInfo* pipeline_info, VkD return nullptr; auto descriptorSetInfo = draw_getOrCreateDescriptorSet(pipeline_info, shader); descriptorSetInfo->m_vkObjDescriptorSet->flagForCurrentCommandBuffer(); - for (auto& sampler : descriptorSetInfo->m_vkObjSamplers) - sampler->flagForCurrentCommandBuffer(); return descriptorSetInfo; };