MCPcopy Create free account
hub / github.com/NVIDIA-RTX/NVRHI / getTextureStateTracking

Method getTextureStateTracking

src/common/state-tracking.cpp:405–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403 }
404
405 TextureState* CommandListResourceStateTracker::getTextureStateTracking(TextureStateExtension* texture, bool allowCreate)
406 {
407 auto it = m_TextureStates.find(texture);
408
409 if (it != m_TextureStates.end())
410 {
411 return it->second.get();
412 }
413
414 if (!allowCreate)
415 return nullptr;
416
417 std::unique_ptr<TextureState> trackingRef = std::make_unique<TextureState>();
418
419 TextureState* tracking = trackingRef.get();
420 m_TextureStates.insert(std::make_pair(texture, std::move(trackingRef)));
421
422 if (texture->descRef.keepInitialState)
423 {
424 tracking->state = texture->stateInitialized ? texture->descRef.initialState : ResourceStates::Common;
425 }
426
427 return tracking;
428 }
429
430 BufferState* CommandListResourceStateTracker::getBufferStateTracking(BufferStateExtension* buffer, bool allowCreate)
431 {

Callers

nothing calls this directly

Calls 1

endMethod · 0.80

Tested by

no test coverage detected