[Mlir-commits] [mlir] [mlir][spirv] Add definition for OpEmitVertex and OpEndPrimitive (PR #123759)
Igor Wodiany
llvmlistbot at llvm.org
Tue Jan 21 08:47:50 PST 2025
IgWod-IMG wrote:
Hey @kuhar,
Thank you for you feedback!
> Is the plan to allow non-compute shaders?
Yes and no, we use SPIR-V MLIR in the front-end of our research tool and we're interested in all sorts of shader, not only compute, so in that sense yes. However, we don't need intend to enable them in a runtime, e.g., provide further lowering and enabling it with `mlir-cpu-runner`, so in that sense no.
> Don't these require the Geometry execution model and capability?
Good point. I believe it should specify Geometry capability as well:
```mlir
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Geometry], []> {
```
Do I need `ExecutionMode` as well? E.g.,
```mlir
spirv.ExecutionMode @main "Triangles"
spirv.ExecutionMode @main "OutputTriangleStrip"
spirv.ExecutionMode @main "OutputVertices", 12
spirv.ExecutionMode @main "Invocations", 1
```
In that case, would it make sense to merge both functions together, since having `EmitVertex` and `EndPrimitive` separately does not make much sense? I am just not clear on the level of detail this tests needs.
Once I have a clarity on that I will push an update (that also addresses formatting issues).
Many thanks,
Igor
https://github.com/llvm/llvm-project/pull/123759
More information about the Mlir-commits
mailing list