This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/gpu/vulkan/vk_pixel_buffer.hh
Jeroen Bakker cf2c9fe186 Vulkan: Add initial VkPixelBuffer.
VKPixelBuffer is used by external render engines to allocate buffers
using the same GPU backend that Blender runs in.

In a later stage we should test what exact binding flags are needed. I
expect that it should be able to use as a transfer buffer to copy the
pixels over to a texture using transfer commands.

Pull Request: blender/blender#105741
2023-03-13 19:25:18 +01:00

28 lines
493 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2022 Blender Foundation. All rights reserved. */
/** \file
* \ingroup gpu
*/
#pragma once
#include "gpu_texture_private.hh"
#include "vk_buffer.hh"
namespace blender::gpu {
class VKPixelBuffer : public PixelBuffer {
VKBuffer buffer_;
public:
VKPixelBuffer(int64_t size);
void *map() override;
void unmap() override;
int64_t get_native_handle() override;
uint get_size() override;
};
} // namespace blender::gpu