# spirv: improve union operations · gitcafe/zig

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

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

Visibility: public

Requested revision: 1deec09f03d07aefcff1f886085c929c93669b5d

Requested commit: 1deec09f03d07aefcff1f886085c929c93669b5d

Commit: 1deec09f03d07aefcff1f886085c929c93669b5d

Tree: b8ceeaa4aef003c3c701252f5b5d4238be8a748e

Author: Robin Voetter

Committer: Robin Voetter

## Message

```
spirv: improve union operations

This removes the strategy where union with different active
fields would be generated, and instead simply pointer casts
the active field type where required. This also allows removing
spv.ptrType and using self.ptrType instead, and allows caching
all union types (because there is only the canonical one).

```

## Parents

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

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