Skip to content

Commit

Permalink
pass pointers instead of const references to be more idiomatic
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Dec 16, 2024
1 parent 40219e2 commit 8512c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Cafe/HW/Latte/Renderer/RendererOuputShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<RendererShader>& shader, const UniformLocations& locations){
auto setUniforms = [&](RendererShader* shader, const UniformLocations& locations){
float res[2];
if (locations.m_loc_textureSrcResolution != -1)
{
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class VulkanRenderer : public Renderer

// memory management
std::unique_ptr<VKRMemoryManager> memoryManager;
const std::unique_ptr<VKRMemoryManager>& GetMemoryManager() const { return memoryManager; };
VKRMemoryManager* GetMemoryManager() const { return memoryManager.get(); };

VkSupportedFormatInfo_t m_supportedFormatInfo;

Expand Down

0 comments on commit 8512c1b

Please sign in to comment.