# spirv: update spec generator · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3d5721da239502a23cb7b3629111f40b54455ddf)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3d5721da239502a23cb7b3629111f40b54455ddf

Requested commit: 3d5721da239502a23cb7b3629111f40b54455ddf

Commit: 3d5721da239502a23cb7b3629111f40b54455ddf

Tree: 93ffa28225bb5edbb2badf1295fbf071ec05d9bb

Author: Robin Voetter

Committer: Robin Voetter

## Message

```
spirv: update spec generator

For module parsing and assembling, we will also need to know
all of the SPIR-V extensions and their instructions. This commit
updates the generator to generate those. Because there are
multiple instruction sets that each have a separate list of Opcodes,
no separate enum is generated for these opcodes. Additionally, the
previous mechanism for runtime instruction information, `Opcode`'s
`fn operands()`, has been removed in favor for
`InstructionSet.core.instructions()`.

Any mapping from operand to instruction is to be done at runtime.
Using a runtime populated hashmap should also be more efficient
than the previous mechanism using `stringToEnum`.

```

## Parents

- [3bffa58012bbe298c1f99f27e55d6f088d5d2078](https://git.cafe/gitcafe/zig/commit/3bffa58012bbe298c1f99f27e55d6f088d5d2078?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3d5721da239502a23cb7b3629111f40b54455ddf?format=markdown)
