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
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2022 Blender Foundation. All rights reserved. */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "gpu_backend.hh"
|
|
|
|
namespace blender::gpu {
|
|
|
|
class VKBackend : public GPUBackend {
|
|
public:
|
|
void delete_resources() override;
|
|
|
|
void samplers_update() override;
|
|
void compute_dispatch(int groups_x_len, int groups_y_len, int groups_z_len) override;
|
|
void compute_dispatch_indirect(StorageBuf *indirect_buf) override;
|
|
|
|
Context *context_alloc(void *ghost_window, void *ghost_context) override;
|
|
|
|
Batch *batch_alloc() override;
|
|
DrawList *drawlist_alloc(int list_length) override;
|
|
FrameBuffer *framebuffer_alloc(const char *name) override;
|
|
IndexBuf *indexbuf_alloc() override;
|
|
QueryPool *querypool_alloc() override;
|
|
Shader *shader_alloc(const char *name) override;
|
|
Texture *texture_alloc(const char *name) override;
|
|
UniformBuf *uniformbuf_alloc(int size, const char *name) override;
|
|
StorageBuf *storagebuf_alloc(int size, GPUUsageType usage, const char *name) override;
|
|
VertBuf *vertbuf_alloc() override;
|
|
|
|
/* Render Frame Coordination --
|
|
* Used for performing per-frame actions globally */
|
|
void render_begin() override;
|
|
void render_end() override;
|
|
void render_step() override;
|
|
};
|
|
|
|
} // namespace blender::gpu
|