From 059073fcd0440b24dc9885068b209ed1b26c88e0 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 13 Sep 2018 18:25:32 +0200 Subject: [PATCH] [dxbc] Fix missing hull shader input declarations Fixes tessellation in Tomb Raider 2013. Closes #368. --- src/dxbc/dxbc_compiler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 7e86b11c..2c1005df 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -358,6 +358,11 @@ namespace dxvk { void DxbcCompiler::emitDclInterfaceReg(const DxbcShaderInstruction& ins) { switch (ins.dst[0].type) { + case DxbcOperandType::InputControlPoint: + if (m_version.type() != DxbcProgramType::HullShader) + break; + /* fall through */ + case DxbcOperandType::Input: case DxbcOperandType::Output: { // dcl_input and dcl_output instructions @@ -553,7 +558,6 @@ namespace dxvk { // ID, which has been declared already. } break; - case DxbcOperandType::InputControlPoint: case DxbcOperandType::InputPatchConstant: case DxbcOperandType::OutputControlPoint: { // These have been declared as global input and