switch format update

This commit is contained in:
Neslisah Torosdagli
2020-03-25 08:13:32 -04:00
parent f80bf797eb
commit cea9384b6b

View File

@@ -7704,115 +7704,104 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
break; break;
case glslang::EOpReportIntersection: case glslang::EOpReportIntersection:
{
typeId = builder.makeBoolType(); typeId = builder.makeBoolType();
opCode = spv::OpReportIntersectionKHR; opCode = spv::OpReportIntersectionKHR;
} break;
break;
case glslang::EOpTrace: case glslang::EOpTrace:
{
builder.createNoResultOp(spv::OpTraceRayKHR, operands); builder.createNoResultOp(spv::OpTraceRayKHR, operands);
return 0; return 0;
}
break;
case glslang::EOpExecuteCallable: case glslang::EOpExecuteCallable:
{
builder.createNoResultOp(spv::OpExecuteCallableKHR, operands); builder.createNoResultOp(spv::OpExecuteCallableKHR, operands);
return 0; return 0;
}
break; case glslang::EOpRayQueryInitialize:
case glslang::EOpRayQueryInitialize: {
builder.createNoResultOp(spv::OpRayQueryInitializeKHR, operands); builder.createNoResultOp(spv::OpRayQueryInitializeKHR, operands);
return 0; return 0;
} break; case glslang::EOpRayQueryTerminate:
case glslang::EOpRayQueryTerminate: {
builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operands); builder.createNoResultOp(spv::OpRayQueryTerminateKHR, operands);
return 0; return 0;
} break; case glslang::EOpRayQueryGenerateIntersection:
case glslang::EOpRayQueryGenerateIntersection: {
builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR, operands); builder.createNoResultOp(spv::OpRayQueryGenerateIntersectionKHR, operands);
return 0; return 0;
} break; case glslang::EOpRayQueryConfirmIntersection:
case glslang::EOpRayQueryConfirmIntersection: {
builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operands); builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operands);
return 0; return 0;
} break; case glslang::EOpRayQueryProceed:
case glslang::EOpRayQueryProceed: {
typeId = builder.makeBoolType(); typeId = builder.makeBoolType();
opCode = spv::OpRayQueryProceedKHR; opCode = spv::OpRayQueryProceedKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionType: { case glslang::EOpRayQueryGetIntersectionType:
typeId = builder.makeUintType(32); typeId = builder.makeUintType(32);
opCode = spv::OpRayQueryGetIntersectionTypeKHR; opCode = spv::OpRayQueryGetIntersectionTypeKHR;
} break; break;
case glslang::EOpRayQueryGetRayTMin: { case glslang::EOpRayQueryGetRayTMin:
typeId = builder.makeFloatType(32); typeId = builder.makeFloatType(32);
opCode = spv::OpRayQueryGetRayTMinKHR; opCode = spv::OpRayQueryGetRayTMinKHR;
} break; break;
case glslang::EOpRayQueryGetRayFlags: { case glslang::EOpRayQueryGetRayFlags:
typeId = builder.makeIntType(32); typeId = builder.makeIntType(32);
opCode = spv::OpRayQueryGetRayFlagsKHR; opCode = spv::OpRayQueryGetRayFlagsKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionT: { case glslang::EOpRayQueryGetIntersectionT:
typeId = builder.makeFloatType(32); typeId = builder.makeFloatType(32);
opCode = spv::OpRayQueryGetIntersectionTKHR; opCode = spv::OpRayQueryGetIntersectionTKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex: { case glslang::EOpRayQueryGetIntersectionInstanceCustomIndex:
typeId = builder.makeIntType(32); typeId = builder.makeIntType(32);
opCode = spv::OpRayQueryGetIntersectionInstanceCustomIndexKHR; opCode = spv::OpRayQueryGetIntersectionInstanceCustomIndexKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionInstanceId: { case glslang::EOpRayQueryGetIntersectionInstanceId:
typeId = builder.makeIntType(32); typeId = builder.makeIntType(32);
opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR; opCode = spv::OpRayQueryGetIntersectionInstanceIdKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset: { case glslang::EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
typeId = builder.makeIntType(32); typeId = builder.makeIntType(32);
opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR; opCode = spv::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionGeometryIndex: { case glslang::EOpRayQueryGetIntersectionGeometryIndex:
typeId = builder.makeIntType(32); typeId = builder.makeIntType(32);
opCode = spv::OpRayQueryGetIntersectionGeometryIndexKHR; opCode = spv::OpRayQueryGetIntersectionGeometryIndexKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionPrimitiveIndex: { case glslang::EOpRayQueryGetIntersectionPrimitiveIndex:
typeId = builder.makeIntType(32); typeId = builder.makeIntType(32);
opCode = spv::OpRayQueryGetIntersectionPrimitiveIndexKHR; opCode = spv::OpRayQueryGetIntersectionPrimitiveIndexKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionBarycentrics: { case glslang::EOpRayQueryGetIntersectionBarycentrics:
typeId = builder.makeVectorType(builder.makeFloatType(32), 2); typeId = builder.makeVectorType(builder.makeFloatType(32), 2);
opCode = spv::OpRayQueryGetIntersectionBarycentricsKHR; opCode = spv::OpRayQueryGetIntersectionBarycentricsKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionFrontFace: { case glslang::EOpRayQueryGetIntersectionFrontFace:
typeId = builder.makeBoolType(); typeId = builder.makeBoolType();
opCode = spv::OpRayQueryGetIntersectionFrontFaceKHR; opCode = spv::OpRayQueryGetIntersectionFrontFaceKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque: { case glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque:
typeId = builder.makeBoolType(); typeId = builder.makeBoolType();
opCode = spv::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR; opCode = spv::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionObjectRayDirection: { case glslang::EOpRayQueryGetIntersectionObjectRayDirection:
typeId = builder.makeVectorType(builder.makeFloatType(32), 3); typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
opCode = spv::OpRayQueryGetIntersectionObjectRayDirectionKHR; opCode = spv::OpRayQueryGetIntersectionObjectRayDirectionKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionObjectRayOrigin: { case glslang::EOpRayQueryGetIntersectionObjectRayOrigin:
typeId = builder.makeVectorType(builder.makeFloatType(32), 3); typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
opCode = spv::OpRayQueryGetIntersectionObjectRayOriginKHR; opCode = spv::OpRayQueryGetIntersectionObjectRayOriginKHR;
} break; break;
case glslang::EOpRayQueryGetWorldRayDirection: { case glslang::EOpRayQueryGetWorldRayDirection:
typeId = builder.makeVectorType(builder.makeFloatType(32), 3); typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
opCode = spv::OpRayQueryGetWorldRayDirectionKHR; opCode = spv::OpRayQueryGetWorldRayDirectionKHR;
} break; break;
case glslang::EOpRayQueryGetWorldRayOrigin: { case glslang::EOpRayQueryGetWorldRayOrigin:
typeId = builder.makeVectorType(builder.makeFloatType(32), 3); typeId = builder.makeVectorType(builder.makeFloatType(32), 3);
opCode = spv::OpRayQueryGetWorldRayOriginKHR; opCode = spv::OpRayQueryGetWorldRayOriginKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionObjectToWorld: { case glslang::EOpRayQueryGetIntersectionObjectToWorld:
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
opCode = spv::OpRayQueryGetIntersectionObjectToWorldKHR; opCode = spv::OpRayQueryGetIntersectionObjectToWorldKHR;
} break; break;
case glslang::EOpRayQueryGetIntersectionWorldToObject: { case glslang::EOpRayQueryGetIntersectionWorldToObject:
typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3);
opCode = spv::OpRayQueryGetIntersectionWorldToObjectKHR; opCode = spv::OpRayQueryGetIntersectionWorldToObjectKHR;
} break; break;
case glslang::EOpWritePackedPrimitiveIndices4x8NV: case glslang::EOpWritePackedPrimitiveIndices4x8NV:
builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands); builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands);
return 0; return 0;