47 "Only single attribute format are supported for buffer textures");
58 if (!this->format.
packed) {
156 verts->reference_remove();
161 verts->reference_add();
166 verts->reference_remove();
173 verts.allocate(v_len);
185 verts.vertex_len = v_len;
228 const uint vertex_len =
verts->vertex_len;
230 if (
format->attr_len == 1 && stride ==
format->stride) {
236 for (
uint v = 0;
v < vertex_len;
v++) {
266 return &
verts->format;
271 return verts->vertex_alloc;
276 return verts->vertex_len;
301 verts->wrap_handle(handle);
306 verts->bind_as_ssbo(binding);
311 verts->bind_as_texture(binding);
#define BLI_assert_msg(a, msg)
void GPU_vertbuf_attr_get_raw_data(blender::gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
void GPU_vertbuf_attr_fill_stride(blender::gpu::VertBuf *, uint a_idx, uint stride, const void *data)
blender::gpu::VertBuf * GPU_vertbuf_create_on_device(const GPUVertFormat &format, uint v_len)
void GPU_vertbuf_init_build_on_device(blender::gpu::VertBuf &verts, const GPUVertFormat &format, uint v_len)
void GPU_vertbuf_vert_set(blender::gpu::VertBuf *verts, uint v_idx, const void *data)
void GPU_vertbuf_handle_ref_remove(blender::gpu::VertBuf *verts)
void GPU_vertbuf_use(blender::gpu::VertBuf *)
void GPU_vertbuf_data_resize(blender::gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_attr_fill(blender::gpu::VertBuf *, uint a_idx, const void *data)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
void GPU_vertbuf_tag_dirty(blender::gpu::VertBuf *verts)
void GPU_vertbuf_handle_ref_add(blender::gpu::VertBuf *verts)
void GPU_vertbuf_data_len_set(blender::gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_attr_set(blender::gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
@ GPU_VERTBUF_DATA_UPLOADED
void GPU_vertbuf_wrap_handle(blender::gpu::VertBuf *verts, uint64_t handle)
void GPU_vertbuf_read(const blender::gpu::VertBuf *verts, void *data)
uint GPU_vertbuf_get_memory_usage()
GPUVertBufStatus GPU_vertbuf_get_status(const blender::gpu::VertBuf *verts)
blender::gpu::VertBuf * GPU_vertbuf_calloc()
void GPU_vertbuf_clear(blender::gpu::VertBuf *verts)
const GPUVertFormat * GPU_vertbuf_get_format(const blender::gpu::VertBuf *verts)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_bind_as_ssbo(blender::gpu::VertBuf *verts, int binding)
void GPU_vertbuf_update_sub(blender::gpu::VertBuf *verts, uint start, uint len, const void *data)
void GPU_vertbuf_init_with_format_ex(blender::gpu::VertBuf &verts, const GPUVertFormat &format, GPUUsageType)
void GPU_vertbuf_bind_as_texture(blender::gpu::VertBuf *verts, int binding)
uint GPU_vertbuf_get_vertex_len(const blender::gpu::VertBuf *verts)
void GPU_vertbuf_discard(blender::gpu::VertBuf *)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
uint GPU_vertbuf_get_vertex_alloc(const blender::gpu::VertBuf *verts)
Read Guarded memory(de)allocation.
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMVert * v
unsigned long long int uint64_t
static GPUBackend * get()
virtual VertBuf * vertbuf_alloc()=0
void init(const GPUVertFormat &format, GPUUsageType usage)
static size_t memory_usage
GPUUsageType extended_usage_
void resize(uint vert_len)
virtual void upload_data()=0
void allocate(uint vert_len)
virtual void resize_data()=0
virtual void release_data()=0
virtual void acquire_data()=0
struct GPUVertAttr::Type type
unsigned char * data_init
unsigned char * _data_end