@@ -733,6 +733,11 @@ class DXBuilder {
733733 optionalToAttr (space));
734734 }
735735
736+ Instruction buildInterfaceCall (Operand operand, uint32_t callSite,
737+ Location loc) {
738+ return dxsa::InterfaceCall::create (builder, loc, operand, callSite);
739+ }
740+
736741private:
737742 MLIRContext *context;
738743 ModuleOp module ;
@@ -1476,6 +1481,22 @@ class Parser {
14761481 return builder.buildDclSampler (id, lbound, ubound, space, *mode, loc);
14771482 }
14781483
1484+ FailureOr<Instruction> parseInterfaceCall (uint32_t opcodeToken,
1485+ Location loc) {
1486+ if (DECODE_IS_D3D10_SB_OPCODE_EXTENDED (opcodeToken)) {
1487+ return emitError (getLocation (),
1488+ " extended interface calls are not supported" );
1489+ }
1490+
1491+ auto callSite = parseToken ();
1492+ FAILURE_IF_FAILED (callSite);
1493+
1494+ auto operand = parseOperand ();
1495+ FAILURE_IF_FAILED (operand);
1496+
1497+ return builder.buildInterfaceCall (*operand, *callSite, loc);
1498+ }
1499+
14791500 OptionalParseResult parseDclInstruction (uint32_t opcodeToken, Location loc,
14801501 Instruction &out) {
14811502 FailureOr<Instruction> result;
@@ -1567,6 +1588,9 @@ class Parser {
15671588 case D3D10_SB_OPCODE_DCL_SAMPLER:
15681589 result = parseDclSampler (opcodeToken, loc);
15691590 break ;
1591+ case D3D11_SB_OPCODE_INTERFACE_CALL:
1592+ result = parseInterfaceCall (opcodeToken, loc);
1593+ break ;
15701594 default :
15711595 return std::nullopt ;
15721596 }
0 commit comments