Blender
V3.3
|
Go to the source code of this file.
Macros | |
#define | GPU_storagebuf_create(size) GPU_storagebuf_create_ex(size, NULL, GPU_USAGE_DYNAMIC, __func__); |
Typedefs | |
typedef struct GPUStorageBuf | GPUStorageBuf |
Functions | |
GPUStorageBuf * | GPU_storagebuf_create_ex (size_t size, const void *data, GPUUsageType usage, const char *name) |
void | GPU_storagebuf_free (GPUStorageBuf *ssbo) |
void | GPU_storagebuf_update (GPUStorageBuf *ssbo, const void *data) |
void | GPU_storagebuf_bind (GPUStorageBuf *ssbo, int slot) |
void | GPU_storagebuf_unbind (GPUStorageBuf *ssbo) |
void | GPU_storagebuf_unbind_all (void) |
void | GPU_storagebuf_clear (GPUStorageBuf *ssbo, eGPUTextureFormat internal_format, eGPUDataFormat data_format, void *data) |
void | GPU_storagebuf_clear_to_zero (GPUStorageBuf *ssbo) |
void | GPU_storagebuf_copy_sub_from_vertbuf (GPUStorageBuf *ssbo, GPUVertBuf *src, uint dst_offset, uint src_offset, uint copy_size) |
Copy a part of a vertex buffer to a storage buffer. More... | |
Storage buffers API. Used to handle many way bigger buffers than Uniform buffers update at once. Make sure that the data structure is compatible with what the implementation expect. (see "7.8 Shader Buffer Variables and Shader Storage Blocks" from the OpenGL spec for more info about std430 layout) Rule of thumb: Padding to 16bytes, don't use vec3.
Definition in file GPU_storage_buffer.h.
#define GPU_storagebuf_create | ( | size | ) | GPU_storagebuf_create_ex(size, NULL, GPU_USAGE_DYNAMIC, __func__); |
Definition at line 33 of file GPU_storage_buffer.h.
typedef struct GPUStorageBuf GPUStorageBuf |
Opaque type hiding blender::gpu::StorageBuf.
Definition at line 1 of file GPU_storage_buffer.h.
void GPU_storagebuf_bind | ( | GPUStorageBuf * | ssbo, |
int | slot | ||
) |
Definition at line 77 of file gpu_storage_buffer.cc.
References blender::gpu::unwrap().
Referenced by draw_update_uniforms().
void GPU_storagebuf_clear | ( | GPUStorageBuf * | ssbo, |
eGPUTextureFormat | internal_format, | ||
eGPUDataFormat | data_format, | ||
void * | data | ||
) |
Definition at line 92 of file gpu_storage_buffer.cc.
References data, and blender::gpu::unwrap().
Referenced by GPU_storagebuf_clear_to_zero().
void GPU_storagebuf_clear_to_zero | ( | GPUStorageBuf * | ssbo | ) |
Definition at line 100 of file gpu_storage_buffer.cc.
References data, GPU_DATA_UINT, GPU_R32UI, and GPU_storagebuf_clear().
void GPU_storagebuf_copy_sub_from_vertbuf | ( | GPUStorageBuf * | ssbo, |
GPUVertBuf * | src, | ||
uint | dst_offset, | ||
uint | src_offset, | ||
uint | copy_size | ||
) |
Copy a part of a vertex buffer to a storage buffer.
ssbo | destination storage buffer |
src | source vertex buffer |
dst_offset | where to start copying to (in bytes). |
src_offset | where to start copying from (in bytes). |
copy_size | byte size of the segment to copy. |
Definition at line 106 of file gpu_storage_buffer.cc.
References src, and blender::gpu::unwrap().
Referenced by blender::eevee::VelocityModule::step_swap().
GPUStorageBuf* GPU_storagebuf_create_ex | ( | size_t | size, |
const void * | data, | ||
GPUUsageType | usage, | ||
const char * | name | ||
) |
Definition at line 54 of file gpu_storage_buffer.cc.
References data, blender::gpu::GPUBackend::get(), size(), blender::gpu::GPUBackend::storagebuf_alloc(), blender::gpu::StorageBuf::update(), and blender::gpu::wrap().
Referenced by blender::draw::StorageArrayBuffer< T, len, device_only >::resize(), and blender::draw::detail::StorageCommon< T, len, device_only >::StorageCommon().
void GPU_storagebuf_free | ( | GPUStorageBuf * | ssbo | ) |
Definition at line 67 of file gpu_storage_buffer.cc.
References blender::gpu::unwrap().
Referenced by blender::draw::StorageArrayBuffer< T, len, device_only >::resize(), and blender::draw::detail::StorageCommon< T, len, device_only >::~StorageCommon().
void GPU_storagebuf_unbind | ( | GPUStorageBuf * | ssbo | ) |
Definition at line 82 of file gpu_storage_buffer.cc.
References blender::gpu::unwrap().
Definition at line 87 of file gpu_storage_buffer.cc.
Referenced by draw_shgroup(), and DRW_state_reset().
void GPU_storagebuf_update | ( | GPUStorageBuf * | ssbo, |
const void * | data | ||
) |
Definition at line 72 of file gpu_storage_buffer.cc.
References data, and blender::gpu::unwrap().
Referenced by blender::draw::detail::StorageCommon< T, len, device_only >::push_update().