From 8512c1b4743ae2f90b5b9068eb28ba6084bb9196 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:10:33 +0100 Subject: [PATCH] pass pointers instead of const references to be more idiomatic --- src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp | 6 +++--- src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp b/src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp index 2c32eeb9..3a00c36a 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 = [&](const std::unique_ptr& shader, const UniformLocations& locations){ + auto setUniforms = [&](RendererShader* shader, const UniformLocations& locations){ float res[2]; if (locations.m_loc_textureSrcResolution != -1) { @@ -169,8 +169,8 @@ void RendererOutputShader::SetUniformParameters(const LatteTextureView& texture_ shader->SetUniform2fv(locations.m_loc_outputResolution, res, 1); } }; - setUniforms(m_vertex_shader, m_uniformLocations[0]); - setUniforms(m_fragment_shader, m_uniformLocations[1]); + setUniforms(m_vertex_shader.get(), m_uniformLocations[0]); + setUniforms(m_fragment_shader.get(), m_uniformLocations[1]); } RendererOutputShader* RendererOutputShader::s_copy_shader; diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h index fe35a8ad..9bf9a14a 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h @@ -138,7 +138,7 @@ public: // memory management std::unique_ptr memoryManager; - const std::unique_ptr& GetMemoryManager() const { return memoryManager; }; + VKRMemoryManager* GetMemoryManager() const { return memoryManager.get(); }; VkSupportedFormatInfo_t m_supportedFormatInfo;