Commit Graph
18 Commits
Author SHA1 Message Date
Justus Klausecker 69a26976ed zig fmt
Converts usages of `@intFromEnum` and `@enumFromInt` to instead use the
new `@backingInt` and `@fromBackingInt` builtins.
2026-07-17 23:30:26 +02:00
Ali Cheraghi be7634b828 Target.spirv: omit Linkage and friends caps/ext from cpu features
Keeping these in cpu features can cause conflict because these are automatically emitted by linker. Closes #35975
2026-06-30 11:58:33 +03:30
Ali Cheraghi 85b0259307 Target: chain spirv versions 2026-06-28 18:25:43 +02:00
Ali Cheraghi 3a48f4bb40 spirv: drive capability and extension emission from target features
- Emitting `OpCapability` and `OpExtension` from assembly is no longer allowed (tbh it never was because we silently ignored them).
  They now `fail` with a message pointing users at `-mcpu`.

- `tools/gen_spirv_spec.zig` now also emits `Extension` and the `Capability.dependencies()`.
  Also To keep the feature set a reasonable size, the generator filters to an allowlist of `KHR` and `EXT` entries.
  We can decide which vendors to allow later if a use-case is found.

- `tools/update_cpu_features.zig` now uses the generated `spec.zig` and emits a  feature for every
  capability and extension, with the capability's `.deps` populated from `Capability.dependencies()`.

- `Module.finalize`, `Module.entryPoints`, `Module.addCapability`, `Module.addExtension`
  and `sections.capabilities`/`sections.extensions` are deleted.

- Linker now verifies that an `.spv` object declares the `Linkage` capability
2026-06-20 09:38:20 +02:00
Krzysztof Wolicki 9e80795623 all: update to use new std.lang.Type definitions 2026-05-27 10:03:51 +01:00
Quint Daenen 9787df9421 fix(std.Target/spirv): correct variable_pointers feature description
The description was incorrectly copied from physical_storage_buffer.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35272
2026-05-10 08:11:51 +02:00
Ali Cheraghi 1df79ab895 remove spirv cpu arch 2025-06-23 06:03:03 +02:00
Ali Cheraghi 4bf1e4d198 target: auto-generated spirv features 2025-05-21 15:26:18 +03:30
Ali Cheraghi 0901328f12 spirv: write error value in an storage buffer 2025-05-21 12:57:40 +03:30
Ali Cheraghi ee06b2ce76 spirv: require int8/int16 capabilities 2025-03-18 07:05:50 +03:30
Ali Cheraghi 50539a2447 spirv/target: arbitrary_precision_integers feature support 2025-03-17 21:56:17 +03:30
Ali Cheraghi 78ad866dd1 target: split addresses and physical_storage_buffer features 2025-03-17 21:56:17 +03:30
Ali Cheraghi a0eec9ce9e spirv: replace some unreachables with compile errors 2025-02-24 19:12:33 +01:00
Ali Cheraghi d5e1cb3ea2 spirv: ziggify and remove unknown spirv features
`OpCapability` and `OpExtension` now can also be emitted from inline assembly
2025-02-18 18:08:47 +03:30
Ali Cheraghi 1b0c7f51ef target: update spirv features 2025-02-18 18:07:48 +03:30
mlugg 0fe3fd01dd std: update std.builtin.Type fields to follow naming conventions
The compiler actually doesn't need any functional changes for this: Sema
does reification based on the tag indices of `std.builtin.Type` already!
So, no zig1.wasm update is necessary.

This change is necessary to disallow name clashes between fields and
decls on a type, which is a prerequisite of #9938.
2024-08-28 08:39:59 +01:00
Linus Groh fd434fcd38 std.Target: Rename feature_set_fns to FeatureSetFns
From https://ziglang.org/documentation/master/#Names:

> If `x` is callable, and `x`'s return type is `type`, then `x` should
> be `TitleCase`.
2024-08-12 00:34:59 +01:00
Andrew Kelley 67d48b94d6 std.Target: flatten 2024-01-01 17:51:18 -07:00