Blender V5.0
GPU_uniform_buffer.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2005 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
15
16#pragma once
17
18#include "BLI_sys_types.h"
19
20struct ListBase;
21
22namespace blender::gpu {
23class UniformBuf;
24} // namespace blender::gpu
25
27 const void *data,
28 const char *name);
36
37#define GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, nullptr, __func__);
38
40
42
51
53
54#define GPU_UBO_BLOCK_NAME "node_tree"
55#define GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs"
56#define GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs"
57constexpr static int GPU_NODE_TREE_UBO_SLOT = 0;
58
59#define GPU_UBO_FREE_SAFE(ubo) \
60 do { \
61 if (ubo != nullptr) { \
62 GPU_uniformbuf_free(ubo); \
63 ubo = nullptr; \
64 } \
65 } while (0)
void GPU_uniformbuf_free(blender::gpu::UniformBuf *ubo)
void GPU_uniformbuf_bind(blender::gpu::UniformBuf *ubo, int slot)
blender::gpu::UniformBuf * GPU_uniformbuf_create_from_list(ListBase *inputs, const char *name)
void GPU_uniformbuf_bind_as_ssbo(blender::gpu::UniformBuf *ubo, int slot)
static constexpr int GPU_NODE_TREE_UBO_SLOT
void GPU_uniformbuf_clear_to_zero(blender::gpu::UniformBuf *ubo)
void GPU_uniformbuf_unbind(blender::gpu::UniformBuf *ubo)
blender::gpu::UniformBuf * GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name)
void GPU_uniformbuf_debug_unbind_all()
void GPU_uniformbuf_update(blender::gpu::UniformBuf *ubo, const void *data)
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
static blender::bke::bNodeSocketTemplate inputs[]
const char * name