Blender V4.3
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
16#pragma once
17
18struct ListBase;
19
21struct GPUUniformBuf;
22
23GPUUniformBuf *GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name);
30GPUUniformBuf *GPU_uniformbuf_create_from_list(ListBase *inputs, const char *name);
31
32#define GPU_uniformbuf_create(size) GPU_uniformbuf_create_ex(size, nullptr, __func__);
33
34void GPU_uniformbuf_free(GPUUniformBuf *ubo);
35
36void GPU_uniformbuf_update(GPUUniformBuf *ubo, const void *data);
37
38void GPU_uniformbuf_bind(GPUUniformBuf *ubo, int slot);
39void GPU_uniformbuf_bind_as_ssbo(GPUUniformBuf *ubo, int slot);
40void GPU_uniformbuf_unbind(GPUUniformBuf *ubo);
46
47void GPU_uniformbuf_clear_to_zero(GPUUniformBuf *ubo);
48
49#define GPU_UBO_BLOCK_NAME "node_tree"
50#define GPU_ATTRIBUTE_UBO_BLOCK_NAME "unf_attrs"
51#define GPU_LAYER_ATTRIBUTE_UBO_BLOCK_NAME "drw_layer_attrs"
52#define GPU_NODE_TREE_UBO_SLOT 0
GPUUniformBuf * GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name)
void GPU_uniformbuf_unbind(GPUUniformBuf *ubo)
void GPU_uniformbuf_update(GPUUniformBuf *ubo, const void *data)
void GPU_uniformbuf_free(GPUUniformBuf *ubo)
GPUUniformBuf * GPU_uniformbuf_create_from_list(ListBase *inputs, const char *name)
void GPU_uniformbuf_clear_to_zero(GPUUniformBuf *ubo)
void GPU_uniformbuf_debug_unbind_all()
void GPU_uniformbuf_bind_as_ssbo(GPUUniformBuf *ubo, int slot)
void GPU_uniformbuf_bind(GPUUniformBuf *ubo, int slot)