Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_uniform_buffer.mm
| Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | void MTLUniformBuf::bind(int slot) | ||||
| } | } | ||||
| /* Ensure there is at least an empty dummy buffer. */ | /* Ensure there is at least an empty dummy buffer. */ | ||||
| if (metal_buffer_ == nullptr) { | if (metal_buffer_ == nullptr) { | ||||
| this->update(nullptr); | this->update(nullptr); | ||||
| } | } | ||||
| } | } | ||||
| void MTLUniformBuf::bind_as_ssbo(int slot) | |||||
| { | |||||
| if (slot < 0) { | |||||
| MTL_LOG_WARNING("Failed to bind UBO %p as SSBO. uniform location %d invalid.\n", this, slot); | |||||
| return; | |||||
| } | |||||
| BLI_assert_msg(0, "Not implemented yet"); | |||||
| } | |||||
| void MTLUniformBuf::unbind() | void MTLUniformBuf::unbind() | ||||
| { | { | ||||
| /* Unbind in debug mode to validate missing binds. | /* Unbind in debug mode to validate missing binds. | ||||
| * Otherwise, only perform a full unbind upon destruction | * Otherwise, only perform a full unbind upon destruction | ||||
| * to ensure no lingering references. */ | * to ensure no lingering references. */ | ||||
| #ifndef NDEBUG | #ifndef NDEBUG | ||||
| if (true) { | if (true) { | ||||
| #else | #else | ||||
| Show All 39 Lines | |||||