49 "Only single attribute format are supported for buffer textures");
60 if (!this->format.
packed) {
120 verts->
init(format, usage);
128 verts.
init(format, usage);
218 memcpy(verts->
data<
uchar>().data() + v_idx * format->stride,
data, format->stride);
231 if (format->attr_len == 1 && stride == format->stride) {
237 for (
uint v = 0;
v < vertex_len;
v++) {
239 static_cast<const uchar *
>(
data) +
v * stride,
255 access->
stride = format->stride;
Read Blender memory allocation and freeing.
#define BLI_assert_msg(a, msg)
static GPUBackend * get()
virtual VertBuf * vertbuf_alloc()=0
virtual void read(void *data) const =0
virtual void wrap_handle(uint64_t handle)=0
void init(const GPUVertFormat &format, GPUUsageType usage)
virtual void bind_as_ssbo(uint binding)=0
static size_t memory_usage
GPUUsageType extended_usage_
void resize(uint vert_len)
virtual void upload_data()=0
void allocate(uint vert_len)
GPUUsageType get_usage_type() const
virtual void resize_data()=0
virtual void bind_as_texture(uint binding)=0
virtual void release_data()=0
virtual void acquire_data()=0
virtual void update_sub(uint start, uint len, const void *data)=0
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void GPU_vertbuf_tag_dirty(gpu::VertBuf *verts)
unsigned __int64 uint64_t
void GPU_vertbuf_bind_as_texture(gpu::VertBuf *verts, int binding)
void GPU_vertbuf_wrap_handle(gpu::VertBuf *verts, uint64_t handle)
void GPU_vertbuf_init_with_format_ex(gpu::VertBuf &verts, const GPUVertFormat &format, GPUUsageType)
gpu::VertBuf * GPU_vertbuf_create_on_device(const GPUVertFormat &format, uint v_len)
void GPU_vertbuf_handle_ref_remove(gpu::VertBuf *verts)
uint GPU_vertbuf_get_memory_usage()
void GPU_vertbuf_read(const gpu::VertBuf *verts, void *data)
void GPU_vertbuf_use(gpu::VertBuf *)
ATTR_WARN_UNUSED_RESULT const BMVert * v
const GPUVertFormat * GPU_vertbuf_get_format(const gpu::VertBuf *verts)
GPUVertBufStatus GPU_vertbuf_get_status(const gpu::VertBuf *verts)
void GPU_vertbuf_bind_as_ssbo(gpu::VertBuf *verts, int binding)
void GPU_vertbuf_attr_fill_stride(gpu::VertBuf *, uint a_idx, uint stride, const void *data)
BMesh const char void * data
void GPU_vertbuf_attr_set(gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
gpu::VertBuf * GPU_vertbuf_calloc()
void GPU_vertbuf_update_sub(gpu::VertBuf *verts, uint start, uint len, const void *data)
void GPU_vertbuf_handle_ref_add(gpu::VertBuf *verts)
void GPU_vertbuf_clear(gpu::VertBuf *verts)
void VertexFormat_pack(GPUVertFormat *format)
void GPU_vertbuf_init_build_on_device(gpu::VertBuf &verts, const GPUVertFormat &format, uint v_len)
@ GPU_VERTBUF_DATA_UPLOADED
gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
void GPU_vertbuf_attr_get_raw_data(gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
void GPU_vertbuf_vert_set(gpu::VertBuf *verts, uint v_idx, const void *data)
void GPU_vertformat_copy(GPUVertFormat *dest, const GPUVertFormat &src)
void GPU_vertbuf_attr_fill(gpu::VertBuf *, uint a_idx, const void *data)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_data_resize(gpu::VertBuf &verts, uint v_len)
uint GPU_vertbuf_get_vertex_len(const gpu::VertBuf *verts)
uint GPU_vertbuf_get_vertex_alloc(const gpu::VertBuf *verts)
void GPU_vertbuf_discard(gpu::VertBuf *)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
void GPU_vertbuf_data_len_set(gpu::VertBuf &verts, uint v_len)
struct blender::GPUVertAttr::Type type
unsigned char * _data_end
unsigned char * data_init