16#include <Cocoa/Cocoa.h>
17#include <Metal/Metal.h>
18#include <QuartzCore/QuartzCore.h>
38 bool point_restarts_stripped_ =
false;
48 void free_optimized_buffer();
53 bool can_optimize_ =
true;
65 uint source_first_index,
66 uint dest_first_index,
67 uint index_len)
override;
84 return (type ==
GPU_INDEX_U16) ? MTLIndexTypeUInt16 : MTLIndexTypeUInt32;
88 void strip_restart_indices()
override;
90 MEM_CXX_CLASS_ALLOC_FUNCS(
"MTLIndexBuf")
Read Blender memory allocation and freeing.
static MTLIndexType gpu_index_type_to_metal(GPUIndexBufType type)
void copy_sub(IndexBuf &source_buf, uint source_first_index, uint dest_first_index, uint index_len) override
Copy part of source index buffer into this index buffer.
void upload_data() override
void read(uint32_t *data) const override
friend class MTLStorageBuf
id< MTLBuffer > get_index_buffer(GPUPrimType &in_out_primitive_type, uint &in_out_v_count)
void bind_as_ssbo(uint32_t binding) override
void update_sub(uint32_t start, uint32_t len, const void *data) override
void flag_can_optimize(bool can_optimize)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
unsigned __int64 uint64_t
BMesh const char void * data