package spirv
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8a79ad0ccfaa28cb3e37b74bb89c6af6ba4a648511848538025222f153858044
md5=61c0d0a064b4d30e8860d6890ff0aa08
Description
This library provides a code-generated SPIR-V compiler for use in OCaml projects.
SpirV operations are specified using label variants (the number of spirv operations exceeds the ocaml type tag size, so a normal type variant won't work). SpirV enumerants are represented as OCaml type variants. For the case of flag types, enumerants are represented as a list of flags. Enumerants that normally specify extended operands wrap the extended operands as a tuple of arguments to the OCaml type constructor. Literal integers are represented with the int32 type (for int32 literals, add an l at the end; e.g. 10l). Literal strings are represented with regular OCaml strings.
When specifying literal values to the OpConstant instruction, the values are wrapped with the big_int_or_float type (there is no check against the return type of OpConstant right now). The default op for a OpSpecConstantOp instruction is specified using the type spec_op. The values of spec_op are the valid OpSpecConstantOp instructions, except that the result type and result are removed and the Op prefix is removed (e.g. ```OpSpecConstantOp (type_id, result_id, `IAdd (constant_a, constant_b))``).
Extended instructions are currently implemented through a function abstraction. The extended instruction and it's operands are specified with a function in OpExtInst which has the type signature unit -> int32 list. The idea behind this is that extended instructions can be provided through other OCaml libraries which would return the compiled instruction and operands as a list of SpirV words.
Added to opam-repository:
Dev Dependencies
None
Used by
None
Conflicts
None
Build status
Results of building spirv with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 1.1.2 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure