From 5643bf47fefd6f07be979216f1a9678bb99db182 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 21 Feb 2021 02:51:59 +0100 Subject: [PATCH] [d3d11] Use discardImageView in DiscardView1 --- src/d3d11/d3d11_context.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 24dc70cfd..f9c685400 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -133,6 +133,12 @@ namespace dxvk { sr.baseMipLevel + mip, sr.baseArrayLayer + layer, mipCount)); } } + + // Since we don't handle SRVs here, we can assume that the + // view covers all aspects of the underlying resource. + EmitCs([cView = view] (DxvkContext* ctx) { + ctx->discardImageView(cView, cView->formatInfo()->aspectMask); + }); }