From 812580e0b9cba20ca50fbad3c39282621aff7779 Mon Sep 17 00:00:00 2001 From: chyyran Date: Tue, 29 Nov 2022 02:13:50 -0500 Subject: [PATCH] d3d11: unbind resources when done --- librashader-runtime-d3d11/src/filter_pass.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/librashader-runtime-d3d11/src/filter_pass.rs b/librashader-runtime-d3d11/src/filter_pass.rs index b11c787..2f62a3a 100644 --- a/librashader-runtime-d3d11/src/filter_pass.rs +++ b/librashader-runtime-d3d11/src/filter_pass.rs @@ -376,6 +376,12 @@ impl FilterPass { // must be under primitive topology trianglestrip with quad context.Draw(4, 0); } + + unsafe { + // unbind resources. + context.PSSetShaderResources(0, Some(&[None; 16])); + context.OMSetRenderTargets(None, None); + } Ok(()) } }