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

Method attachDepthStencilTarget

Source/Falcor/Core/API/FBO.cpp:350–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350void Fbo::attachDepthStencilTarget(const ref<Texture>& pDepthStencil, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)
351{
352 bool changed = (mDepthStencil.pTexture != pDepthStencil);
353 changed |= (mDepthStencil.mipLevel != mipLevel);
354 changed |= (mDepthStencil.firstArraySlice != firstArraySlice);
355 changed |= (mDepthStencil.arraySize != arraySize);
356 if (!changed)
357 return;
358
359 checkAttachArguments(pDepthStencil.get(), mipLevel, firstArraySlice, arraySize, true);
360
361 mpDesc = nullptr;
362 mDepthStencil.pTexture = pDepthStencil;
363 mDepthStencil.mipLevel = mipLevel;
364 mDepthStencil.firstArraySlice = firstArraySlice;
365 mDepthStencil.arraySize = arraySize;
366 bool allowUav = false;
367 if (pDepthStencil)
368 {
369 allowUav = ((pDepthStencil->getBindFlags() & ResourceBindFlags::UnorderedAccess) != ResourceBindFlags::None);
370 }
371
372 mTempDesc.setDepthStencilTarget(pDepthStencil ? pDepthStencil->getFormat() : ResourceFormat::Unknown, allowUav);
373 applyDepthAttachment();
374}
375
376void Fbo::attachColorTarget(const ref<Texture>& pTexture, uint32_t rtIndex, uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)
377{

Callers 5

executeMethod · 0.80
executeMethod · 0.80
createMethod · 0.80
create2DMethod · 0.80
createCubemapMethod · 0.80

Calls 3

checkAttachArgumentsFunction · 0.85
getFormatMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected