diff options
author | Joshua Ashton <joshua@froggi.es> | 2021-01-08 03:55:38 +0300 |
---|---|---|
committer | Joshua Ashton <joshua@froggi.es> | 2021-01-08 03:56:01 +0300 |
commit | 5a7de21cde405b287a5a85f961d1481a7fb02105 (patch) | |
tree | 7b8e53c512ee0c695927ae4a2b197624beed7c8f | |
parent | 2405e474e5a102327d2e33e7c18ae160c720c23e (diff) |
[d3d11] Disallow mismatching shader bytecode and typeshader-mismatch-fix
Fixes a wine test which lead to a "refcounting bug" down the line.
-rw-r--r-- | src/d3d11/d3d11_shader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/d3d11/d3d11_shader.cpp b/src/d3d11/d3d11_shader.cpp index 3fe686cf..b3c3bfd6 100644 --- a/src/d3d11/d3d11_shader.cpp +++ b/src/d3d11/d3d11_shader.cpp @@ -34,7 +34,11 @@ namespace dxvk { // Decide whether we need to create a pass-through // geometry shader for vertex shader stream output bool passthroughShader = pDxbcModuleInfo->xfb != nullptr - && module.programInfo().type() != DxbcProgramType::GeometryShader; + && (module.programInfo().type() == DxbcProgramType::VertexShader + || module.programInfo().type() == DxbcProgramType::DomainShader); + + if (module.programInfo().shaderStage() != pShaderKey->type() && !passthroughShader) + throw DxvkError("Mismatching shader type."); m_shader = passthroughShader ? module.compilePassthroughShader(*pDxbcModuleInfo, name) |