MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ ensure_cluster_binding()

bool MayaFlux::Buffers::VertexFieldProcessor::ensure_cluster_binding ( )
private

Ensure the backing hash_cluster_id state field exists, when m_needs_cluster_id is true.

Returns
False when cluster scoping is needed but the attached buffer is not a NetworkGeometryBuffer, or NetworkGeometryBuffer:: ensure_cluster_ids() itself fails (no primary GraphicsOperator, or it reports zero points). True when m_needs_cluster_id is false: nothing to do.

Delegates the actual declare/derive/upload to NetworkGeometryBuffer::ensure_cluster_ids(), which is itself has_state-guarded, so calling this again after a revision rebuild is cheap and whichever caller (this processor, or NetworkGeometryBuffer's own hash wiring) reaches it first does the real work.

Definition at line 244 of file VertexFieldProcessor.cpp.

245{
246 if (!m_needs_cluster_id) {
247 return true;
248 }
249
250 if (!m_network_buffer) {
252 "VertexFieldProcessor: operator has a cluster-scoped binding but the "
253 "attached buffer is not a NetworkGeometryBuffer, so hash_cluster_id "
254 "has nowhere to live. Dispatch suppressed.");
255 return false;
256 }
257
258 if (!m_network_buffer->ensure_cluster_ids()) {
260 "VertexFieldProcessor: operator has a cluster-scoped binding but "
261 "hash_cluster_id could not be derived (no primary GraphicsOperator, "
262 "or it reports zero points). Dispatch suppressed.");
263 return false;
264 }
265
266 return true;
267}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< NetworkGeometryBuffer > m_network_buffer
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, m_needs_cluster_id, m_network_buffer, and MF_ERROR.

Referenced by on_attach(), and sync_revision().

+ Here is the caller graph for this function: