From 9fc09c843de9052a7b1817a602dad88a7e267cc4 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 1 May 2019 00:32:03 +0200 Subject: [PATCH] [d3d11] Set up unused extra state for the backend correctly --- src/d3d11/d3d11_context.cpp | 14 +++++++++++++- src/d3d11/d3d11_context.h | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index d9694e2a0..bdfe1afba 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -3124,7 +3124,18 @@ namespace dxvk { cScissors.data()); }); } - + + + void D3D11DeviceContext::ApplyUnusedState() { + // Initialize state that isn't exposed in D3D11 + EmitCs([] (DxvkContext* ctx) { + DxvkExtraState xs; + xs.alphaCompareOp = VK_COMPARE_OP_ALWAYS; + + ctx->setExtraState(xs); + }); + } + void D3D11DeviceContext::BindShader( DxbcProgramType ShaderStage, @@ -3565,6 +3576,7 @@ namespace dxvk { ApplyStencilRef(); ApplyRasterizerState(); ApplyViewportState(); + ApplyUnusedState(); BindDrawBuffer( m_state.id.argBuffer.ptr()); diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index 0a6e2a111..e42a683bc 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -680,6 +680,8 @@ namespace dxvk { void ApplyRasterizerState(); void ApplyViewportState(); + + void ApplyUnusedState(); void BindShader( DxbcProgramType ShaderStage,