Files
test2/source/blender/gpu/vulkan/vk_uniform_buffer.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
738 B
C++
Raw Normal View History

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2022 Blender Foundation */
/** \file
* \ingroup gpu
*/
#include "vk_uniform_buffer.hh"
#include "vk_context.hh"
namespace blender::gpu {
void VKUniformBuffer::update(const void *data)
{
if (!buffer_.is_allocated()) {
VKContext &context = *VKContext::get();
allocate(context);
}
buffer_.update(data);
}
void VKUniformBuffer::allocate(VKContext &context)
{
buffer_.create(context, size_in_bytes_, GPU_USAGE_STATIC, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT);
}
void VKUniformBuffer::clear_to_zero() {}
void VKUniformBuffer::bind(int /*slot*/) {}
void VKUniformBuffer::bind_as_ssbo(int /*slot*/) {}
void VKUniformBuffer::unbind() {}
2023-01-31 15:49:04 +11:00
} // namespace blender::gpu