diff --git a/src/dxbc/dxbc_compiler.cpp b/src/dxbc/dxbc_compiler.cpp index 66ac72f3..139d6fc4 100644 --- a/src/dxbc/dxbc_compiler.cpp +++ b/src/dxbc/dxbc_compiler.cpp @@ -214,6 +214,9 @@ namespace dxvk { case DxbcOpcode::DclSampler: return this->emitDclSampler(ins); + + case DxbcOpcode::DclStream: + return this->emitDclStream(ins); case DxbcOpcode::DclUavTyped: case DxbcOpcode::DclResource: @@ -631,6 +634,12 @@ namespace dxvk { } + void DxbcCompiler::emitDclStream(const DxbcShaderInstruction& ins) { + if (ins.dst[0].idx[0].offset != 0) + Logger::err("Dxbc: Multiple streams not supported"); + } + + void DxbcCompiler::emitDclResourceTyped(const DxbcShaderInstruction& ins) { // dclResource takes two operands: // (dst0) The resource register ID @@ -1727,12 +1736,14 @@ namespace dxvk { void DxbcCompiler::emitGeometryEmit(const DxbcShaderInstruction& ins) { switch (ins.op) { - case DxbcOpcode::Emit: { + case DxbcOpcode::Emit: + case DxbcOpcode::EmitStream: { emitOutputSetup(); m_module.opEmitVertex(); } break; - case DxbcOpcode::Cut: { + case DxbcOpcode::Cut: + case DxbcOpcode::CutStream: { m_module.opEndPrimitive(); } break; diff --git a/src/dxbc/dxbc_compiler.h b/src/dxbc/dxbc_compiler.h index e9c257c9..7ab0172e 100644 --- a/src/dxbc/dxbc_compiler.h +++ b/src/dxbc/dxbc_compiler.h @@ -430,6 +430,9 @@ namespace dxvk { void emitDclSampler( const DxbcShaderInstruction& ins); + void emitDclStream( + const DxbcShaderInstruction& ins); + void emitDclResourceTyped( const DxbcShaderInstruction& ins); diff --git a/src/dxbc/dxbc_defs.cpp b/src/dxbc/dxbc_defs.cpp index 314afcb1..46e2ff9c 100644 --- a/src/dxbc/dxbc_defs.cpp +++ b/src/dxbc/dxbc_defs.cpp @@ -567,9 +567,13 @@ namespace dxvk { /* HsJoinPhase */ { }, /* EmitStream */ - { }, + { 1, DxbcInstClass::GeometryEmit, { + { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, + } }, /* CutStream */ - { }, + { 1, DxbcInstClass::GeometryEmit, { + { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, + } }, /* EmitThenCutStream */ { }, /* InterfaceCall */ @@ -696,7 +700,9 @@ namespace dxvk { { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, } }, /* DclStream */ - { }, + { 1, DxbcInstClass::Declaration, { + { DxbcOperandKind::DstReg, DxbcScalarType::Uint32 }, + } }, /* DclFunctionBody */ { }, /* DclFunctionTable */