@@ -254,19 +254,30 @@ def GetMeshBuiltinInputOp : LgcOp<"get.mesh.builtin.input", [Memory<[]>, WillRet
254
254
}];
255
255
}
256
256
257
- def WriteMeshOutputOp : LgcOp<"write.mesh.output", [Memory<[]>]> {
258
- let arguments = (ins AttrI1:$is_primitive, AttrI32:$location, I32:$location_offset , I32:$component_index, I32:$prim_or_vertex_index , value:$output_value);
257
+ def WriteMeshVertexOutputOp : LgcOp<"write.mesh.vertex .output", [Memory<[]>]> {
258
+ let arguments = (ins I32:$output_offset , I32:$vertex_index , value:$output_value);
259
259
let results = (outs);
260
260
261
- let summary = "Write mesh shader primitive/ vertex outputs";
261
+ let summary = "Write mesh shader vertex outputs";
262
262
let description = [{
263
- In the mesh shader, write mesh shader primitive/ vertex outputs to LDS.
263
+ In the mesh shader, write mesh shader vertex outputs to LDS.
264
264
265
- `is_primitive` indicates if this write is for a primitive output or for a vertex output.
266
- `location` is the start location of this output.
267
- `location_offset` is the relative location offset of this output, used by arrayed outputs.
268
- `component_index` is the component index of this output when component addressing is involved.
269
- `prim_or_vertex_index` is the primitive/vertex index specifying which primitive/vertex to write.
265
+ `output_offset` is the relative offset of this output (in dwords) within all outputs of the indexed vertex.
266
+ `vertex_index` is the vertex index specifying which vertex to write.
267
+ `output_value` is the output value to write.
268
+ }];
269
+ }
270
+
271
+ def WriteMeshPrimitiveOutputOp : LgcOp<"write.mesh.primitive.output", [Memory<[]>]> {
272
+ let arguments = (ins I32:$output_offset, I32:$primitive_index, value:$output_value);
273
+ let results = (outs);
274
+
275
+ let summary = "Write mesh shader primitive outputs";
276
+ let description = [{
277
+ In the mesh shader, write mesh shader primitive outputs to LDS.
278
+
279
+ `output_offset` is the relative offset of this output (in dwords) within all outputs of the indexed primitive.
280
+ `primitive_index` is the primitive index specifying which primitive to write.
270
281
`output_value` is the output value to write.
271
282
}];
272
283
}
0 commit comments