EmitVertex/EndPrimitive opcodes have no return type or ID

This commit is contained in:
baldurk committed 2016-02-07 18:51:42 +01:00
1 parent 2b89393e55
commit cf0bd455c2
1 file changed
+18 -8
@@ -1204,10 +1204,6 @@ struct SPVInstruction
case spv::OpDPdxCoarse:
case spv::OpDPdyCoarse:
case spv::OpFwidthCoarse:
case spv::OpEmitVertex:
case spv::OpEmitStreamVertex:
case spv::OpEndPrimitive:
case spv::OpEndStreamPrimitive:
case spv::OpImageSparseTexelsResident:
case spv::OpImage:
case spv::OpSampledImage:
@@ -1286,6 +1282,13 @@ struct SPVInstruction
return ret;
}
case spv::OpEmitVertex:
case spv::OpEmitStreamVertex:
case spv::OpEndPrimitive:
case spv::OpEndStreamPrimitive:
{
return ToStr::Get(opcode) + "()";
}
case spv::OpVectorShuffle:
{
RDCASSERT(op);
@@ -4538,10 +4541,6 @@ void ParseSPIRV(uint32_t *spirv, size_t spirvLength, SPVModule &module)
case spv::OpDPdxCoarse:
case spv::OpDPdyCoarse:
case spv::OpFwidthCoarse:
case spv::OpEmitVertex:
case spv::OpEmitStreamVertex:
case spv::OpEndPrimitive:
case spv::OpEndStreamPrimitive:
case spv::OpImageSparseTexelsResident:
case spv::OpImage:
case spv::OpSampledImage:
@@ -4591,6 +4590,17 @@ void ParseSPIRV(uint32_t *spirv, size_t spirvLength, SPVModule &module)
curBlock->instructions.push_back(&op);
break;
}
case spv::OpEmitVertex:
case spv::OpEmitStreamVertex:
case spv::OpEndPrimitive:
case spv::OpEndStreamPrimitive:
{
// these don't emit an ID, don't take a type, they are just
// single operations
op.op = new SPVOperation();
op.op->type = NULL;
break;
}
case spv::OpVectorShuffle:
{
SPVInstruction *typeInst = module.GetByID(spirv[it+1]);