Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_uniform_buffer.hh
| Show All 29 Lines | private: | ||||
| MTLContext *bound_ctx_ = nullptr; | MTLContext *bound_ctx_ = nullptr; | ||||
| public: | public: | ||||
| MTLUniformBuf(size_t size, const char *name); | MTLUniformBuf(size_t size, const char *name); | ||||
| ~MTLUniformBuf(); | ~MTLUniformBuf(); | ||||
| void update(const void *data) override; | void update(const void *data) override; | ||||
| void bind(int slot) override; | void bind(int slot) override; | ||||
| void bind_as_ssbo(int slot) override; | |||||
| void unbind() override; | void unbind() override; | ||||
| id<MTLBuffer> get_metal_buffer(int *r_offset); | id<MTLBuffer> get_metal_buffer(int *r_offset); | ||||
| int get_size(); | int get_size(); | ||||
| const char *get_name() | const char *get_name() | ||||
| { | { | ||||
| return name_; | return name_; | ||||
| } | } | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("MTLUniformBuf"); | MEM_CXX_CLASS_ALLOC_FUNCS("MTLUniformBuf"); | ||||
| }; | }; | ||||
| } // namespace blender::gpu | } // namespace blender::gpu | ||||