@@ -51,6 +51,28 @@ def DXSA_GlobalFlagsAttr :
5151 let assemblyFormat = "`<` $value `>`";
5252}
5353
54+ def DXSA_TessellatorOutputPrimitiveType_OutputPoint : I32EnumAttrCase<"output_point", 1>;
55+ def DXSA_TessellatorOutputPrimitiveType_OutputLine : I32EnumAttrCase<"output_line", 2>;
56+ def DXSA_TessellatorOutputPrimitiveType_OutputTriangleCw : I32EnumAttrCase<"output_triangle_cw", 3>;
57+ def DXSA_TessellatorOutputPrimitiveType_OutputTriangleCcw : I32EnumAttrCase<"output_triangle_ccw", 4>;
58+
59+ def DXSA_TessellatorOutputPrimitiveType : I32EnumAttr<
60+ "TessellatorOutputPrimitiveType", "tessellator output primitive type", [
61+ DXSA_TessellatorOutputPrimitiveType_OutputPoint,
62+ DXSA_TessellatorOutputPrimitiveType_OutputLine,
63+ DXSA_TessellatorOutputPrimitiveType_OutputTriangleCw,
64+ DXSA_TessellatorOutputPrimitiveType_OutputTriangleCcw
65+ ]> {
66+ let cppNamespace = "::mlir::dxsa";
67+ let genSpecializedAttr = 0;
68+ }
69+
70+ def DXSA_TessellatorOutputPrimitiveTypeAttr :
71+ EnumAttr<DXSADialect, DXSA_TessellatorOutputPrimitiveType,
72+ "tessellator_output_primitive_type"> {
73+ let assemblyFormat = "$value";
74+ }
75+
5476//===----------------------------------------------------------------------===//
5577// DXSA op definitions
5678//===----------------------------------------------------------------------===//
@@ -196,4 +218,21 @@ def DXSA_DclOutputControlPointCount :
196218 let assemblyFormat = [{ $count attr-dict }];
197219}
198220
221+ def DXSA_DclTessellatorOutputPrimitive
222+ : DXSA_Op<"dcl_tessellator_output_primitive"> {
223+ let summary = "declares the tessellator output primitive type";
224+ let description = [{
225+ The `dxsa.dcl_tessellator_output_primitive` operation declares the
226+ tessellator output primitive type.
227+
228+ Example:
229+
230+ ```mlir
231+ dxsa.dcl_tessellator_output_primitive output_triangle_cw
232+ ```
233+ }];
234+ let arguments = (ins DXSA_TessellatorOutputPrimitiveTypeAttr:$type);
235+ let assemblyFormat = "$type attr-dict";
236+ }
237+
199238#endif // DXSA_OPS
0 commit comments