Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_command_buffer.mm
| Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | if (scope != 0) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* No barrier support. */ | /* No barrier support. */ | ||||
| return false; | return false; | ||||
| } | } | ||||
| void MTLCommandBufferManager::encode_signal_event(id<MTLEvent> event, uint64_t signal_value) | |||||
| { | |||||
| /* Ensure active command buffer. */ | |||||
| id<MTLCommandBuffer> cmd_buf = this->ensure_begin(); | |||||
| BLI_assert(cmd_buf); | |||||
| this->end_active_command_encoder(); | |||||
| [cmd_buf encodeSignalEvent:event value:signal_value]; | |||||
| } | |||||
| void MTLCommandBufferManager::encode_wait_for_event(id<MTLEvent> event, uint64_t signal_value) | |||||
| { | |||||
| /* Ensure active command buffer. */ | |||||
| id<MTLCommandBuffer> cmd_buf = this->ensure_begin(); | |||||
| BLI_assert(cmd_buf); | |||||
| this->end_active_command_encoder(); | |||||
| [cmd_buf encodeWaitForEvent:event value:signal_value]; | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Render Pass State for active RenderCommandEncoder | /** \name Render Pass State for active RenderCommandEncoder | ||||
| * \{ */ | * \{ */ | ||||
| /* Reset binding state when a new RenderCommandEncoder is bound, to ensure | /* Reset binding state when a new RenderCommandEncoder is bound, to ensure | ||||
| * pipeline resources are re-applied to the new Encoder. | * pipeline resources are re-applied to the new Encoder. | ||||
| * NOTE: In Metal, state is only persistent within an MTLCommandEncoder, | * NOTE: In Metal, state is only persistent within an MTLCommandEncoder, | ||||
| ▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines | |||||