1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-01 19:29:16 +01:00

[dxbc] Implemented stream instructions for single-stream GS

This commit is contained in:
Philip Rebohle 2018-02-04 22:59:15 +01:00
parent b8a540d4ef
commit 8c64a81e27
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 25 additions and 5 deletions

View File

@ -214,6 +214,9 @@ namespace dxvk {
case DxbcOpcode::DclSampler: case DxbcOpcode::DclSampler:
return this->emitDclSampler(ins); return this->emitDclSampler(ins);
case DxbcOpcode::DclStream:
return this->emitDclStream(ins);
case DxbcOpcode::DclUavTyped: case DxbcOpcode::DclUavTyped:
case DxbcOpcode::DclResource: 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) { void DxbcCompiler::emitDclResourceTyped(const DxbcShaderInstruction& ins) {
// dclResource takes two operands: // dclResource takes two operands:
// (dst0) The resource register ID // (dst0) The resource register ID
@ -1727,12 +1736,14 @@ namespace dxvk {
void DxbcCompiler::emitGeometryEmit(const DxbcShaderInstruction& ins) { void DxbcCompiler::emitGeometryEmit(const DxbcShaderInstruction& ins) {
switch (ins.op) { switch (ins.op) {
case DxbcOpcode::Emit: { case DxbcOpcode::Emit:
case DxbcOpcode::EmitStream: {
emitOutputSetup(); emitOutputSetup();
m_module.opEmitVertex(); m_module.opEmitVertex();
} break; } break;
case DxbcOpcode::Cut: { case DxbcOpcode::Cut:
case DxbcOpcode::CutStream: {
m_module.opEndPrimitive(); m_module.opEndPrimitive();
} break; } break;

View File

@ -430,6 +430,9 @@ namespace dxvk {
void emitDclSampler( void emitDclSampler(
const DxbcShaderInstruction& ins); const DxbcShaderInstruction& ins);
void emitDclStream(
const DxbcShaderInstruction& ins);
void emitDclResourceTyped( void emitDclResourceTyped(
const DxbcShaderInstruction& ins); const DxbcShaderInstruction& ins);

View File

@ -567,9 +567,13 @@ namespace dxvk {
/* HsJoinPhase */ /* HsJoinPhase */
{ }, { },
/* EmitStream */ /* EmitStream */
{ }, { 1, DxbcInstClass::GeometryEmit, {
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
} },
/* CutStream */ /* CutStream */
{ }, { 1, DxbcInstClass::GeometryEmit, {
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
} },
/* EmitThenCutStream */ /* EmitThenCutStream */
{ }, { },
/* InterfaceCall */ /* InterfaceCall */
@ -696,7 +700,9 @@ namespace dxvk {
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 }, { DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
} }, } },
/* DclStream */ /* DclStream */
{ }, { 1, DxbcInstClass::Declaration, {
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
} },
/* DclFunctionBody */ /* DclFunctionBody */
{ }, { },
/* DclFunctionTable */ /* DclFunctionTable */