mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[dxbc] oDepth no longer treated as standard output register
Fixes a crash in the shader compiler when starting up Tomb Raider.
This commit is contained in:
parent
f97ea7fcea
commit
64a74735f8
@ -207,6 +207,9 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void DxbcCompiler::emitDclInterfaceReg(const DxbcShaderInstruction& ins) {
|
void DxbcCompiler::emitDclInterfaceReg(const DxbcShaderInstruction& ins) {
|
||||||
|
switch (ins.dst[0].type) {
|
||||||
|
case DxbcOperandType::Input:
|
||||||
|
case DxbcOperandType::Output: {
|
||||||
// dcl_input and dcl_output instructions
|
// dcl_input and dcl_output instructions
|
||||||
// have the following operands:
|
// have the following operands:
|
||||||
// (dst0) The register to declare
|
// (dst0) The register to declare
|
||||||
@ -283,6 +286,14 @@ namespace dxvk {
|
|||||||
"DxbcCompiler: Unexpected opcode: ",
|
"DxbcCompiler: Unexpected opcode: ",
|
||||||
ins.op));
|
ins.op));
|
||||||
}
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
Logger::err(str::format(
|
||||||
|
"DxbcCompiler: Unsupported operand type declaration: ",
|
||||||
|
ins.dst[0].type));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1958,7 +1969,8 @@ namespace dxvk {
|
|||||||
// documentation, they are required to match the type of
|
// documentation, they are required to match the type of
|
||||||
// the render target.
|
// the render target.
|
||||||
for (auto e = m_osgn->begin(); e != m_osgn->end(); e++) {
|
for (auto e = m_osgn->begin(); e != m_osgn->end(); e++) {
|
||||||
if (e->systemValue == DxbcSystemValue::None) {
|
if (e->systemValue == DxbcSystemValue::None
|
||||||
|
&& e->registerId != 0xFFFFFFFF /* depth */) {
|
||||||
DxbcRegisterInfo info;
|
DxbcRegisterInfo info;
|
||||||
info.type.ctype = e->componentType;
|
info.type.ctype = e->componentType;
|
||||||
info.type.ccount = e->componentMask.setCount();
|
info.type.ccount = e->componentMask.setCount();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user