mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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) {
|
void DxbcCompiler::emitGeometryEmit(const DxbcShaderInstruction& ins) {
|
||||||
switch (ins.op) {
|
// Checking the negation is easier for EmitThenCut/EmitThenCutStream
|
||||||
case DxbcOpcode::Emit:
|
bool doEmit = ins.op != DxbcOpcode::Cut && ins.op != DxbcOpcode::CutStream;
|
||||||
case DxbcOpcode::EmitStream: {
|
bool doCut = ins.op != DxbcOpcode::Emit && ins.op != DxbcOpcode::EmitStream;
|
||||||
|
|
||||||
|
if (doEmit) {
|
||||||
emitOutputSetup();
|
emitOutputSetup();
|
||||||
emitClipCullStore(DxbcSystemValue::ClipDistance, m_clipDistances);
|
emitClipCullStore(DxbcSystemValue::ClipDistance, m_clipDistances);
|
||||||
emitClipCullStore(DxbcSystemValue::CullDistance, m_cullDistances);
|
emitClipCullStore(DxbcSystemValue::CullDistance, m_cullDistances);
|
||||||
m_module.opEmitVertex();
|
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 */
|
/* Emit */
|
||||||
{ 0, DxbcInstClass::GeometryEmit },
|
{ 0, DxbcInstClass::GeometryEmit },
|
||||||
/* EmitThenCut */
|
/* EmitThenCut */
|
||||||
{ },
|
{ 0, DxbcInstClass::GeometryEmit },
|
||||||
/* EndIf */
|
/* EndIf */
|
||||||
{ 0, DxbcInstClass::ControlFlow },
|
{ 0, DxbcInstClass::ControlFlow },
|
||||||
/* EndLoop */
|
/* EndLoop */
|
||||||
@ -582,7 +582,9 @@ namespace dxvk {
|
|||||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
} },
|
} },
|
||||||
/* EmitThenCutStream */
|
/* EmitThenCutStream */
|
||||||
{ },
|
{ 1, DxbcInstClass::GeometryEmit, {
|
||||||
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
|
} },
|
||||||
/* InterfaceCall */
|
/* InterfaceCall */
|
||||||
{ },
|
{ },
|
||||||
/* BufInfo */
|
/* BufInfo */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user