mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +01:00
[dxbc] Implement EmitThenCut / EmitThenCutStream
This commit is contained in:
parent
07ef25fec5
commit
dd51437584
@ -1994,25 +1994,19 @@ namespace dxvk {
|
||||
|
||||
|
||||
void DxbcCompiler::emitGeometryEmit(const DxbcShaderInstruction& ins) {
|
||||
switch (ins.op) {
|
||||
case DxbcOpcode::Emit:
|
||||
case DxbcOpcode::EmitStream: {
|
||||
// Checking the negation is easier for EmitThenCut/EmitThenCutStream
|
||||
bool doEmit = ins.op != DxbcOpcode::Cut && ins.op != DxbcOpcode::CutStream;
|
||||
bool doCut = ins.op != DxbcOpcode::Emit && ins.op != DxbcOpcode::EmitStream;
|
||||
|
||||
if (doEmit) {
|
||||
emitOutputSetup();
|
||||
emitClipCullStore(DxbcSystemValue::ClipDistance, m_clipDistances);
|
||||
emitClipCullStore(DxbcSystemValue::CullDistance, m_cullDistances);
|
||||
m_module.opEmitVertex();
|
||||
} break;
|
||||
|
||||
case DxbcOpcode::Cut:
|
||||
case DxbcOpcode::CutStream: {
|
||||
m_module.opEndPrimitive();
|
||||
} break;
|
||||
|
||||
default:
|
||||
Logger::warn(str::format(
|
||||
"DxbcCompiler: Unhandled instruction: ",
|
||||
ins.op));
|
||||
}
|
||||
|
||||
if (doCut)
|
||||
m_module.opEndPrimitive();
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,7 +87,7 @@ namespace dxvk {
|
||||
/* Emit */
|
||||
{ 0, DxbcInstClass::GeometryEmit },
|
||||
/* EmitThenCut */
|
||||
{ },
|
||||
{ 0, DxbcInstClass::GeometryEmit },
|
||||
/* EndIf */
|
||||
{ 0, DxbcInstClass::ControlFlow },
|
||||
/* EndLoop */
|
||||
@ -582,7 +582,9 @@ namespace dxvk {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* EmitThenCutStream */
|
||||
{ },
|
||||
{ 1, DxbcInstClass::GeometryEmit, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* InterfaceCall */
|
||||
{ },
|
||||
/* BufInfo */
|
||||
|
Loading…
Reference in New Issue
Block a user