This patch adds a placeholder for the vulkan backend. When activated (`WITH_VULKAN_BACKEND=On` and `--gpu-backend vulkan`) it might open a blender screen, but nothing should be visible as none of the functions are implemented or otherwise crash on a nullptr. This is expected as this is just a placeholder. The goal is to add shader compilation +validation to this backend as one of the next steps so we can validate changes to existing shaders on OpenGL, Metal and Vulkan at the same time. Reviewed By: fclem Differential Revision: https://developer.blender.org/D16338
32 lines
784 B
C++
32 lines
784 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2022 Blender Foundation. All rights reserved. */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "gpu_vertex_buffer_private.hh"
|
|
|
|
namespace blender::gpu {
|
|
|
|
class VKVertexBuffer : public VertBuf {
|
|
public:
|
|
void bind_as_ssbo(uint binding) override;
|
|
void bind_as_texture(uint binding) override;
|
|
void wrap_handle(uint64_t handle) override;
|
|
|
|
void update_sub(uint start, uint len, const void *data) override;
|
|
const void *read() const override;
|
|
void *unmap(const void *mapped_data) const override;
|
|
|
|
protected:
|
|
void acquire_data() override;
|
|
void resize_data() override;
|
|
void release_data() override;
|
|
void upload_data() override;
|
|
void duplicate_data(VertBuf *dst) override;
|
|
};
|
|
|
|
} // namespace blender::gpu
|