Blender  V3.3
Namespaces
gpu_storage_buffer.cc File Reference
#include "MEM_guardedalloc.h"
#include <cstring>
#include "BLI_blenlib.h"
#include "BLI_math_base.h"
#include "gpu_backend.hh"
#include "GPU_material.h"
#include "GPU_vertex_buffer.h"
#include "GPU_storage_buffer.h"
#include "gpu_storage_buffer_private.hh"
#include "gpu_vertex_buffer_private.hh"

Go to the source code of this file.

Namespaces

 blender
 
 blender::gpu
 

Functions

C-API
GPUStorageBufGPU_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 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...
 

Function Documentation

◆ GPU_storagebuf_bind()

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().

◆ GPU_storagebuf_clear()

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().

◆ 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().

◆ GPU_storagebuf_copy_sub_from_vertbuf()

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.

Parameters
ssbodestination storage buffer
srcsource vertex buffer
dst_offsetwhere to start copying to (in bytes).
src_offsetwhere to start copying from (in bytes).
copy_sizebyte 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().

◆ GPU_storagebuf_create_ex()

GPUStorageBuf* GPU_storagebuf_create_ex ( size_t  size,
const void data,
GPUUsageType  usage,
const char *  name 
)

◆ GPU_storagebuf_free()

void GPU_storagebuf_free ( GPUStorageBuf ssbo)

◆ GPU_storagebuf_unbind()

void GPU_storagebuf_unbind ( GPUStorageBuf ssbo)

Definition at line 82 of file gpu_storage_buffer.cc.

References blender::gpu::unwrap().

◆ GPU_storagebuf_unbind_all()

void GPU_storagebuf_unbind_all ( void  )

Definition at line 87 of file gpu_storage_buffer.cc.

Referenced by draw_shgroup(), and DRW_state_reset().

◆ GPU_storagebuf_update()

void GPU_storagebuf_update ( GPUStorageBuf ssbo,
const void data 
)