Refactor enum flags with __underlying_type and new EnumHasAnyFlags/EnumHasAllFlags
Fixes #832 Closes #886
This commit is contained in:
@@ -85,7 +85,7 @@ void ForwardPass::Render(RenderContext& renderContext, GPUTexture* input, GPUTex
|
||||
// Try to use read-only depth if supported
|
||||
GPUTexture* depthBuffer = renderContext.Buffers->DepthBuffer;
|
||||
GPUTextureView* depthBufferHandle = depthBuffer->View();
|
||||
if (depthBuffer->GetDescription().Flags & GPUTextureFlags::ReadOnlyDepthView)
|
||||
if (EnumHasAnyFlags(depthBuffer->Flags(), GPUTextureFlags::ReadOnlyDepthView))
|
||||
depthBufferHandle = depthBuffer->ViewReadOnlyDepth();
|
||||
|
||||
// Check if there is no objects to render or no resources ready
|
||||
|
||||
Reference in New Issue
Block a user