From bc61d6fcfa2884f8d2f32b611505c35ada4c443b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 12 Mar 2024 14:54:13 +0100 Subject: rhi: Make it possible to discard depth/stencil even when using a texture Also implement this for OpenGL ES since it can be relevant with tiled architectures wrt performance. Task-number: QTBUG-122669 Change-Id: I90dcfe4f5f9edbb8dfb51189d46b89ef2c7a7c06 Reviewed-by: Qt CI Bot Reviewed-by: Andy Nichols --- src/gui/rhi/qrhimetal.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/rhi/qrhimetal.mm') diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 7530186f11..6302a958c9 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -4226,7 +4226,7 @@ bool QMetalTextureRenderTarget::create() QMetalTexture *depthTexD = QRHI_RES(QMetalTexture, m_desc.depthTexture()); d->fb.dsTex = depthTexD->d->tex; d->fb.hasStencil = rhiD->isStencilSupportingFormat(depthTexD->format()); - d->fb.depthNeedsStore = true; + d->fb.depthNeedsStore = !m_flags.testFlag(DoNotStoreDepthStencilContents); if (d->colorAttCount == 0) { d->pixelSize = depthTexD->pixelSize(); d->sampleCount = depthTexD->samples; -- cgit v1.2.3