@@ -647,11 +647,11 @@ class DXBuilder {
647647 }
648648
649649 Instruction buildDclInterface (uint32_t index, dxsa::InterfaceAccess access,
650- uint32_t arrayLength, uint32_t tableLength ,
650+ uint32_t arrayLength, uint32_t numCallSites ,
651651 ArrayRef<int32_t > tables, Location loc) {
652652 auto *ctx = builder.getContext ();
653653 return dxsa::DclInterface::create (builder, loc, index, access, arrayLength,
654- tableLength ,
654+ numCallSites ,
655655 DenseI32ArrayAttr::get (ctx, tables));
656656 }
657657
@@ -1220,37 +1220,35 @@ class Parser {
12201220
12211221 FailureOr<Instruction> parseDclInterface (uint32_t opcodeToken, Location loc) {
12221222 bool isDynamic = DECODE_D3D11_SB_INTERFACE_INDEXED_BIT (opcodeToken);
1223- auto access = dxsa::symbolizeInterfaceAccess (isDynamic);
1224- assert (access && " unhandled interface access kind " ); // access kind is 1 bit
1223+ auto access = isDynamic ? dxsa::InterfaceAccess::dynamic
1224+ : dxsa::InterfaceAccess::immediate;
12251225
12261226 // Index of the interface (start index for an array).
12271227 auto index = parseToken ();
12281228 FAILURE_IF_FAILED (index);
12291229
12301230 // Number of call sites (number of bodies in each table).
1231- auto tableLength = parseToken ();
1232- FAILURE_IF_FAILED (tableLength );
1231+ auto numCallSites = parseToken ();
1232+ FAILURE_IF_FAILED (numCallSites );
12331233
1234- auto interfaceArrayLength = parseToken ();
1235- FAILURE_IF_FAILED (interfaceArrayLength );
1234+ auto packedLenghts = parseToken ();
1235+ FAILURE_IF_FAILED (packedLenghts );
12361236
12371237 // Number of tables (variants).
1238- uint32_t interfaceLength =
1239- DECODE_D3D11_SB_INTERFACE_TABLE_LENGTH (*interfaceArrayLength);
1238+ auto tableLength = DECODE_D3D11_SB_INTERFACE_TABLE_LENGTH (*packedLenghts);
12401239
12411240 // Number of slots to be defined at runtime.
1242- uint32_t arrayLength =
1243- DECODE_D3D11_SB_INTERFACE_ARRAY_LENGTH (*interfaceArrayLength);
1241+ auto arrayLength = DECODE_D3D11_SB_INTERFACE_ARRAY_LENGTH (*packedLenghts);
12441242
12451243 SmallVector<int32_t , 16 > tables;
1246- tables.resize (interfaceLength );
1247- for (uint32_t i = 0 ; i < interfaceLength ; ++i) {
1244+ tables.resize (tableLength );
1245+ for (uint32_t i = 0 ; i < tableLength ; ++i) {
12481246 auto tableIndex = parseToken ();
12491247 FAILURE_IF_FAILED (tableIndex);
12501248 tables[i] = *tableIndex;
12511249 }
12521250
1253- return builder.buildDclInterface (*index, * access, arrayLength, *tableLength ,
1251+ return builder.buildDclInterface (*index, access, arrayLength, *numCallSites ,
12541252 tables, loc);
12551253 }
12561254
0 commit comments