Skip to content

Commit

Permalink
Fixed #54 - the utils::ClearDepthStencilAttachment function was using…
Browse files Browse the repository at this point in the history
… clearTextureFloat instead of clearDepthStencilTexture.
  • Loading branch information
apanteleev committed May 10, 2024
1 parent 1fc4639 commit 9040d33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ namespace nvrhi::utils
const FramebufferAttachment& att = framebuffer->getDesc().depthAttachment;
if (att.texture)
{
commandList->clearTextureFloat(att.texture, att.subresources, Color(depth, float(stencil), 0.f, 0.f));
const FormatInfo& formatInfo = getFormatInfo(att.texture->getDesc().format);
commandList->clearDepthStencilTexture(att.texture, att.subresources, formatInfo.hasDepth, depth,
formatInfo.hasStencil, stencil);
}
}

Expand Down

0 comments on commit 9040d33

Please sign in to comment.