MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / textureBarrier

Method textureBarrier

Source/Falcor/Core/API/CopyContext.cpp:410–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410bool CopyContext::textureBarrier(const Texture* pTexture, Resource::State newState)
411{
412 auto resourceEncoder = getLowLevelData()->getResourceCommandEncoder();
413 bool recorded = false;
414 if (pTexture->getGlobalState() != newState)
415 {
416 gfx::ITextureResource* textureResource = pTexture->getGfxTextureResource();
417 resourceEncoder->textureBarrier(
418 1, &textureResource, getGFXResourceState(pTexture->getGlobalState()), getGFXResourceState(newState)
419 );
420 mCommandsPending = true;
421 recorded = true;
422 }
423 pTexture->setGlobalState(newState);
424 return recorded;
425}
426
427bool CopyContext::bufferBarrier(const Buffer* pBuffer, Resource::State newState)
428{

Callers 1

uavBarrierMethod · 0.80

Calls 5

getLowLevelDataFunction · 0.85
getGFXResourceStateFunction · 0.85
getGlobalStateMethod · 0.80
setGlobalStateMethod · 0.80

Tested by

no test coverage detected