[Mlir-commits] [mlir] [mlir][spirv] Add support for SPV_EXT_mesh_shader extension (PR #126555)

Jakub Kuderski llvmlistbot at llvm.org
Tue Feb 11 01:54:30 PST 2025


================
@@ -0,0 +1,34 @@
+//===- MeshOps.cpp - MLIR SPIR-V Mesh Ops  --------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Defines the mesh operations in the SPIR-V dialect.
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Dialect/SPIRV/IR/SPIRVEnums.h"
+#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
+#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
+
+#include <optional>
+
+using namespace mlir;
+
+//===----------------------------------------------------------------------===//
+// spirv.EXT.EmitMeshTasks
+//===----------------------------------------------------------------------===//
+
+LogicalResult spirv::EXTEmitMeshTasksOp::verify() {
+  if (auto payloadOp = getPayload()) {
----------------
kuhar wrote:

nit: use the actual type since it's not obvious based on the context: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable

https://github.com/llvm/llvm-project/pull/126555


More information about the Mlir-commits mailing list