A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
46 lines
996 B
C++
46 lines
996 B
C++
/* SPDX-FileCopyrightText: 2022 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#include "vk_pixel_buffer.hh"
|
|
|
|
#include "vk_context.hh"
|
|
|
|
namespace blender::gpu {
|
|
|
|
VKPixelBuffer::VKPixelBuffer(int64_t size) : PixelBuffer(size)
|
|
{
|
|
buffer_.create(size,
|
|
GPU_USAGE_STATIC,
|
|
static_cast<VkBufferUsageFlagBits>(VK_BUFFER_USAGE_TRANSFER_SRC_BIT |
|
|
VK_BUFFER_USAGE_TRANSFER_DST_BIT));
|
|
debug::object_label(buffer_.vk_handle(), "PixelBuffer");
|
|
}
|
|
|
|
void *VKPixelBuffer::map()
|
|
{
|
|
/* Vulkan buffers are always mapped between allocation and freeing. */
|
|
return buffer_.mapped_memory_get();
|
|
}
|
|
|
|
void VKPixelBuffer::unmap()
|
|
{
|
|
/* Vulkan buffers are always mapped between allocation and freeing. */
|
|
}
|
|
|
|
int64_t VKPixelBuffer::get_native_handle()
|
|
{
|
|
return int64_t(buffer_.vk_handle());
|
|
}
|
|
|
|
size_t VKPixelBuffer::get_size()
|
|
{
|
|
return size_;
|
|
}
|
|
|
|
} // namespace blender::gpu
|