MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / adaptRange

Function adaptRange

source/RenderGraph/RecordContext.cpp:27–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 namespace recctx
26 {
27 static ImageSubresourceRange adaptRange( GraphContext const & context
28 , ImageType type
29 , PixelFormat format
30 , ImageSubresourceRange const & subresourceRange )
31 {
32 ImageSubresourceRange result = subresourceRange;
33
34 if ( type == ImageType::e3D )
35 {
36 result.baseArrayLayer = 0;
37 result.layerCount = 1;
38 }
39
40 if ( !context.separateDepthStencilLayouts
41 && isDepthStencilFormat( format )
42 && ( checkFlag( result.aspectMask, ImageAspectFlags::eDepth )
43 || checkFlag( result.aspectMask, ImageAspectFlags::eStencil ) ) )
44 result.aspectMask = ImageAspectFlags::eDepthStencil;
45
46 return result;
47 }
48 }
49
50 //************************************************************************************************

Callers 1

memoryBarrierMethod · 0.85

Calls 1

isDepthStencilFormatFunction · 0.85

Tested by

no test coverage detected