Blender
V4.5
source
blender
gpu
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
20
struct
ListBase
;
21
23
struct
GPUUniformBuf;
24
25
GPUUniformBuf *
GPU_uniformbuf_create_ex
(
size_t
size
,
const
void
*
data
,
const
char
*name);
32
GPUUniformBuf *
GPU_uniformbuf_create_from_list
(
ListBase
*
inputs
,
const
char
*name);
33
34
#define GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, nullptr, __func__);
35
36
void
GPU_uniformbuf_free
(GPUUniformBuf *ubo);
37
38
void
GPU_uniformbuf_update
(GPUUniformBuf *ubo,
const
void
*
data
);
39
40
void
GPU_uniformbuf_bind
(GPUUniformBuf *ubo,
int
slot);
41
void
GPU_uniformbuf_bind_as_ssbo
(GPUUniformBuf *ubo,
int
slot);
42
void
GPU_uniformbuf_unbind
(GPUUniformBuf *ubo);
47
void
GPU_uniformbuf_debug_unbind_all
();
48
49
void
GPU_uniformbuf_clear_to_zero
(GPUUniformBuf *ubo);
50
51
#define GPU_UBO_BLOCK_NAME "node_tree"
52
#define GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs"
53
#define GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs"
54
constexpr
static
int
GPU_NODE_TREE_UBO_SLOT
= 0;
55
56
#define GPU_UBO_FREE_SAFE(ubo) \
57
do { \
58
if (ubo != nullptr) { \
59
GPU_uniformbuf_free(ubo); \
60
ubo = nullptr; \
61
} \
62
} while (0)
BLI_sys_types.h
GPU_uniformbuf_create_ex
GPUUniformBuf * GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name)
Definition
gpu_uniform_buffer.cc:194
GPU_uniformbuf_unbind
void GPU_uniformbuf_unbind(GPUUniformBuf *ubo)
Definition
gpu_uniform_buffer.cc:248
GPU_uniformbuf_update
void GPU_uniformbuf_update(GPUUniformBuf *ubo, const void *data)
Definition
gpu_uniform_buffer.cc:233
GPU_uniformbuf_free
void GPU_uniformbuf_free(GPUUniformBuf *ubo)
Definition
gpu_uniform_buffer.cc:228
GPU_uniformbuf_create_from_list
GPUUniformBuf * GPU_uniformbuf_create_from_list(ListBase *inputs, const char *name)
Definition
gpu_uniform_buffer.cc:210
GPU_NODE_TREE_UBO_SLOT
static constexpr int GPU_NODE_TREE_UBO_SLOT
Definition
GPU_uniform_buffer.hh:54
GPU_uniformbuf_clear_to_zero
void GPU_uniformbuf_clear_to_zero(GPUUniformBuf *ubo)
Definition
gpu_uniform_buffer.cc:258
GPU_uniformbuf_debug_unbind_all
void GPU_uniformbuf_debug_unbind_all()
Definition
gpu_uniform_buffer.cc:253
GPU_uniformbuf_bind_as_ssbo
void GPU_uniformbuf_bind_as_ssbo(GPUUniformBuf *ubo, int slot)
Definition
gpu_uniform_buffer.cc:243
GPU_uniformbuf_bind
void GPU_uniformbuf_bind(GPUUniformBuf *ubo, int slot)
Definition
gpu_uniform_buffer.cc:238
data
BMesh const char void * data
Definition
bmesh_iterators_inline.hh:37
size
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition
btDbvt.cpp:52
inputs
static blender::bke::bNodeSocketTemplate inputs[]
Definition
node_texture_at.cc:11
ListBase
Definition
DNA_listBase.h:32
Generated on
for Blender by
doxygen
1.16.1