Skip to content
Permalink
Browse files

Vulkan: Remove unused UpdateUtilityUniformBuffer function

  • Loading branch information...
stenzek committed Jan 20, 2019
1 parent 78588ce commit e9b02e7dd0f0e9a509e4444e335edec621562c50
Showing with 0 additions and 25 deletions.
  1. +0 −22 Source/Core/VideoBackends/Vulkan/Renderer.cpp
  2. +0 −3 Source/Core/VideoBackends/Vulkan/Renderer.h
@@ -223,28 +223,6 @@ Renderer::CreateFramebuffer(const AbstractTexture* color_attachment,
static_cast<const VKTexture*>(depth_attachment));
}

std::tuple<VkBuffer, u32> Renderer::UpdateUtilityUniformBuffer(const void* uniforms,
u32 uniforms_size)
{
StreamBuffer* ubo_buf = g_object_cache->GetUtilityShaderUniformBuffer();
if (!ubo_buf->ReserveMemory(uniforms_size, g_vulkan_context->GetUniformBufferAlignment()))
{
Util::ExecuteCurrentCommandsAndRestoreState(false, true);
if (!ubo_buf->ReserveMemory(uniforms_size, g_vulkan_context->GetUniformBufferAlignment()))
{
PanicAlert("Failed to reserve uniform buffer space for utility draw.");
return {};
}
}

VkBuffer ubo = ubo_buf->GetBuffer();
u32 ubo_offset = static_cast<u32>(ubo_buf->GetCurrentOffset());
std::memcpy(ubo_buf->GetCurrentHostPointer(), uniforms, uniforms_size);
ubo_buf->CommitMemory(uniforms_size);

return std::tie(ubo, ubo_offset);
}

void Renderer::SetPipeline(const AbstractPipeline* pipeline)
{
StateTracker::GetInstance()->SetPipeline(static_cast<const VKPipeline*>(pipeline));
@@ -7,7 +7,6 @@
#include <array>
#include <cstddef>
#include <memory>
#include <tuple>

#include "Common/CommonTypes.h"
#include "VideoBackends/Vulkan/Constants.h"
@@ -112,8 +111,6 @@ class Renderer : public ::Renderer
bool CompileShaders();
void DestroyShaders();

std::tuple<VkBuffer, u32> UpdateUtilityUniformBuffer(const void* uniforms, u32 uniforms_size);

VkSemaphore m_image_available_semaphore = VK_NULL_HANDLE;
VkSemaphore m_rendering_finished_semaphore = VK_NULL_HANDLE;
VkRenderPass m_swap_chain_render_pass = VK_NULL_HANDLE;

0 comments on commit e9b02e7

Please sign in to comment.
You can’t perform that action at this time.