diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fd07b9add4..5e6cec1c28 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,6 +50,24 @@ jobs: uses: actions/checkout@v4 - name: Build and Test run: sh ci/aarch64-linux-release.sh + riscv64-linux-debug: + if: ${{ github.event_name == 'push' }} + timeout-minutes: 1020 + runs-on: [self-hosted, Linux, riscv64] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build and Test + run: sh ci/riscv64-linux-debug.sh + riscv64-linux-release: + if: ${{ github.event_name == 'push' }} + timeout-minutes: 900 + runs-on: [self-hosted, Linux, riscv64] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build and Test + run: sh ci/riscv64-linux-release.sh x86_64-macos-release: runs-on: "macos-13" env: diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh new file mode 100755 index 0000000000..564a7ca611 --- /dev/null +++ b/ci/riscv64-linux-debug.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# Requires cmake ninja-build + +set -x +set -e + +ARCH="$(uname -m)" +TARGET="$ARCH-linux-musl" +MCPU="spacemit_x60" +CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.15.0-dev.929+31e46be74" +PREFIX="$HOME/deps/$CACHE_BASENAME" +ZIG="$PREFIX/bin/zig" + +export PATH="$HOME/local/bin:$PATH" + +# Make the `zig version` number consistent. +# This will affect the cmake command below. +git fetch --unshallow || true +git fetch --tags + +# Override the cache directories because they won't actually help other CI runs +# which will be testing alternate versions of zig, and ultimately would just +# fill up space on the hard drive for no reason. +export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" +export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" + +mkdir build-debug +cd build-debug + +export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" +export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" + +cmake .. \ + -DCMAKE_INSTALL_PREFIX="stage3-debug" \ + -DCMAKE_PREFIX_PATH="$PREFIX" \ + -DCMAKE_BUILD_TYPE=Debug \ + -DZIG_TARGET_TRIPLE="$TARGET" \ + -DZIG_TARGET_MCPU="$MCPU" \ + -DZIG_STATIC=ON \ + -DZIG_NO_LIB=ON \ + -GNinja + +# Now cmake will use zig as the C/C++ compiler. We reset the environment variables +# so that installation and testing do not get affected by them. +unset CC +unset CXX + +ninja install + +# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. +stage3-debug/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-link test-stack-traces test-asm-link test-llvm-ir docs \ + --maxrss 34359738368 \ + -Dstatic-llvm \ + -Dskip-non-native \ + -Dtarget=native-native-musl \ + --search-prefix "$PREFIX" \ + --zig-lib-dir "$PWD/../lib" diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh new file mode 100755 index 0000000000..a90335e8f2 --- /dev/null +++ b/ci/riscv64-linux-release.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# Requires cmake ninja-build + +set -x +set -e + +ARCH="$(uname -m)" +TARGET="$ARCH-linux-musl" +MCPU="spacemit_x60" +CACHE_BASENAME="zig+llvm+lld+clang-riscv64-linux-musl-0.15.0-dev.929+31e46be74" +PREFIX="$HOME/deps/$CACHE_BASENAME" +ZIG="$PREFIX/bin/zig" + +export PATH="$HOME/local/bin:$PATH" + +# Make the `zig version` number consistent. +# This will affect the cmake command below. +git fetch --unshallow || true +git fetch --tags + +# Override the cache directories because they won't actually help other CI runs +# which will be testing alternate versions of zig, and ultimately would just +# fill up space on the hard drive for no reason. +export ZIG_GLOBAL_CACHE_DIR="$PWD/zig-global-cache" +export ZIG_LOCAL_CACHE_DIR="$PWD/zig-local-cache" + +mkdir build-release +cd build-release + +export CC="$ZIG cc -target $TARGET -mcpu=$MCPU" +export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU" + +cmake .. \ + -DCMAKE_INSTALL_PREFIX="stage3-release" \ + -DCMAKE_PREFIX_PATH="$PREFIX" \ + -DCMAKE_BUILD_TYPE=Release \ + -DZIG_TARGET_TRIPLE="$TARGET" \ + -DZIG_TARGET_MCPU="$MCPU" \ + -DZIG_STATIC=ON \ + -DZIG_NO_LIB=ON \ + -GNinja + +# Now cmake will use zig as the C/C++ compiler. We reset the environment variables +# so that installation and testing do not get affected by them. +unset CC +unset CXX + +ninja install + +# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts. +stage3-release/bin/zig build test-cases test-modules test-unit test-standalone test-c-abi test-link test-stack-traces test-asm-link test-llvm-ir docs \ + --maxrss 34359738368 \ + -Dstatic-llvm \ + -Dskip-non-native \ + -Dtarget=native-native-musl \ + --search-prefix "$PREFIX" \ + --zig-lib-dir "$PWD/../lib" diff --git a/doc/langref/build_c.zig b/doc/langref/build_c.zig index 2cd296932e..08f1683e9f 100644 --- a/doc/langref/build_c.zig +++ b/doc/langref/build_c.zig @@ -1,7 +1,8 @@ const std = @import("std"); pub fn build(b: *std.Build) void { - const lib = b.addSharedLibrary(.{ + const lib = b.addLibrary(.{ + .linkage = .dynamic, .name = "mathtest", .root_source_file = b.path("mathtest.zig"), .version = .{ .major = 1, .minor = 0, .patch = 0 }, diff --git a/doc/langref/test_noreturn_from_exit.zig b/doc/langref/test_noreturn_from_exit.zig index 235eec7b3b..4c5277d2e6 100644 --- a/doc/langref/test_noreturn_from_exit.zig +++ b/doc/langref/test_noreturn_from_exit.zig @@ -3,7 +3,7 @@ const builtin = @import("builtin"); const native_arch = builtin.cpu.arch; const expect = std.testing.expect; -const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .Stdcall else .C; +const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .{ .x86_stdcall = .{} } else .c; extern "kernel32" fn ExitProcess(exit_code: c_uint) callconv(WINAPI) noreturn; test "foo" { diff --git a/lib/compiler/aro/aro/Parser.zig b/lib/compiler/aro/aro/Parser.zig index ada6298a87..e8a2da48a5 100644 --- a/lib/compiler/aro/aro/Parser.zig +++ b/lib/compiler/aro/aro/Parser.zig @@ -8259,7 +8259,7 @@ fn charLiteral(p: *Parser) Error!Result { const slice = char_kind.contentSlice(p.tokSlice(p.tok_i)); var is_multichar = false; - if (slice.len == 1 and std.ascii.isASCII(slice[0])) { + if (slice.len == 1 and std.ascii.isAscii(slice[0])) { // fast path: single unescaped ASCII char val = slice[0]; } else { diff --git a/lib/compiler/aro_translate_c.zig b/lib/compiler/aro_translate_c.zig index 939aede655..015a558d4e 100644 --- a/lib/compiler/aro_translate_c.zig +++ b/lib/compiler/aro_translate_c.zig @@ -1820,7 +1820,7 @@ pub fn main() !void { var tree = translate(gpa, &aro_comp, args) catch |err| switch (err) { error.ParsingFailed, error.FatalError => renderErrorsAndExit(&aro_comp), error.OutOfMemory => return error.OutOfMemory, - error.StreamTooLong => std.zig.fatal("An input file was larger than 4GiB", .{}), + error.StreamTooLong => std.process.fatal("An input file was larger than 4GiB", .{}), }; defer tree.deinit(gpa); diff --git a/lib/compiler/objcopy.zig b/lib/compiler/objcopy.zig index 3e383e6ad4..98bf5d2bcf 100644 --- a/lib/compiler/objcopy.zig +++ b/lib/compiler/objcopy.zig @@ -7,7 +7,7 @@ const Allocator = std.mem.Allocator; const File = std.fs.File; const assert = std.debug.assert; -const fatal = std.zig.fatal; +const fatal = std.process.fatal; const Server = std.zig.Server; pub fn main() !void { diff --git a/lib/std/Build.zig b/lib/std/Build.zig index 27d3a4eaff..e8db5298a7 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -693,6 +693,7 @@ pub fn addOptions(b: *Build) *Step.Options { pub const ExecutableOptions = struct { name: []const u8, + root_module: *Module, version: ?std.SemanticVersion = null, linkage: ?std.builtin.LinkMode = null, max_rss: usize = 0, @@ -705,58 +706,12 @@ pub const ExecutableOptions = struct { /// Can be set regardless of target. The `.manifest` file will be ignored /// if the target object format does not support embedded manifests. win32_manifest: ?LazyPath = null, - - /// Prefer populating this field (using e.g. `createModule`) instead of populating - /// the following fields (`root_source_file` etc). In a future release, those fields - /// will be removed, and this field will become non-optional. - root_module: ?*Module = null, - - /// Deprecated; prefer populating `root_module`. - root_source_file: ?LazyPath = null, - /// Deprecated; prefer populating `root_module`. - target: ?ResolvedTarget = null, - /// Deprecated; prefer populating `root_module`. - optimize: std.builtin.OptimizeMode = .Debug, - /// Deprecated; prefer populating `root_module`. - code_model: std.builtin.CodeModel = .default, - /// Deprecated; prefer populating `root_module`. - link_libc: ?bool = null, - /// Deprecated; prefer populating `root_module`. - single_threaded: ?bool = null, - /// Deprecated; prefer populating `root_module`. - pic: ?bool = null, - /// Deprecated; prefer populating `root_module`. - strip: ?bool = null, - /// Deprecated; prefer populating `root_module`. - unwind_tables: ?std.builtin.UnwindTables = null, - /// Deprecated; prefer populating `root_module`. - omit_frame_pointer: ?bool = null, - /// Deprecated; prefer populating `root_module`. - sanitize_thread: ?bool = null, - /// Deprecated; prefer populating `root_module`. - error_tracing: ?bool = null, }; pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile { - if (options.root_module != null and options.target != null) { - @panic("`root_module` and `target` cannot both be populated"); - } return .create(b, .{ .name = options.name, - .root_module = options.root_module orelse b.createModule(.{ - .root_source_file = options.root_source_file, - .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), - .optimize = options.optimize, - .link_libc = options.link_libc, - .single_threaded = options.single_threaded, - .pic = options.pic, - .strip = options.strip, - .unwind_tables = options.unwind_tables, - .omit_frame_pointer = options.omit_frame_pointer, - .sanitize_thread = options.sanitize_thread, - .error_tracing = options.error_tracing, - .code_model = options.code_model, - }), + .root_module = options.root_module, .version = options.version, .kind = .exe, .linkage = options.linkage, @@ -770,62 +725,17 @@ pub fn addExecutable(b: *Build, options: ExecutableOptions) *Step.Compile { pub const ObjectOptions = struct { name: []const u8, + root_module: *Module, max_rss: usize = 0, use_llvm: ?bool = null, use_lld: ?bool = null, zig_lib_dir: ?LazyPath = null, - - /// Prefer populating this field (using e.g. `createModule`) instead of populating - /// the following fields (`root_source_file` etc). In a future release, those fields - /// will be removed, and this field will become non-optional. - root_module: ?*Module = null, - - /// Deprecated; prefer populating `root_module`. - root_source_file: ?LazyPath = null, - /// Deprecated; prefer populating `root_module`. - target: ?ResolvedTarget = null, - /// Deprecated; prefer populating `root_module`. - optimize: std.builtin.OptimizeMode = .Debug, - /// Deprecated; prefer populating `root_module`. - code_model: std.builtin.CodeModel = .default, - /// Deprecated; prefer populating `root_module`. - link_libc: ?bool = null, - /// Deprecated; prefer populating `root_module`. - single_threaded: ?bool = null, - /// Deprecated; prefer populating `root_module`. - pic: ?bool = null, - /// Deprecated; prefer populating `root_module`. - strip: ?bool = null, - /// Deprecated; prefer populating `root_module`. - unwind_tables: ?std.builtin.UnwindTables = null, - /// Deprecated; prefer populating `root_module`. - omit_frame_pointer: ?bool = null, - /// Deprecated; prefer populating `root_module`. - sanitize_thread: ?bool = null, - /// Deprecated; prefer populating `root_module`. - error_tracing: ?bool = null, }; pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile { - if (options.root_module != null and options.target != null) { - @panic("`root_module` and `target` cannot both be populated"); - } return .create(b, .{ .name = options.name, - .root_module = options.root_module orelse b.createModule(.{ - .root_source_file = options.root_source_file, - .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), - .optimize = options.optimize, - .link_libc = options.link_libc, - .single_threaded = options.single_threaded, - .pic = options.pic, - .strip = options.strip, - .unwind_tables = options.unwind_tables, - .omit_frame_pointer = options.omit_frame_pointer, - .sanitize_thread = options.sanitize_thread, - .error_tracing = options.error_tracing, - .code_model = options.code_model, - }), + .root_module = options.root_module, .kind = .obj, .max_rss = options.max_rss, .use_llvm = options.use_llvm, @@ -834,153 +744,6 @@ pub fn addObject(b: *Build, options: ObjectOptions) *Step.Compile { }); } -pub const SharedLibraryOptions = struct { - name: []const u8, - version: ?std.SemanticVersion = null, - max_rss: usize = 0, - use_llvm: ?bool = null, - use_lld: ?bool = null, - zig_lib_dir: ?LazyPath = null, - /// Embed a `.manifest` file in the compilation if the object format supports it. - /// https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-files-reference - /// Manifest files must have the extension `.manifest`. - /// Can be set regardless of target. The `.manifest` file will be ignored - /// if the target object format does not support embedded manifests. - win32_manifest: ?LazyPath = null, - - /// Prefer populating this field (using e.g. `createModule`) instead of populating - /// the following fields (`root_source_file` etc). In a future release, those fields - /// will be removed, and this field will become non-optional. - root_module: ?*Module = null, - - /// Deprecated; prefer populating `root_module`. - root_source_file: ?LazyPath = null, - /// Deprecated; prefer populating `root_module`. - target: ?ResolvedTarget = null, - /// Deprecated; prefer populating `root_module`. - optimize: std.builtin.OptimizeMode = .Debug, - /// Deprecated; prefer populating `root_module`. - code_model: std.builtin.CodeModel = .default, - /// Deprecated; prefer populating `root_module`. - link_libc: ?bool = null, - /// Deprecated; prefer populating `root_module`. - single_threaded: ?bool = null, - /// Deprecated; prefer populating `root_module`. - pic: ?bool = null, - /// Deprecated; prefer populating `root_module`. - strip: ?bool = null, - /// Deprecated; prefer populating `root_module`. - unwind_tables: ?std.builtin.UnwindTables = null, - /// Deprecated; prefer populating `root_module`. - omit_frame_pointer: ?bool = null, - /// Deprecated; prefer populating `root_module`. - sanitize_thread: ?bool = null, - /// Deprecated; prefer populating `root_module`. - error_tracing: ?bool = null, -}; - -/// Deprecated: use `b.addLibrary(.{ ..., .linkage = .dynamic })` instead. -pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *Step.Compile { - if (options.root_module != null and options.target != null) { - @panic("`root_module` and `target` cannot both be populated"); - } - return .create(b, .{ - .name = options.name, - .root_module = options.root_module orelse b.createModule(.{ - .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), - .optimize = options.optimize, - .root_source_file = options.root_source_file, - .link_libc = options.link_libc, - .single_threaded = options.single_threaded, - .pic = options.pic, - .strip = options.strip, - .unwind_tables = options.unwind_tables, - .omit_frame_pointer = options.omit_frame_pointer, - .sanitize_thread = options.sanitize_thread, - .error_tracing = options.error_tracing, - .code_model = options.code_model, - }), - .kind = .lib, - .linkage = .dynamic, - .version = options.version, - .max_rss = options.max_rss, - .use_llvm = options.use_llvm, - .use_lld = options.use_lld, - .zig_lib_dir = options.zig_lib_dir, - .win32_manifest = options.win32_manifest, - }); -} - -pub const StaticLibraryOptions = struct { - name: []const u8, - version: ?std.SemanticVersion = null, - max_rss: usize = 0, - use_llvm: ?bool = null, - use_lld: ?bool = null, - zig_lib_dir: ?LazyPath = null, - - /// Prefer populating this field (using e.g. `createModule`) instead of populating - /// the following fields (`root_source_file` etc). In a future release, those fields - /// will be removed, and this field will become non-optional. - root_module: ?*Module = null, - - /// Deprecated; prefer populating `root_module`. - root_source_file: ?LazyPath = null, - /// Deprecated; prefer populating `root_module`. - target: ?ResolvedTarget = null, - /// Deprecated; prefer populating `root_module`. - optimize: std.builtin.OptimizeMode = .Debug, - /// Deprecated; prefer populating `root_module`. - code_model: std.builtin.CodeModel = .default, - /// Deprecated; prefer populating `root_module`. - link_libc: ?bool = null, - /// Deprecated; prefer populating `root_module`. - single_threaded: ?bool = null, - /// Deprecated; prefer populating `root_module`. - pic: ?bool = null, - /// Deprecated; prefer populating `root_module`. - strip: ?bool = null, - /// Deprecated; prefer populating `root_module`. - unwind_tables: ?std.builtin.UnwindTables = null, - /// Deprecated; prefer populating `root_module`. - omit_frame_pointer: ?bool = null, - /// Deprecated; prefer populating `root_module`. - sanitize_thread: ?bool = null, - /// Deprecated; prefer populating `root_module`. - error_tracing: ?bool = null, -}; - -/// Deprecated: use `b.addLibrary(.{ ..., .linkage = .static })` instead. -pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *Step.Compile { - if (options.root_module != null and options.target != null) { - @panic("`root_module` and `target` cannot both be populated"); - } - return .create(b, .{ - .name = options.name, - .root_module = options.root_module orelse b.createModule(.{ - .target = options.target orelse @panic("`root_module` and `target` cannot both be null"), - .optimize = options.optimize, - .root_source_file = options.root_source_file, - .link_libc = options.link_libc, - .single_threaded = options.single_threaded, - .pic = options.pic, - .strip = options.strip, - .unwind_tables = options.unwind_tables, - .omit_frame_pointer = options.omit_frame_pointer, - .sanitize_thread = options.sanitize_thread, - .error_tracing = options.error_tracing, - .code_model = options.code_model, - }), - .kind = .lib, - .linkage = .static, - .version = options.version, - .max_rss = options.max_rss, - .use_llvm = options.use_llvm, - .use_lld = options.use_lld, - .zig_lib_dir = options.zig_lib_dir, - }); -} - pub const LibraryOptions = struct { linkage: std.builtin.LinkMode = .static, name: []const u8, @@ -1015,9 +778,8 @@ pub fn addLibrary(b: *Build, options: LibraryOptions) *Step.Compile { pub const TestOptions = struct { name: []const u8 = "test", + root_module: *Module, max_rss: usize = 0, - /// Deprecated; use `.filters = &.{filter}` instead of `.filter = filter`. - filter: ?[]const u8 = null, filters: []const []const u8 = &.{}, test_runner: ?Step.Compile.TestRunner = null, use_llvm: ?bool = null, @@ -1027,38 +789,6 @@ pub const TestOptions = struct { /// The object must be linked separately. /// Usually used in conjunction with a custom `test_runner`. emit_object: bool = false, - - /// Prefer populating this field (using e.g. `createModule`) instead of populating - /// the following fields (`root_source_file` etc). In a future release, those fields - /// will be removed, and this field will become non-optional. - root_module: ?*Module = null, - - /// Deprecated; prefer populating `root_module`. - root_source_file: ?LazyPath = null, - /// Deprecated; prefer populating `root_module`. - target: ?ResolvedTarget = null, - /// Deprecated; prefer populating `root_module`. - optimize: std.builtin.OptimizeMode = .Debug, - /// Deprecated; prefer populating `root_module`. - version: ?std.SemanticVersion = null, - /// Deprecated; prefer populating `root_module`. - link_libc: ?bool = null, - /// Deprecated; prefer populating `root_module`. - link_libcpp: ?bool = null, - /// Deprecated; prefer populating `root_module`. - single_threaded: ?bool = null, - /// Deprecated; prefer populating `root_module`. - pic: ?bool = null, - /// Deprecated; prefer populating `root_module`. - strip: ?bool = null, - /// Deprecated; prefer populating `root_module`. - unwind_tables: ?std.builtin.UnwindTables = null, - /// Deprecated; prefer populating `root_module`. - omit_frame_pointer: ?bool = null, - /// Deprecated; prefer populating `root_module`. - sanitize_thread: ?bool = null, - /// Deprecated; prefer populating `root_module`. - error_tracing: ?bool = null, }; /// Creates an executable containing unit tests. @@ -1070,33 +800,12 @@ pub const TestOptions = struct { /// two steps are separated because they are independently configured and /// cached. pub fn addTest(b: *Build, options: TestOptions) *Step.Compile { - if (options.root_module != null and options.root_source_file != null) { - @panic("`root_module` and `root_source_file` cannot both be populated"); - } return .create(b, .{ .name = options.name, .kind = if (options.emit_object) .test_obj else .@"test", - .root_module = options.root_module orelse b.createModule(.{ - .root_source_file = options.root_source_file orelse @panic("`root_module` and `root_source_file` cannot both be null"), - .target = options.target orelse b.graph.host, - .optimize = options.optimize, - .link_libc = options.link_libc, - .link_libcpp = options.link_libcpp, - .single_threaded = options.single_threaded, - .pic = options.pic, - .strip = options.strip, - .unwind_tables = options.unwind_tables, - .omit_frame_pointer = options.omit_frame_pointer, - .sanitize_thread = options.sanitize_thread, - .error_tracing = options.error_tracing, - }), + .root_module = options.root_module, .max_rss = options.max_rss, - .filters = if (options.filter != null and options.filters.len > 0) filters: { - const filters = b.allocator.alloc([]const u8, 1 + options.filters.len) catch @panic("OOM"); - filters[0] = b.dupe(options.filter.?); - for (filters[1..], options.filters) |*dest, source| dest.* = b.dupe(source); - break :filters filters; - } else b.dupeStrings(if (options.filter) |filter| &.{filter} else options.filters), + .filters = b.dupeStrings(options.filters), .test_runner = options.test_runner, .use_llvm = options.use_llvm, .use_lld = options.use_lld, @@ -1115,22 +824,6 @@ pub const AssemblyOptions = struct { zig_lib_dir: ?LazyPath = null, }; -/// Deprecated; prefer using `addObject` where the `root_module` has an empty -/// `root_source_file` and contains an assembly file via `Module.addAssemblyFile`. -pub fn addAssembly(b: *Build, options: AssemblyOptions) *Step.Compile { - const root_module = b.createModule(.{ - .target = options.target, - .optimize = options.optimize, - }); - root_module.addAssemblyFile(options.source_file); - return b.addObject(.{ - .name = options.name, - .max_rss = options.max_rss, - .zig_lib_dir = options.zig_lib_dir, - .root_module = root_module, - }); -} - /// This function creates a module and adds it to the package's module set, making /// it available to other packages which depend on this one. /// `createModule` can be used instead to create a private module. diff --git a/lib/std/Build/Cache.zig b/lib/std/Build/Cache.zig index 6bef7d380b..2f8dd26ce0 100644 --- a/lib/std/Build/Cache.zig +++ b/lib/std/Build/Cache.zig @@ -661,7 +661,8 @@ pub const Manifest = struct { } { const gpa = self.cache.gpa; const input_file_count = self.files.entries.len; - var manifest_reader = self.manifest_file.?.reader(&.{}); // Reads positionally from zero. + var tiny_buffer: [1]u8 = undefined; // allows allocRemaining to detect limit exceeded + var manifest_reader = self.manifest_file.?.reader(&tiny_buffer); // Reads positionally from zero. const limit: std.io.Limit = .limited(manifest_file_size_max); const file_contents = manifest_reader.interface.allocRemaining(gpa, limit) catch |err| switch (err) { error.OutOfMemory => return error.OutOfMemory, @@ -1326,7 +1327,7 @@ test "cache file and then recall it" { // Wait for file timestamps to tick const initial_time = try testGetCurrentFileTimestamp(tmp.dir); while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time) { - std.time.sleep(1); + std.Thread.sleep(1); } var digest1: HexDigest = undefined; @@ -1389,7 +1390,7 @@ test "check that changing a file makes cache fail" { // Wait for file timestamps to tick const initial_time = try testGetCurrentFileTimestamp(tmp.dir); while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time) { - std.time.sleep(1); + std.Thread.sleep(1); } var digest1: HexDigest = undefined; @@ -1501,7 +1502,7 @@ test "Manifest with files added after initial hash work" { // Wait for file timestamps to tick const initial_time = try testGetCurrentFileTimestamp(tmp.dir); while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time) { - std.time.sleep(1); + std.Thread.sleep(1); } var digest1: HexDigest = undefined; @@ -1551,7 +1552,7 @@ test "Manifest with files added after initial hash work" { // Wait for file timestamps to tick const initial_time2 = try testGetCurrentFileTimestamp(tmp.dir); while ((try testGetCurrentFileTimestamp(tmp.dir)) == initial_time2) { - std.time.sleep(1); + std.Thread.sleep(1); } { diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig index c408fa6b0c..8f57479fa3 100644 --- a/lib/std/Build/Step/ConfigHeader.zig +++ b/lib/std/Build/Step/ConfigHeader.zig @@ -8,9 +8,6 @@ pub const Style = union(enum) { /// A configure format supported by autotools that uses `#undef foo` to /// mark lines that can be substituted with different values. autoconf_undef: std.Build.LazyPath, - /// Deprecated. Renamed to `autoconf_undef`. - /// To be removed after 0.14.0 is tagged. - autoconf: std.Build.LazyPath, /// A configure format supported by autotools that uses `@FOO@` output variables. autoconf_at: std.Build.LazyPath, /// The configure format supported by CMake. It uses `@FOO@`, `${}` and @@ -23,7 +20,7 @@ pub const Style = union(enum) { pub fn getPath(style: Style) ?std.Build.LazyPath { switch (style) { - .autoconf_undef, .autoconf, .autoconf_at, .cmake => |s| return s, + .autoconf_undef, .autoconf_at, .cmake => |s| return s, .blank, .nasm => return null, } } @@ -205,7 +202,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { const asm_generated_line = "; " ++ header_text ++ "\n"; switch (config_header.style) { - .autoconf_undef, .autoconf, .autoconf_at => |file_source| { + .autoconf_undef, .autoconf_at => |file_source| { try bw.writeAll(c_generated_line); const src_path = file_source.getPath2(b, step); const contents = std.fs.cwd().readFileAlloc(src_path, arena, .limited(config_header.max_bytes)) catch |err| { @@ -214,7 +211,7 @@ fn make(step: *Step, options: Step.MakeOptions) !void { }); }; switch (config_header.style) { - .autoconf_undef, .autoconf => try render_autoconf_undef(step, contents, bw, config_header.values, src_path), + .autoconf_undef => try render_autoconf_undef(step, contents, bw, config_header.values, src_path), .autoconf_at => try render_autoconf_at(step, contents, &aw, config_header.values, src_path), else => unreachable, } diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index 38ebd4a20c..ceabed0cb4 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -1083,7 +1083,9 @@ fn runCommand( var interp_argv = std.ArrayList([]const u8).init(b.allocator); defer interp_argv.deinit(); - const result = spawnChildAndCollect(run, argv, has_side_effects, prog_node, fuzz_context) catch |err| term: { + var env_map = run.env_map orelse &b.graph.env_map; + + const result = spawnChildAndCollect(run, argv, env_map, has_side_effects, prog_node, fuzz_context) catch |err| term: { // InvalidExe: cpu arch mismatch // FileNotFound: can happen with a wrong dynamic linker path if (err == error.InvalidExe or err == error.FileNotFound) interpret: { @@ -1116,6 +1118,15 @@ fn runCommand( if (b.enable_wine) { try interp_argv.append(bin_name); try interp_argv.appendSlice(argv); + + // Wine's excessive stderr logging is only situationally helpful. Disable it by default, but + // allow the user to override it (e.g. with `WINEDEBUG=err+all`) if desired. + if (env_map.get("WINEDEBUG") == null) { + // We don't own `env_map` at this point, so turn it into a copy before modifying it. + env_map = arena.create(EnvMap) catch @panic("OOM"); + env_map.hash_map = try env_map.hash_map.cloneWithAllocator(arena); + try env_map.put("WINEDEBUG", "-all"); + } } else { return failForeign(run, "-fwine", argv[0], exe); } @@ -1211,7 +1222,7 @@ fn runCommand( try Step.handleVerbose2(step.owner, cwd, run.env_map, interp_argv.items); - break :term spawnChildAndCollect(run, interp_argv.items, has_side_effects, prog_node, fuzz_context) catch |e| { + break :term spawnChildAndCollect(run, interp_argv.items, env_map, has_side_effects, prog_node, fuzz_context) catch |e| { if (!run.failing_to_execute_foreign_is_an_error) return error.MakeSkipped; return step.fail("unable to spawn interpreter {s}: {s}", .{ @@ -1394,6 +1405,7 @@ const ChildProcResult = struct { fn spawnChildAndCollect( run: *Run, argv: []const []const u8, + env_map: *EnvMap, has_side_effects: bool, prog_node: std.Progress.Node, fuzz_context: ?FuzzContext, @@ -1410,7 +1422,7 @@ fn spawnChildAndCollect( if (run.cwd) |lazy_cwd| { child.cwd = lazy_cwd.getPath2(b, &run.step); } - child.env_map = run.env_map orelse &b.graph.env_map; + child.env_map = env_map; child.request_resource_usage_statistics = true; child.stdin_behavior = switch (run.stdio) { diff --git a/lib/std/Build/Step/TranslateC.zig b/lib/std/Build/Step/TranslateC.zig index 8c14b55c7d..2e3f06d8ad 100644 --- a/lib/std/Build/Step/TranslateC.zig +++ b/lib/std/Build/Step/TranslateC.zig @@ -63,19 +63,6 @@ pub fn getOutput(translate_c: *TranslateC) std.Build.LazyPath { return .{ .generated = .{ .file = &translate_c.output_file } }; } -/// Deprecated: use `createModule` or `addModule` with `std.Build.addExecutable` instead. -/// Creates a step to build an executable from the translated source. -pub fn addExecutable(translate_c: *TranslateC, options: AddExecutableOptions) *Step.Compile { - return translate_c.step.owner.addExecutable(.{ - .root_source_file = translate_c.getOutput(), - .name = options.name orelse "translated_c", - .version = options.version, - .target = options.target orelse translate_c.target, - .optimize = options.optimize orelse translate_c.optimize, - .linkage = options.linkage, - }); -} - /// Creates a module from the translated source and adds it to the package's /// module set making it available to other packages which depend on this one. /// `createModule` can be used instead to create a private module. diff --git a/lib/std/Build/Watch.zig b/lib/std/Build/Watch.zig index d6dec68806..cc8bd60c9a 100644 --- a/lib/std/Build/Watch.zig +++ b/lib/std/Build/Watch.zig @@ -4,7 +4,7 @@ const Watch = @This(); const Step = std.Build.Step; const Allocator = std.mem.Allocator; const assert = std.debug.assert; -const fatal = std.zig.fatal; +const fatal = std.process.fatal; dir_table: DirTable, os: Os, diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 90b1ea7617..03816a1a54 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -494,6 +494,7 @@ pub fn PollFiles(comptime StreamEnum: type) type { test { _ = Reader; + _ = Reader.Limited; _ = Writer; _ = @import("Io/test.zig"); } diff --git a/lib/std/Io/Reader.zig b/lib/std/Io/Reader.zig index 518fdf2568..9c3d14fe55 100644 --- a/lib/std/Io/Reader.zig +++ b/lib/std/Io/Reader.zig @@ -99,7 +99,7 @@ pub const ShortError = error{ pub const failing: Reader = .{ .vtable = &.{ - .read = failingStream, + .stream = failingStream, .discard = failingDiscard, }, .buffer = &.{}, @@ -245,6 +245,7 @@ pub fn appendRemaining( list: *std.ArrayListAlignedUnmanaged(u8, alignment), limit: Limit, ) LimitedAllocError!void { + assert(r.buffer.len != 0); // Needed to detect limit exceeded without losing data. const buffer = r.buffer; const buffer_contents = buffer[r.seek..r.end]; const copy_len = limit.minInt(buffer_contents.len); @@ -858,8 +859,10 @@ pub fn streamDelimiter(r: *Reader, w: *Writer, delimiter: u8) StreamError!usize /// Appends to `w` contents by reading from the stream until `delimiter` is found. /// Does not write the delimiter itself. /// -/// Returns number of bytes streamed, which may be zero. End of stream can be -/// detected by checking if the next byte in the stream is the delimiter. +/// Returns number of bytes streamed, which may be zero. If the stream reaches +/// the end, the reader buffer will be empty when this function returns. +/// Otherwise, it will have at least one byte buffered, starting with the +/// delimiter. /// /// Asserts buffer capacity of at least one. This function performs better with /// larger buffers. @@ -1000,6 +1003,18 @@ pub fn fill(r: *Reader, n: usize) Error!void { @branchHint(.likely); return; } + return fillUnbuffered(r, n); +} + +/// This internal function is separated from `fill` to encourage optimizers to inline `fill`, hence +/// propagating its `@branchHint` to usage sites. If these functions are combined, `fill` is large +/// enough that LLVM is reluctant to inline it, forcing usages of APIs like `takeInt` to go through +/// an expensive runtime function call just to figure out that the data is, in fact, already in the +/// buffer. +/// +/// Missing this optimization can result in wall-clock time for the most affected benchmarks +/// increasing by a factor of 5 or more. +fn fillUnbuffered(r: *Reader, n: usize) Error!void { if (r.seek + n <= r.buffer.len) while (true) { const end_cap = r.buffer[r.end..]; var writer: Writer = .fixed(end_cap); @@ -1645,11 +1660,12 @@ test "readAlloc when the backing reader provides one byte at a time" { } }; const str = "This is a test"; + var tiny_buffer: [1]u8 = undefined; var one_byte_stream: OneByteReader = .{ .str = str, .i = 0, .reader = .{ - .buffer = &.{}, + .buffer = &tiny_buffer, .vtable = &.{ .stream = OneByteReader.stream }, .seek = 0, .end = 0, diff --git a/lib/std/Io/Reader/Limited.zig b/lib/std/Io/Reader/Limited.zig index 9476b97804..c2e9ee2f49 100644 --- a/lib/std/Io/Reader/Limited.zig +++ b/lib/std/Io/Reader/Limited.zig @@ -25,18 +25,34 @@ pub fn init(reader: *Reader, limit: Limit, buffer: []u8) Limited { }; } -fn stream(context: ?*anyopaque, w: *Writer, limit: Limit) Reader.StreamError!usize { - const l: *Limited = @alignCast(@ptrCast(context)); +fn stream(r: *Reader, w: *Writer, limit: Limit) Reader.StreamError!usize { + const l: *Limited = @fieldParentPtr("interface", r); const combined_limit = limit.min(l.remaining); - const n = try l.unlimited_reader.read(w, combined_limit); + const n = try l.unlimited.stream(w, combined_limit); l.remaining = l.remaining.subtract(n).?; return n; } -fn discard(context: ?*anyopaque, limit: Limit) Reader.Error!usize { - const l: *Limited = @alignCast(@ptrCast(context)); +test stream { + var orig_buf: [10]u8 = undefined; + @memcpy(&orig_buf, "test bytes"); + var fixed: std.Io.Reader = .fixed(&orig_buf); + + var limit_buf: [1]u8 = undefined; + var limited: std.Io.Reader.Limited = .init(&fixed, @enumFromInt(4), &limit_buf); + + var result_buf: [10]u8 = undefined; + var fixed_writer: std.Io.Writer = .fixed(&result_buf); + const streamed = try limited.interface.stream(&fixed_writer, @enumFromInt(7)); + + try std.testing.expect(streamed == 4); + try std.testing.expectEqualStrings("test", result_buf[0..streamed]); +} + +fn discard(r: *Reader, limit: Limit) Reader.Error!usize { + const l: *Limited = @fieldParentPtr("interface", r); const combined_limit = limit.min(l.remaining); - const n = try l.unlimited_reader.discard(combined_limit); + const n = try l.unlimited.discard(combined_limit); l.remaining = l.remaining.subtract(n).?; return n; } diff --git a/lib/std/Io/Writer.zig b/lib/std/Io/Writer.zig index 73d504c437..d931248c4d 100644 --- a/lib/std/Io/Writer.zig +++ b/lib/std/Io/Writer.zig @@ -114,7 +114,10 @@ pub const FileError = error{ /// Writes to `buffer` and returns `error.WriteFailed` when it is full. pub fn fixed(buffer: []u8) Writer { return .{ - .vtable = &.{ .drain = fixedDrain }, + .vtable = &.{ + .drain = fixedDrain, + .flush = noopFlush, + }, .buffer = buffer, }; } @@ -244,6 +247,15 @@ pub fn noopFlush(w: *Writer) Error!void { _ = w; } +test "fixed buffer flush" { + var buffer: [1]u8 = undefined; + var writer: std.io.Writer = .fixed(&buffer); + + try writer.writeByte(10); + try writer.flush(); + try testing.expectEqual(10, buffer[0]); +} + /// Calls `VTable.drain` but hides the last `preserve_length` bytes from the /// implementation, keeping them buffered. pub fn drainPreserve(w: *Writer, preserve_length: usize) Error!void { @@ -381,6 +393,32 @@ pub fn writableVectorPosix(w: *Writer, buffer: []std.posix.iovec, limit: Limit) return buffer[0..i]; } +pub fn writableVectorWsa( + w: *Writer, + buffer: []std.os.windows.ws2_32.WSABUF, + limit: Limit, +) Error![]std.os.windows.ws2_32.WSABUF { + var it = try writableVectorIterator(w); + var i: usize = 0; + var remaining = limit; + while (it.next()) |full_buffer| { + if (!remaining.nonzero()) break; + if (buffer.len - i == 0) break; + const buf = remaining.slice(full_buffer); + if (buf.len == 0) continue; + if (std.math.cast(u32, buf.len)) |len| { + buffer[i] = .{ .buf = buf.ptr, .len = len }; + i += 1; + remaining = remaining.subtract(len).?; + continue; + } + buffer[i] = .{ .buf = buf.ptr, .len = std.math.maxInt(u32) }; + i += 1; + break; + } + return buffer[0..i]; +} + pub fn ensureUnusedCapacity(w: *Writer, n: usize) Error!void { _ = try writableSliceGreedy(w, n); } @@ -2150,7 +2188,7 @@ pub const Discarding = struct { pub fn drain(w: *Writer, data: []const []const u8, splat: usize) Error!usize { const d: *Discarding = @alignCast(@fieldParentPtr("writer", w)); const slice = data[0 .. data.len - 1]; - const pattern = data[slice.len..]; + const pattern = data[slice.len]; var written: usize = pattern.len * splat; for (slice) |bytes| written += bytes.len; d.count += w.end + written; diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index 9fcbeacdd1..ea9eec3afa 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -58,7 +58,7 @@ pub fn sleep(nanoseconds: u64) void { const boot_services = std.os.uefi.system_table.boot_services.?; const us_from_ns = nanoseconds / std.time.ns_per_us; const us = math.cast(usize, us_from_ns) orelse math.maxInt(usize); - _ = boot_services.stall(us); + boot_services.stall(us) catch unreachable; return; } diff --git a/lib/std/Thread/Condition.zig b/lib/std/Thread/Condition.zig index 65bfa32ad0..91974a44b4 100644 --- a/lib/std/Thread/Condition.zig +++ b/lib/std/Thread/Condition.zig @@ -130,7 +130,7 @@ const SingleThreadedImpl = struct { unreachable; // deadlock detected }; - std.time.sleep(timeout_ns); + std.Thread.sleep(timeout_ns); return error.Timeout; } @@ -348,7 +348,7 @@ test "wait and signal" { } while (true) { - std.time.sleep(100 * std.time.ns_per_ms); + std.Thread.sleep(100 * std.time.ns_per_ms); multi_wait.mutex.lock(); defer multi_wait.mutex.unlock(); @@ -405,7 +405,7 @@ test signal { } while (true) { - std.time.sleep(10 * std.time.ns_per_ms); + std.Thread.sleep(10 * std.time.ns_per_ms); signal_test.mutex.lock(); defer signal_test.mutex.unlock(); diff --git a/lib/std/Thread/Futex.zig b/lib/std/Thread/Futex.zig index aecf646424..bad34996f5 100644 --- a/lib/std/Thread/Futex.zig +++ b/lib/std/Thread/Futex.zig @@ -116,7 +116,7 @@ const SingleThreadedImpl = struct { unreachable; // deadlock detected }; - std.time.sleep(delay); + std.Thread.sleep(delay); return error.Timeout; } diff --git a/lib/std/Thread/ResetEvent.zig b/lib/std/Thread/ResetEvent.zig index 47a9b0c038..2f22d8456a 100644 --- a/lib/std/Thread/ResetEvent.zig +++ b/lib/std/Thread/ResetEvent.zig @@ -74,7 +74,7 @@ const SingleThreadedImpl = struct { unreachable; // deadlock detected }; - std.time.sleep(timeout_ns); + std.Thread.sleep(timeout_ns); return error.Timeout; } diff --git a/lib/std/ascii.zig b/lib/std/ascii.zig index 99bebf09ab..79f6d8a296 100644 --- a/lib/std/ascii.zig +++ b/lib/std/ascii.zig @@ -181,9 +181,6 @@ pub fn isAscii(c: u8) bool { return c < 128; } -/// Deprecated: use `isAscii` -pub const isASCII = isAscii; - /// Uppercases the character and returns it as-is if already uppercase or not a letter. pub fn toUpper(c: u8) u8 { const mask = @as(u8, @intFromBool(isLower(c))) << 5; diff --git a/lib/std/atomic.zig b/lib/std/atomic.zig index 4ff8f0c3b9..194f645975 100644 --- a/lib/std/atomic.zig +++ b/lib/std/atomic.zig @@ -10,8 +10,6 @@ pub fn Value(comptime T: type) type { return .{ .raw = value }; } - pub const fence = @compileError("@fence is deprecated, use other atomics to establish ordering"); - pub inline fn load(self: *const Self, comptime order: AtomicOrder) T { return @atomicLoad(T, &self.raw, order); } diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index f0cf107582..ac0511a43b 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -156,9 +156,6 @@ pub const OptimizeMode = enum { ReleaseSmall, }; -/// Deprecated; use OptimizeMode. -pub const Mode = OptimizeMode; - /// The calling convention of a function defines how arguments and return values are passed, as well /// as any other requirements which callers and callees must respect, such as register preservation /// and stack alignment. @@ -187,51 +184,6 @@ pub const CallingConvention = union(enum(u8)) { else => unreachable, }; - /// Deprecated; use `.auto`. - pub const Unspecified: CallingConvention = .auto; - /// Deprecated; use `.c`. - pub const C: CallingConvention = .c; - /// Deprecated; use `.naked`. - pub const Naked: CallingConvention = .naked; - /// Deprecated; use `.@"inline"`. - pub const Inline: CallingConvention = .@"inline"; - /// Deprecated; use `.x86_64_interrupt`, `.x86_interrupt`, or `.avr_interrupt`. - pub const Interrupt: CallingConvention = switch (builtin.target.cpu.arch) { - .x86_64 => .{ .x86_64_interrupt = .{} }, - .x86 => .{ .x86_interrupt = .{} }, - .avr => .avr_interrupt, - else => unreachable, - }; - /// Deprecated; use `.avr_signal`. - pub const Signal: CallingConvention = .avr_signal; - /// Deprecated; use `.x86_stdcall`. - pub const Stdcall: CallingConvention = .{ .x86_stdcall = .{} }; - /// Deprecated; use `.x86_fastcall`. - pub const Fastcall: CallingConvention = .{ .x86_fastcall = .{} }; - /// Deprecated; use `.x86_64_vectorcall`, `.x86_vectorcall`, or `aarch64_vfabi`. - pub const Vectorcall: CallingConvention = switch (builtin.target.cpu.arch) { - .x86_64 => .{ .x86_64_vectorcall = .{} }, - .x86 => .{ .x86_vectorcall = .{} }, - .aarch64, .aarch64_be => .{ .aarch64_vfabi = .{} }, - else => unreachable, - }; - /// Deprecated; use `.x86_thiscall`. - pub const Thiscall: CallingConvention = .{ .x86_thiscall = .{} }; - /// Deprecated; use `.arm_aapcs`. - pub const AAPCS: CallingConvention = .{ .arm_aapcs = .{} }; - /// Deprecated; use `.arm_aapcs_vfp`. - pub const AAPCSVFP: CallingConvention = .{ .arm_aapcs_vfp = .{} }; - /// Deprecated; use `.x86_64_sysv`. - pub const SysV: CallingConvention = .{ .x86_64_sysv = .{} }; - /// Deprecated; use `.x86_64_win`. - pub const Win64: CallingConvention = .{ .x86_64_win = .{} }; - /// Deprecated; use `.kernel`. - pub const Kernel: CallingConvention = .kernel; - /// Deprecated; use `.spirv_fragment`. - pub const Fragment: CallingConvention = .spirv_fragment; - /// Deprecated; use `.spirv_vertex`. - pub const Vertex: CallingConvention = .spirv_vertex; - /// The default Zig calling convention when neither `export` nor `inline` is specified. /// This calling convention makes no guarantees about stack alignment, registers, etc. /// It can only be used within this Zig compilation unit. @@ -1119,10 +1071,6 @@ pub const TestFn = struct { func: *const fn () anyerror!void, }; -/// Deprecated, use the `Panic` namespace instead. -/// To be deleted after 0.14.0 is released. -pub const PanicFn = fn ([]const u8, ?*StackTrace, ?usize) noreturn; - /// This namespace is used by the Zig compiler to emit various kinds of safety /// panics. These can be overridden by making a public `panic` namespace in the /// root source file. @@ -1138,9 +1086,6 @@ pub const panic: type = p: { } break :p root.panic; } - if (@hasDecl(root, "Panic")) { - break :p root.Panic; // Deprecated; use `panic` instead. - } break :p switch (builtin.zig_backend) { .stage2_powerpc, .stage2_riscv64, diff --git a/lib/std/c.zig b/lib/std/c.zig index e652b10ce0..2880e3850a 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -4110,7 +4110,7 @@ pub const msghdr_const = switch (native_os) { /// scatter/gather array iov: [*]const iovec_const, /// # elements in iov - iovlen: i32, + iovlen: u32, /// ancillary data control: ?*const anyopaque, /// ancillary data buffer len @@ -4122,7 +4122,7 @@ pub const msghdr_const = switch (native_os) { name: ?*const anyopaque, namelen: socklen_t, iov: [*]const iovec, - iovlen: c_int, + iovlen: c_uint, control: ?*const anyopaque, controllen: socklen_t, flags: c_int, @@ -5625,6 +5625,43 @@ pub const MSG = switch (native_os) { pub const NOSIGNAL = 0x80; pub const EOR = 0x100; }, + .freebsd => struct { + pub const OOB = 0x00000001; + pub const PEEK = 0x00000002; + pub const DONTROUTE = 0x00000004; + pub const EOR = 0x00000008; + pub const TRUNC = 0x00000010; + pub const CTRUNC = 0x00000020; + pub const WAITALL = 0x00000040; + pub const DONTWAIT = 0x00000080; + pub const EOF = 0x00000100; + pub const NOTIFICATION = 0x00002000; + pub const NBIO = 0x00004000; + pub const COMPAT = 0x00008000; + pub const SOCALLBCK = 0x00010000; + pub const NOSIGNAL = 0x00020000; + pub const CMSG_CLOEXEC = 0x00040000; + pub const WAITFORONE = 0x00080000; + pub const MORETOCOME = 0x00100000; + pub const TLSAPPDATA = 0x00200000; + }, + .netbsd => struct { + pub const OOB = 0x0001; + pub const PEEK = 0x0002; + pub const DONTROUTE = 0x0004; + pub const EOR = 0x0008; + pub const TRUNC = 0x0010; + pub const CTRUNC = 0x0020; + pub const WAITALL = 0x0040; + pub const DONTWAIT = 0x0080; + pub const BCAST = 0x0100; + pub const MCAST = 0x0200; + pub const NOSIGNAL = 0x0400; + pub const CMSG_CLOEXEC = 0x0800; + pub const NBIO = 0x1000; + pub const WAITFORONE = 0x2000; + pub const NOTIFICATION = 0x4000; + }, else => void, }; pub const SOCK = switch (native_os) { @@ -10808,6 +10845,7 @@ pub extern "c" fn if_nametoindex([*:0]const u8) c_int; pub extern "c" fn getpid() pid_t; pub extern "c" fn getppid() pid_t; +pub extern "c" fn setsid() pid_t; /// These are implementation defined but share identical values in at least musl and glibc: /// - https://git.musl-libc.org/cgit/musl/tree/include/locale.h?id=ab31e9d6a0fa7c5c408856c89df2dfb12c344039#n18 diff --git a/lib/std/crypto.zig b/lib/std/crypto.zig index 5582e91e59..98bea0c8ca 100644 --- a/lib/std/crypto.zig +++ b/lib/std/crypto.zig @@ -103,7 +103,6 @@ pub const dh = struct { pub const kem = struct { pub const kyber_d00 = @import("crypto/ml_kem.zig").d00; pub const ml_kem = @import("crypto/ml_kem.zig").nist; - pub const ml_kem_01 = @compileError("deprecated: final version of the specification has been published, use ml_kem instead"); }; /// Elliptic-curve arithmetic. @@ -387,7 +386,7 @@ test "issue #4532: no index out of bounds" { /// Sets a slice to zeroes. /// Prevents the store from being optimized out. -pub inline fn secureZero(comptime T: type, s: []volatile T) void { +pub fn secureZero(comptime T: type, s: []volatile T) void { @memset(s, 0); } @@ -400,20 +399,3 @@ test secureZero { try std.testing.expectEqualSlices(u8, &a, &b); } - -/// Deprecated in favor of `std.crypto`. To be removed after Zig 0.14.0 is released. -/// -/// As a reminder, never use "utils" in a namespace (in any programming language). -/// https://ziglang.org/documentation/0.13.0/#Avoid-Redundancy-in-Names -pub const utils = struct { - /// Deprecated in favor of `std.crypto.secureZero`. - pub const secureZero = std.crypto.secureZero; - /// Deprecated in favor of `std.crypto.timing_safe.eql`. - pub const timingSafeEql = timing_safe.eql; - /// Deprecated in favor of `std.crypto.timing_safe.compare`. - pub const timingSafeCompare = timing_safe.compare; - /// Deprecated in favor of `std.crypto.timing_safe.add`. - pub const timingSafeAdd = timing_safe.add; - /// Deprecated in favor of `std.crypto.timing_safe.sub`. - pub const timingSafeSub = timing_safe.sub; -}; diff --git a/lib/std/crypto/25519/curve25519.zig b/lib/std/crypto/25519/curve25519.zig index 825f0bd94c..0cc0dec3d1 100644 --- a/lib/std/crypto/25519/curve25519.zig +++ b/lib/std/crypto/25519/curve25519.zig @@ -15,12 +15,12 @@ pub const Curve25519 = struct { x: Fe, /// Decode a Curve25519 point from its compressed (X) coordinates. - pub inline fn fromBytes(s: [32]u8) Curve25519 { + pub fn fromBytes(s: [32]u8) Curve25519 { return .{ .x = Fe.fromBytes(s) }; } /// Encode a Curve25519 point. - pub inline fn toBytes(p: Curve25519) [32]u8 { + pub fn toBytes(p: Curve25519) [32]u8 { return p.x.toBytes(); } diff --git a/lib/std/crypto/25519/edwards25519.zig b/lib/std/crypto/25519/edwards25519.zig index 47c07939ac..da8b84a96b 100644 --- a/lib/std/crypto/25519/edwards25519.zig +++ b/lib/std/crypto/25519/edwards25519.zig @@ -138,7 +138,7 @@ pub const Edwards25519 = struct { } /// Flip the sign of the X coordinate. - pub inline fn neg(p: Edwards25519) Edwards25519 { + pub fn neg(p: Edwards25519) Edwards25519 { return .{ .x = p.x.neg(), .y = p.y, .z = p.z, .t = p.t.neg() }; } @@ -190,14 +190,14 @@ pub const Edwards25519 = struct { return q; } - inline fn cMov(p: *Edwards25519, a: Edwards25519, c: u64) void { + fn cMov(p: *Edwards25519, a: Edwards25519, c: u64) void { p.x.cMov(a.x, c); p.y.cMov(a.y, c); p.z.cMov(a.z, c); p.t.cMov(a.t, c); } - inline fn pcSelect(comptime n: usize, pc: *const [n]Edwards25519, b: u8) Edwards25519 { + fn pcSelect(comptime n: usize, pc: *const [n]Edwards25519, b: u8) Edwards25519 { var t = Edwards25519.identityElement; comptime var i: u8 = 1; inline while (i < pc.len) : (i += 1) { diff --git a/lib/std/crypto/25519/field.zig b/lib/std/crypto/25519/field.zig index c2fc8408bd..d10f92550a 100644 --- a/lib/std/crypto/25519/field.zig +++ b/lib/std/crypto/25519/field.zig @@ -56,7 +56,7 @@ pub const Fe = struct { pub const edwards25519sqrtam2 = Fe{ .limbs = .{ 1693982333959686, 608509411481997, 2235573344831311, 947681270984193, 266558006233600 } }; /// Return true if the field element is zero - pub inline fn isZero(fe: Fe) bool { + pub fn isZero(fe: Fe) bool { var reduced = fe; reduced.reduce(); const limbs = reduced.limbs; @@ -64,7 +64,7 @@ pub const Fe = struct { } /// Return true if both field elements are equivalent - pub inline fn equivalent(a: Fe, b: Fe) bool { + pub fn equivalent(a: Fe, b: Fe) bool { return a.sub(b).isZero(); } @@ -168,7 +168,7 @@ pub const Fe = struct { } /// Add a field element - pub inline fn add(a: Fe, b: Fe) Fe { + pub fn add(a: Fe, b: Fe) Fe { var fe: Fe = undefined; comptime var i = 0; inline while (i < 5) : (i += 1) { @@ -178,7 +178,7 @@ pub const Fe = struct { } /// Subtract a field element - pub inline fn sub(a: Fe, b: Fe) Fe { + pub fn sub(a: Fe, b: Fe) Fe { var fe = b; comptime var i = 0; inline while (i < 4) : (i += 1) { @@ -197,17 +197,17 @@ pub const Fe = struct { } /// Negate a field element - pub inline fn neg(a: Fe) Fe { + pub fn neg(a: Fe) Fe { return zero.sub(a); } /// Return true if a field element is negative - pub inline fn isNegative(a: Fe) bool { + pub fn isNegative(a: Fe) bool { return (a.toBytes()[0] & 1) != 0; } /// Conditonally replace a field element with `a` if `c` is positive - pub inline fn cMov(fe: *Fe, a: Fe, c: u64) void { + pub fn cMov(fe: *Fe, a: Fe, c: u64) void { const mask: u64 = 0 -% c; var x = fe.*; comptime var i = 0; @@ -248,7 +248,7 @@ pub const Fe = struct { } } - inline fn _carry128(r: *[5]u128) Fe { + fn _carry128(r: *[5]u128) Fe { var rs: [5]u64 = undefined; comptime var i = 0; inline while (i < 4) : (i += 1) { @@ -321,17 +321,17 @@ pub const Fe = struct { } /// Square a field element - pub inline fn sq(a: Fe) Fe { + pub fn sq(a: Fe) Fe { return _sq(a, false); } /// Square and double a field element - pub inline fn sq2(a: Fe) Fe { + pub fn sq2(a: Fe) Fe { return _sq(a, true); } /// Multiply a field element with a small (32-bit) integer - pub inline fn mul32(a: Fe, comptime n: u32) Fe { + pub fn mul32(a: Fe, comptime n: u32) Fe { const sn = @as(u128, @intCast(n)); var fe: Fe = undefined; var x: u128 = 0; diff --git a/lib/std/crypto/25519/ristretto255.zig b/lib/std/crypto/25519/ristretto255.zig index dd1a8a236e..a09e540a77 100644 --- a/lib/std/crypto/25519/ristretto255.zig +++ b/lib/std/crypto/25519/ristretto255.zig @@ -42,7 +42,7 @@ pub const Ristretto255 = struct { } /// Reject the neutral element. - pub inline fn rejectIdentity(p: Ristretto255) IdentityElementError!void { + pub fn rejectIdentity(p: Ristretto255) IdentityElementError!void { return p.p.rejectIdentity(); } @@ -141,24 +141,24 @@ pub const Ristretto255 = struct { } /// Double a Ristretto255 element. - pub inline fn dbl(p: Ristretto255) Ristretto255 { + pub fn dbl(p: Ristretto255) Ristretto255 { return .{ .p = p.p.dbl() }; } /// Add two Ristretto255 elements. - pub inline fn add(p: Ristretto255, q: Ristretto255) Ristretto255 { + pub fn add(p: Ristretto255, q: Ristretto255) Ristretto255 { return .{ .p = p.p.add(q.p) }; } /// Subtract two Ristretto255 elements. - pub inline fn sub(p: Ristretto255, q: Ristretto255) Ristretto255 { + pub fn sub(p: Ristretto255, q: Ristretto255) Ristretto255 { return .{ .p = p.p.sub(q.p) }; } /// Multiply a Ristretto255 element with a scalar. /// Return error.WeakPublicKey if the resulting element is /// the identity element. - pub inline fn mul(p: Ristretto255, s: [encoded_length]u8) (IdentityElementError || WeakPublicKeyError)!Ristretto255 { + pub fn mul(p: Ristretto255, s: [encoded_length]u8) (IdentityElementError || WeakPublicKeyError)!Ristretto255 { return .{ .p = try p.p.mul(s) }; } diff --git a/lib/std/crypto/25519/scalar.zig b/lib/std/crypto/25519/scalar.zig index b07b1c774c..59a4b41f7a 100644 --- a/lib/std/crypto/25519/scalar.zig +++ b/lib/std/crypto/25519/scalar.zig @@ -50,7 +50,7 @@ pub fn reduce64(s: [64]u8) CompressedScalar { /// Perform the X25519 "clamping" operation. /// The scalar is then guaranteed to be a multiple of the cofactor. -pub inline fn clamp(s: *CompressedScalar) void { +pub fn clamp(s: *CompressedScalar) void { s[0] &= 248; s[31] = (s[31] & 127) | 64; } @@ -514,7 +514,7 @@ pub const Scalar = struct { } /// Square a scalar `n` times - inline fn sqn(x: Scalar, comptime n: comptime_int) Scalar { + fn sqn(x: Scalar, comptime n: comptime_int) Scalar { var i: usize = 0; var t = x; while (i < n) : (i += 1) { diff --git a/lib/std/crypto/aegis.zig b/lib/std/crypto/aegis.zig index dedd962059..641a6df572 100644 --- a/lib/std/crypto/aegis.zig +++ b/lib/std/crypto/aegis.zig @@ -104,7 +104,7 @@ fn State128X(comptime degree: u7) type { return state; } - inline fn update(state: *State, d1: AesBlockVec, d2: AesBlockVec) void { + fn update(state: *State, d1: AesBlockVec, d2: AesBlockVec) void { const blocks = &state.blocks; const tmp = blocks[7]; comptime var i: usize = 7; @@ -413,7 +413,7 @@ fn State256X(comptime degree: u7) type { return state; } - inline fn update(state: *State, d: AesBlockVec) void { + fn update(state: *State, d: AesBlockVec) void { const blocks = &state.blocks; const tmp = blocks[5].encrypt(blocks[0]); comptime var i: usize = 5; diff --git a/lib/std/crypto/aes/aesni.zig b/lib/std/crypto/aes/aesni.zig index 027fbca646..64bf37b46e 100644 --- a/lib/std/crypto/aes/aesni.zig +++ b/lib/std/crypto/aes/aesni.zig @@ -17,24 +17,24 @@ pub const Block = struct { repr: Repr, /// Convert a byte sequence into an internal representation. - pub inline fn fromBytes(bytes: *const [16]u8) Block { + pub fn fromBytes(bytes: *const [16]u8) Block { const repr = mem.bytesToValue(Repr, bytes); return Block{ .repr = repr }; } /// Convert the internal representation of a block into a byte sequence. - pub inline fn toBytes(block: Block) [16]u8 { + pub fn toBytes(block: Block) [16]u8 { return mem.toBytes(block.repr); } /// XOR the block with a byte sequence. - pub inline fn xorBytes(block: Block, bytes: *const [16]u8) [16]u8 { + pub fn xorBytes(block: Block, bytes: *const [16]u8) [16]u8 { const x = block.repr ^ fromBytes(bytes).repr; return mem.toBytes(x); } /// Encrypt a block with a round key. - pub inline fn encrypt(block: Block, round_key: Block) Block { + pub fn encrypt(block: Block, round_key: Block) Block { return Block{ .repr = asm ( \\ vaesenc %[rk], %[in], %[out] @@ -46,7 +46,7 @@ pub const Block = struct { } /// Encrypt a block with the last round key. - pub inline fn encryptLast(block: Block, round_key: Block) Block { + pub fn encryptLast(block: Block, round_key: Block) Block { return Block{ .repr = asm ( \\ vaesenclast %[rk], %[in], %[out] @@ -58,7 +58,7 @@ pub const Block = struct { } /// Decrypt a block with a round key. - pub inline fn decrypt(block: Block, inv_round_key: Block) Block { + pub fn decrypt(block: Block, inv_round_key: Block) Block { return Block{ .repr = asm ( \\ vaesdec %[rk], %[in], %[out] @@ -70,7 +70,7 @@ pub const Block = struct { } /// Decrypt a block with the last round key. - pub inline fn decryptLast(block: Block, inv_round_key: Block) Block { + pub fn decryptLast(block: Block, inv_round_key: Block) Block { return Block{ .repr = asm ( \\ vaesdeclast %[rk], %[in], %[out] @@ -82,17 +82,17 @@ pub const Block = struct { } /// Apply the bitwise XOR operation to the content of two blocks. - pub inline fn xorBlocks(block1: Block, block2: Block) Block { + pub fn xorBlocks(block1: Block, block2: Block) Block { return Block{ .repr = block1.repr ^ block2.repr }; } /// Apply the bitwise AND operation to the content of two blocks. - pub inline fn andBlocks(block1: Block, block2: Block) Block { + pub fn andBlocks(block1: Block, block2: Block) Block { return Block{ .repr = block1.repr & block2.repr }; } /// Apply the bitwise OR operation to the content of two blocks. - pub inline fn orBlocks(block1: Block, block2: Block) Block { + pub fn orBlocks(block1: Block, block2: Block) Block { return Block{ .repr = block1.repr | block2.repr }; } @@ -112,7 +112,7 @@ pub const Block = struct { }; /// Encrypt multiple blocks in parallel, each their own round key. - pub inline fn encryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { + pub fn encryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -122,7 +122,7 @@ pub const Block = struct { } /// Decrypt multiple blocks in parallel, each their own round key. - pub inline fn decryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { + pub fn decryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -132,7 +132,7 @@ pub const Block = struct { } /// Encrypt multiple blocks in parallel with the same round key. - pub inline fn encryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn encryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -142,7 +142,7 @@ pub const Block = struct { } /// Decrypt multiple blocks in parallel with the same round key. - pub inline fn decryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn decryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -152,7 +152,7 @@ pub const Block = struct { } /// Encrypt multiple blocks in parallel with the same last round key. - pub inline fn encryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn encryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -162,7 +162,7 @@ pub const Block = struct { } /// Decrypt multiple blocks in parallel with the same last round key. - pub inline fn decryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn decryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -200,7 +200,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { pub const block_length: usize = blocks_count * 16; /// Convert a byte sequence into an internal representation. - pub inline fn fromBytes(bytes: *const [blocks_count * 16]u8) Self { + pub fn fromBytes(bytes: *const [blocks_count * 16]u8) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = mem.bytesToValue(Repr, bytes[i * native_word_size ..][0..native_word_size]); @@ -209,7 +209,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Convert the internal representation of a block vector into a byte sequence. - pub inline fn toBytes(block_vec: Self) [blocks_count * 16]u8 { + pub fn toBytes(block_vec: Self) [blocks_count * 16]u8 { var out: [blocks_count * 16]u8 = undefined; inline for (0..native_words) |i| { out[i * native_word_size ..][0..native_word_size].* = mem.toBytes(block_vec.repr[i]); @@ -218,7 +218,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// XOR the block vector with a byte sequence. - pub inline fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [blocks_count * 16]u8 { + pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [blocks_count * 16]u8 { var x: Self = undefined; inline for (0..native_words) |i| { x.repr[i] = block_vec.repr[i] ^ mem.bytesToValue(Repr, bytes[i * native_word_size ..][0..native_word_size]); @@ -227,7 +227,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the forward AES operation to the block vector with a vector of round keys. - pub inline fn encrypt(block_vec: Self, round_key_vec: Self) Self { + pub fn encrypt(block_vec: Self, round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = asm ( @@ -241,7 +241,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the forward AES operation to the block vector with a vector of last round keys. - pub inline fn encryptLast(block_vec: Self, round_key_vec: Self) Self { + pub fn encryptLast(block_vec: Self, round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = asm ( @@ -255,7 +255,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the inverse AES operation to the block vector with a vector of round keys. - pub inline fn decrypt(block_vec: Self, inv_round_key_vec: Self) Self { + pub fn decrypt(block_vec: Self, inv_round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = asm ( @@ -269,7 +269,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the inverse AES operation to the block vector with a vector of last round keys. - pub inline fn decryptLast(block_vec: Self, inv_round_key_vec: Self) Self { + pub fn decryptLast(block_vec: Self, inv_round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = asm ( @@ -283,7 +283,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise XOR operation to the content of two block vectors. - pub inline fn xorBlocks(block_vec1: Self, block_vec2: Self) Self { + pub fn xorBlocks(block_vec1: Self, block_vec2: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i] ^ block_vec2.repr[i]; @@ -292,7 +292,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise AND operation to the content of two block vectors. - pub inline fn andBlocks(block_vec1: Self, block_vec2: Self) Self { + pub fn andBlocks(block_vec1: Self, block_vec2: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i] & block_vec2.repr[i]; @@ -301,7 +301,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise OR operation to the content of two block vectors. - pub inline fn orBlocks(block_vec1: Self, block_vec2: Block) Self { + pub fn orBlocks(block_vec1: Self, block_vec2: Block) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i] | block_vec2.repr[i]; diff --git a/lib/std/crypto/aes/armcrypto.zig b/lib/std/crypto/aes/armcrypto.zig index 2487ab7e72..714f3c0c32 100644 --- a/lib/std/crypto/aes/armcrypto.zig +++ b/lib/std/crypto/aes/armcrypto.zig @@ -12,18 +12,18 @@ pub const Block = struct { repr: Repr, /// Convert a byte sequence into an internal representation. - pub inline fn fromBytes(bytes: *const [16]u8) Block { + pub fn fromBytes(bytes: *const [16]u8) Block { const repr = mem.bytesToValue(Repr, bytes); return Block{ .repr = repr }; } /// Convert the internal representation of a block into a byte sequence. - pub inline fn toBytes(block: Block) [16]u8 { + pub fn toBytes(block: Block) [16]u8 { return mem.toBytes(block.repr); } /// XOR the block with a byte sequence. - pub inline fn xorBytes(block: Block, bytes: *const [16]u8) [16]u8 { + pub fn xorBytes(block: Block, bytes: *const [16]u8) [16]u8 { const x = block.repr ^ fromBytes(bytes).repr; return mem.toBytes(x); } @@ -31,7 +31,7 @@ pub const Block = struct { const zero = @Vector(2, u64){ 0, 0 }; /// Encrypt a block with a round key. - pub inline fn encrypt(block: Block, round_key: Block) Block { + pub fn encrypt(block: Block, round_key: Block) Block { return Block{ .repr = (asm ( \\ mov %[out].16b, %[in].16b @@ -45,7 +45,7 @@ pub const Block = struct { } /// Encrypt a block with the last round key. - pub inline fn encryptLast(block: Block, round_key: Block) Block { + pub fn encryptLast(block: Block, round_key: Block) Block { return Block{ .repr = (asm ( \\ mov %[out].16b, %[in].16b @@ -58,7 +58,7 @@ pub const Block = struct { } /// Decrypt a block with a round key. - pub inline fn decrypt(block: Block, inv_round_key: Block) Block { + pub fn decrypt(block: Block, inv_round_key: Block) Block { return Block{ .repr = (asm ( \\ mov %[out].16b, %[in].16b @@ -72,7 +72,7 @@ pub const Block = struct { } /// Decrypt a block with the last round key. - pub inline fn decryptLast(block: Block, inv_round_key: Block) Block { + pub fn decryptLast(block: Block, inv_round_key: Block) Block { return Block{ .repr = (asm ( \\ mov %[out].16b, %[in].16b @@ -85,17 +85,17 @@ pub const Block = struct { } /// Apply the bitwise XOR operation to the content of two blocks. - pub inline fn xorBlocks(block1: Block, block2: Block) Block { + pub fn xorBlocks(block1: Block, block2: Block) Block { return Block{ .repr = block1.repr ^ block2.repr }; } /// Apply the bitwise AND operation to the content of two blocks. - pub inline fn andBlocks(block1: Block, block2: Block) Block { + pub fn andBlocks(block1: Block, block2: Block) Block { return Block{ .repr = block1.repr & block2.repr }; } /// Apply the bitwise OR operation to the content of two blocks. - pub inline fn orBlocks(block1: Block, block2: Block) Block { + pub fn orBlocks(block1: Block, block2: Block) Block { return Block{ .repr = block1.repr | block2.repr }; } @@ -105,7 +105,7 @@ pub const Block = struct { pub const optimal_parallel_blocks = 6; /// Encrypt multiple blocks in parallel, each their own round key. - pub inline fn encryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { + pub fn encryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -115,7 +115,7 @@ pub const Block = struct { } /// Decrypt multiple blocks in parallel, each their own round key. - pub inline fn decryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { + pub fn decryptParallel(comptime count: usize, blocks: [count]Block, round_keys: [count]Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -125,7 +125,7 @@ pub const Block = struct { } /// Encrypt multiple blocks in parallel with the same round key. - pub inline fn encryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn encryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -135,7 +135,7 @@ pub const Block = struct { } /// Decrypt multiple blocks in parallel with the same round key. - pub inline fn decryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn decryptWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -145,7 +145,7 @@ pub const Block = struct { } /// Encrypt multiple blocks in parallel with the same last round key. - pub inline fn encryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn encryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -155,7 +155,7 @@ pub const Block = struct { } /// Decrypt multiple blocks in parallel with the same last round key. - pub inline fn decryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { + pub fn decryptLastWide(comptime count: usize, blocks: [count]Block, round_key: Block) [count]Block { comptime var i = 0; var out: [count]Block = undefined; inline while (i < count) : (i += 1) { @@ -187,7 +187,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { pub const block_length: usize = blocks_count * 16; /// Convert a byte sequence into an internal representation. - pub inline fn fromBytes(bytes: *const [blocks_count * 16]u8) Self { + pub fn fromBytes(bytes: *const [blocks_count * 16]u8) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = Block.fromBytes(bytes[i * native_word_size ..][0..native_word_size]); @@ -196,7 +196,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Convert the internal representation of a block vector into a byte sequence. - pub inline fn toBytes(block_vec: Self) [blocks_count * 16]u8 { + pub fn toBytes(block_vec: Self) [blocks_count * 16]u8 { var out: [blocks_count * 16]u8 = undefined; inline for (0..native_words) |i| { out[i * native_word_size ..][0..native_word_size].* = block_vec.repr[i].toBytes(); @@ -205,7 +205,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// XOR the block vector with a byte sequence. - pub inline fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [32]u8 { + pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [32]u8 { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].xorBytes(bytes[i * native_word_size ..][0..native_word_size]); @@ -214,7 +214,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the forward AES operation to the block vector with a vector of round keys. - pub inline fn encrypt(block_vec: Self, round_key_vec: Self) Self { + pub fn encrypt(block_vec: Self, round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].encrypt(round_key_vec.repr[i]); @@ -223,7 +223,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the forward AES operation to the block vector with a vector of last round keys. - pub inline fn encryptLast(block_vec: Self, round_key_vec: Self) Self { + pub fn encryptLast(block_vec: Self, round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].encryptLast(round_key_vec.repr[i]); @@ -232,7 +232,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the inverse AES operation to the block vector with a vector of round keys. - pub inline fn decrypt(block_vec: Self, inv_round_key_vec: Self) Self { + pub fn decrypt(block_vec: Self, inv_round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].decrypt(inv_round_key_vec.repr[i]); @@ -241,7 +241,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the inverse AES operation to the block vector with a vector of last round keys. - pub inline fn decryptLast(block_vec: Self, inv_round_key_vec: Self) Self { + pub fn decryptLast(block_vec: Self, inv_round_key_vec: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].decryptLast(inv_round_key_vec.repr[i]); @@ -250,7 +250,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise XOR operation to the content of two block vectors. - pub inline fn xorBlocks(block_vec1: Self, block_vec2: Self) Self { + pub fn xorBlocks(block_vec1: Self, block_vec2: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i].xorBlocks(block_vec2.repr[i]); @@ -259,7 +259,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise AND operation to the content of two block vectors. - pub inline fn andBlocks(block_vec1: Self, block_vec2: Self) Self { + pub fn andBlocks(block_vec1: Self, block_vec2: Self) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i].andBlocks(block_vec2.repr[i]); @@ -268,7 +268,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise OR operation to the content of two block vectors. - pub inline fn orBlocks(block_vec1: Self, block_vec2: Block) Self { + pub fn orBlocks(block_vec1: Self, block_vec2: Block) Self { var out: Self = undefined; inline for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i].orBlocks(block_vec2.repr[i]); diff --git a/lib/std/crypto/aes/soft.zig b/lib/std/crypto/aes/soft.zig index 7f3d298a3a..cec5abff48 100644 --- a/lib/std/crypto/aes/soft.zig +++ b/lib/std/crypto/aes/soft.zig @@ -14,7 +14,7 @@ pub const Block = struct { repr: Repr align(16), /// Convert a byte sequence into an internal representation. - pub inline fn fromBytes(bytes: *const [16]u8) Block { + pub fn fromBytes(bytes: *const [16]u8) Block { const s0 = mem.readInt(u32, bytes[0..4], .little); const s1 = mem.readInt(u32, bytes[4..8], .little); const s2 = mem.readInt(u32, bytes[8..12], .little); @@ -23,7 +23,7 @@ pub const Block = struct { } /// Convert the internal representation of a block into a byte sequence. - pub inline fn toBytes(block: Block) [16]u8 { + pub fn toBytes(block: Block) [16]u8 { var bytes: [16]u8 = undefined; mem.writeInt(u32, bytes[0..4], block.repr[0], .little); mem.writeInt(u32, bytes[4..8], block.repr[1], .little); @@ -33,7 +33,7 @@ pub const Block = struct { } /// XOR the block with a byte sequence. - pub inline fn xorBytes(block: Block, bytes: *const [16]u8) [16]u8 { + pub fn xorBytes(block: Block, bytes: *const [16]u8) [16]u8 { const block_bytes = block.toBytes(); var x: [16]u8 = undefined; comptime var i: usize = 0; @@ -44,7 +44,7 @@ pub const Block = struct { } /// Encrypt a block with a round key. - pub inline fn encrypt(block: Block, round_key: Block) Block { + pub fn encrypt(block: Block, round_key: Block) Block { const s0 = block.repr[0]; const s1 = block.repr[1]; const s2 = block.repr[2]; @@ -69,7 +69,7 @@ pub const Block = struct { } /// Encrypt a block with a round key *WITHOUT ANY PROTECTION AGAINST SIDE CHANNELS* - pub inline fn encryptUnprotected(block: Block, round_key: Block) Block { + pub fn encryptUnprotected(block: Block, round_key: Block) Block { const s0 = block.repr[0]; const s1 = block.repr[1]; const s2 = block.repr[2]; @@ -114,7 +114,7 @@ pub const Block = struct { } /// Encrypt a block with the last round key. - pub inline fn encryptLast(block: Block, round_key: Block) Block { + pub fn encryptLast(block: Block, round_key: Block) Block { const s0 = block.repr[0]; const s1 = block.repr[1]; const s2 = block.repr[2]; @@ -140,7 +140,7 @@ pub const Block = struct { } /// Decrypt a block with a round key. - pub inline fn decrypt(block: Block, round_key: Block) Block { + pub fn decrypt(block: Block, round_key: Block) Block { const s0 = block.repr[0]; const s1 = block.repr[1]; const s2 = block.repr[2]; @@ -165,7 +165,7 @@ pub const Block = struct { } /// Decrypt a block with a round key *WITHOUT ANY PROTECTION AGAINST SIDE CHANNELS* - pub inline fn decryptUnprotected(block: Block, round_key: Block) Block { + pub fn decryptUnprotected(block: Block, round_key: Block) Block { const s0 = block.repr[0]; const s1 = block.repr[1]; const s2 = block.repr[2]; @@ -210,7 +210,7 @@ pub const Block = struct { } /// Decrypt a block with the last round key. - pub inline fn decryptLast(block: Block, round_key: Block) Block { + pub fn decryptLast(block: Block, round_key: Block) Block { const s0 = block.repr[0]; const s1 = block.repr[1]; const s2 = block.repr[2]; @@ -236,7 +236,7 @@ pub const Block = struct { } /// Apply the bitwise XOR operation to the content of two blocks. - pub inline fn xorBlocks(block1: Block, block2: Block) Block { + pub fn xorBlocks(block1: Block, block2: Block) Block { var x: Repr = undefined; comptime var i = 0; inline while (i < 4) : (i += 1) { @@ -246,7 +246,7 @@ pub const Block = struct { } /// Apply the bitwise AND operation to the content of two blocks. - pub inline fn andBlocks(block1: Block, block2: Block) Block { + pub fn andBlocks(block1: Block, block2: Block) Block { var x: Repr = undefined; comptime var i = 0; inline while (i < 4) : (i += 1) { @@ -256,7 +256,7 @@ pub const Block = struct { } /// Apply the bitwise OR operation to the content of two blocks. - pub inline fn orBlocks(block1: Block, block2: Block) Block { + pub fn orBlocks(block1: Block, block2: Block) Block { var x: Repr = undefined; comptime var i = 0; inline while (i < 4) : (i += 1) { @@ -353,7 +353,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { pub const block_length: usize = blocks_count * 16; /// Convert a byte sequence into an internal representation. - pub inline fn fromBytes(bytes: *const [blocks_count * 16]u8) Self { + pub fn fromBytes(bytes: *const [blocks_count * 16]u8) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = Block.fromBytes(bytes[i * native_word_size ..][0..native_word_size]); @@ -362,7 +362,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Convert the internal representation of a block vector into a byte sequence. - pub inline fn toBytes(block_vec: Self) [blocks_count * 16]u8 { + pub fn toBytes(block_vec: Self) [blocks_count * 16]u8 { var out: [blocks_count * 16]u8 = undefined; for (0..native_words) |i| { out[i * native_word_size ..][0..native_word_size].* = block_vec.repr[i].toBytes(); @@ -371,7 +371,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// XOR the block vector with a byte sequence. - pub inline fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [32]u8 { + pub fn xorBytes(block_vec: Self, bytes: *const [blocks_count * 16]u8) [32]u8 { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].xorBytes(bytes[i * native_word_size ..][0..native_word_size]); @@ -380,7 +380,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the forward AES operation to the block vector with a vector of round keys. - pub inline fn encrypt(block_vec: Self, round_key_vec: Self) Self { + pub fn encrypt(block_vec: Self, round_key_vec: Self) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].encrypt(round_key_vec.repr[i]); @@ -389,7 +389,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the forward AES operation to the block vector with a vector of last round keys. - pub inline fn encryptLast(block_vec: Self, round_key_vec: Self) Self { + pub fn encryptLast(block_vec: Self, round_key_vec: Self) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].encryptLast(round_key_vec.repr[i]); @@ -398,7 +398,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the inverse AES operation to the block vector with a vector of round keys. - pub inline fn decrypt(block_vec: Self, inv_round_key_vec: Self) Self { + pub fn decrypt(block_vec: Self, inv_round_key_vec: Self) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].decrypt(inv_round_key_vec.repr[i]); @@ -407,7 +407,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the inverse AES operation to the block vector with a vector of last round keys. - pub inline fn decryptLast(block_vec: Self, inv_round_key_vec: Self) Self { + pub fn decryptLast(block_vec: Self, inv_round_key_vec: Self) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec.repr[i].decryptLast(inv_round_key_vec.repr[i]); @@ -416,7 +416,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise XOR operation to the content of two block vectors. - pub inline fn xorBlocks(block_vec1: Self, block_vec2: Self) Self { + pub fn xorBlocks(block_vec1: Self, block_vec2: Self) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i].xorBlocks(block_vec2.repr[i]); @@ -425,7 +425,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise AND operation to the content of two block vectors. - pub inline fn andBlocks(block_vec1: Self, block_vec2: Self) Self { + pub fn andBlocks(block_vec1: Self, block_vec2: Self) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i].andBlocks(block_vec2.repr[i]); @@ -434,7 +434,7 @@ pub fn BlockVec(comptime blocks_count: comptime_int) type { } /// Apply the bitwise OR operation to the content of two block vectors. - pub inline fn orBlocks(block_vec1: Self, block_vec2: Block) Self { + pub fn orBlocks(block_vec1: Self, block_vec2: Block) Self { var out: Self = undefined; for (0..native_words) |i| { out.repr[i] = block_vec1.repr[i].orBlocks(block_vec2.repr[i]); diff --git a/lib/std/crypto/aes_gcm.zig b/lib/std/crypto/aes_gcm.zig index 90717516c4..e430d3addb 100644 --- a/lib/std/crypto/aes_gcm.zig +++ b/lib/std/crypto/aes_gcm.zig @@ -21,6 +21,12 @@ fn AesGcm(comptime Aes: anytype) type { const zeros = [_]u8{0} ** 16; + /// `c`: The ciphertext buffer to write the encrypted data to. + /// `tag`: The authentication tag buffer to write the computed tag to. + /// `m`: The plaintext message to encrypt. + /// `ad`: The associated data to authenticate. + /// `npub`: The nonce to use for encryption. + /// `key`: The encryption key. pub fn encrypt(c: []u8, tag: *[tag_length]u8, m: []const u8, ad: []const u8, npub: [nonce_length]u8, key: [key_length]u8) void { debug.assert(c.len == m.len); debug.assert(m.len <= 16 * ((1 << 32) - 2)); diff --git a/lib/std/crypto/aes_ocb.zig b/lib/std/crypto/aes_ocb.zig index 2aa1fdc4b0..2d6817dc69 100644 --- a/lib/std/crypto/aes_ocb.zig +++ b/lib/std/crypto/aes_ocb.zig @@ -28,7 +28,7 @@ fn AesOcb(comptime Aes: anytype) type { table: [56]Block align(16) = undefined, upto: usize, - inline fn double(l: Block) Block { + fn double(l: Block) Block { const l_ = mem.readInt(u128, &l, .big); const l_2 = (l_ << 1) ^ (0x87 & -%(l_ >> 127)); var l2: Block = undefined; @@ -244,7 +244,7 @@ fn AesOcb(comptime Aes: anytype) type { }; } -inline fn xorBlocks(x: Block, y: Block) Block { +fn xorBlocks(x: Block, y: Block) Block { var z: Block = x; for (&z, 0..) |*v, i| { v.* = x[i] ^ y[i]; @@ -252,7 +252,7 @@ inline fn xorBlocks(x: Block, y: Block) Block { return z; } -inline fn xorWith(x: *Block, y: Block) void { +fn xorWith(x: *Block, y: Block) void { for (x, 0..) |*v, i| { v.* ^= y[i]; } diff --git a/lib/std/crypto/ascon.zig b/lib/std/crypto/ascon.zig index a2168b8a9d..c0ba5de939 100644 --- a/lib/std/crypto/ascon.zig +++ b/lib/std/crypto/ascon.zig @@ -157,7 +157,7 @@ pub fn State(comptime endian: std.builtin.Endian) type { } /// Apply a reduced-round permutation to the state. - pub inline fn permuteR(state: *Self, comptime rounds: u4) void { + pub fn permuteR(state: *Self, comptime rounds: u4) void { const rks = [16]u64{ 0x3c, 0x2d, 0x1e, 0x0f, 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87, 0x78, 0x69, 0x5a, 0x4b }; inline for (rks[rks.len - rounds ..]) |rk| { state.round(rk); @@ -165,13 +165,13 @@ pub fn State(comptime endian: std.builtin.Endian) type { } /// Apply a full-round permutation to the state. - pub inline fn permute(state: *Self) void { + pub fn permute(state: *Self) void { state.permuteR(12); } /// Apply a permutation to the state and prevent backtracking. /// The rate is expressed in bytes and must be a multiple of the word size (8). - pub inline fn permuteRatchet(state: *Self, comptime rounds: u4, comptime rate: u6) void { + pub fn permuteRatchet(state: *Self, comptime rounds: u4, comptime rate: u6) void { const capacity = block_bytes - rate; debug.assert(capacity > 0 and capacity % 8 == 0); // capacity must be a multiple of 64 bits var mask: [capacity / 8]u64 = undefined; @@ -181,7 +181,7 @@ pub fn State(comptime endian: std.builtin.Endian) type { } // Core Ascon permutation. - inline fn round(state: *Self, rk: u64) void { + fn round(state: *Self, rk: u64) void { const x = &state.st; x[2] ^= rk; diff --git a/lib/std/crypto/blake3.zig b/lib/std/crypto/blake3.zig index 5fb9f6ee76..a840a30632 100644 --- a/lib/std/crypto/blake3.zig +++ b/lib/std/crypto/blake3.zig @@ -61,7 +61,7 @@ const CompressVectorized = struct { const Lane = @Vector(4, u32); const Rows = [4]Lane; - inline fn g(comptime even: bool, rows: *Rows, m: Lane) void { + fn g(comptime even: bool, rows: *Rows, m: Lane) void { rows[0] +%= rows[1] +% m; rows[3] ^= rows[0]; rows[3] = math.rotr(Lane, rows[3], if (even) 8 else 16); @@ -70,13 +70,13 @@ const CompressVectorized = struct { rows[1] = math.rotr(Lane, rows[1], if (even) 7 else 12); } - inline fn diagonalize(rows: *Rows) void { + fn diagonalize(rows: *Rows) void { rows[0] = @shuffle(u32, rows[0], undefined, [_]i32{ 3, 0, 1, 2 }); rows[3] = @shuffle(u32, rows[3], undefined, [_]i32{ 2, 3, 0, 1 }); rows[2] = @shuffle(u32, rows[2], undefined, [_]i32{ 1, 2, 3, 0 }); } - inline fn undiagonalize(rows: *Rows) void { + fn undiagonalize(rows: *Rows) void { rows[0] = @shuffle(u32, rows[0], undefined, [_]i32{ 1, 2, 3, 0 }); rows[3] = @shuffle(u32, rows[3], undefined, [_]i32{ 2, 3, 0, 1 }); rows[2] = @shuffle(u32, rows[2], undefined, [_]i32{ 3, 0, 1, 2 }); diff --git a/lib/std/crypto/chacha20.zig b/lib/std/crypto/chacha20.zig index c605a6cb34..c4e84aad53 100644 --- a/lib/std/crypto/chacha20.zig +++ b/lib/std/crypto/chacha20.zig @@ -151,7 +151,7 @@ fn ChaChaVecImpl(comptime rounds_nb: usize, comptime degree: comptime_int) type } } - inline fn chacha20Core(x: *BlockVec, input: BlockVec) void { + fn chacha20Core(x: *BlockVec, input: BlockVec) void { x.* = input; const m0 = switch (degree) { @@ -215,7 +215,7 @@ fn ChaChaVecImpl(comptime rounds_nb: usize, comptime degree: comptime_int) type } } - inline fn hashToBytes(comptime dm: usize, out: *[64 * dm]u8, x: BlockVec) void { + fn hashToBytes(comptime dm: usize, out: *[64 * dm]u8, x: BlockVec) void { for (0..dm) |d| { for (0..4) |i| { mem.writeInt(u32, out[64 * d + 16 * i + 0 ..][0..4], x[i][0 + 4 * d], .little); @@ -226,7 +226,7 @@ fn ChaChaVecImpl(comptime rounds_nb: usize, comptime degree: comptime_int) type } } - inline fn contextFeedback(x: *BlockVec, ctx: BlockVec) void { + fn contextFeedback(x: *BlockVec, ctx: BlockVec) void { x[0] +%= ctx[0]; x[1] +%= ctx[1]; x[2] +%= ctx[2]; @@ -365,7 +365,7 @@ fn ChaChaNonVecImpl(comptime rounds_nb: usize) type { }; } - inline fn chacha20Core(x: *BlockVec, input: BlockVec) void { + fn chacha20Core(x: *BlockVec, input: BlockVec) void { x.* = input; const rounds = comptime [_]QuarterRound{ @@ -394,7 +394,7 @@ fn ChaChaNonVecImpl(comptime rounds_nb: usize) type { } } - inline fn hashToBytes(out: *[64]u8, x: BlockVec) void { + fn hashToBytes(out: *[64]u8, x: BlockVec) void { for (0..4) |i| { mem.writeInt(u32, out[16 * i + 0 ..][0..4], x[i * 4 + 0], .little); mem.writeInt(u32, out[16 * i + 4 ..][0..4], x[i * 4 + 1], .little); @@ -403,7 +403,7 @@ fn ChaChaNonVecImpl(comptime rounds_nb: usize) type { } } - inline fn contextFeedback(x: *BlockVec, ctx: BlockVec) void { + fn contextFeedback(x: *BlockVec, ctx: BlockVec) void { for (0..16) |i| { x[i] +%= ctx[i]; } diff --git a/lib/std/crypto/codecs/base64_hex_ct.zig b/lib/std/crypto/codecs/base64_hex_ct.zig index 2a2a3c3005..3842e3d592 100644 --- a/lib/std/crypto/codecs/base64_hex_ct.zig +++ b/lib/std/crypto/codecs/base64_hex_ct.zig @@ -280,34 +280,34 @@ pub const base64 = struct { return DecoderWithIgnore{ .ignored_chars = ignored_chars }; } - inline fn eq(x: u8, y: u8) u8 { + fn eq(x: u8, y: u8) u8 { return ~@as(u8, @truncate((0 -% (@as(u16, x) ^ @as(u16, y))) >> 8)); } - inline fn gt(x: u8, y: u8) u8 { + fn gt(x: u8, y: u8) u8 { return @truncate((@as(u16, y) -% @as(u16, x)) >> 8); } - inline fn ge(x: u8, y: u8) u8 { + fn ge(x: u8, y: u8) u8 { return ~gt(y, x); } - inline fn lt(x: u8, y: u8) u8 { + fn lt(x: u8, y: u8) u8 { return gt(y, x); } - inline fn le(x: u8, y: u8) u8 { + fn le(x: u8, y: u8) u8 { return ge(y, x); } - inline fn charFromByte(x: u8, comptime urlsafe: bool) u8 { + fn charFromByte(x: u8, comptime urlsafe: bool) u8 { return (lt(x, 26) & (x +% 'A')) | (ge(x, 26) & lt(x, 52) & (x +% 'a' -% 26)) | (ge(x, 52) & lt(x, 62) & (x +% '0' -% 52)) | (eq(x, 62) & '+') | (eq(x, 63) & if (urlsafe) '_' else '/'); } - inline fn byteFromChar(c: u8, comptime urlsafe: bool) u8 { + fn byteFromChar(c: u8, comptime urlsafe: bool) u8 { const x = (ge(c, 'A') & le(c, 'Z') & (c -% 'A')) | (ge(c, 'a') & le(c, 'z') & (c -% 'a' +% 26)) | diff --git a/lib/std/crypto/ghash_polyval.zig b/lib/std/crypto/ghash_polyval.zig index cf93ae7ca5..45b2beb91b 100644 --- a/lib/std/crypto/ghash_polyval.zig +++ b/lib/std/crypto/ghash_polyval.zig @@ -89,7 +89,7 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { const Selector = enum { lo, hi, hi_lo }; // Carryless multiplication of two 64-bit integers for x86_64. - inline fn clmulPclmul(x: u128, y: u128, comptime half: Selector) u128 { + fn clmulPclmul(x: u128, y: u128, comptime half: Selector) u128 { switch (half) { .hi => { const product = asm ( @@ -122,7 +122,7 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { } // Carryless multiplication of two 64-bit integers for ARM crypto. - inline fn clmulPmull(x: u128, y: u128, comptime half: Selector) u128 { + fn clmulPmull(x: u128, y: u128, comptime half: Selector) u128 { switch (half) { .hi => { const product = asm ( @@ -231,7 +231,7 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { mid: u128, }; - inline fn xor256(x: *I256, y: I256) void { + fn xor256(x: *I256, y: I256) void { x.* = I256{ .hi = x.hi ^ y.hi, .lo = x.lo ^ y.lo, @@ -249,7 +249,7 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { } // Multiply two 128-bit integers in GF(2^128). - inline fn clmul128(x: u128, y: u128) I256 { + fn clmul128(x: u128, y: u128) I256 { if (mul_algorithm == .karatsuba) { const x_hi = @as(u64, @truncate(x >> 64)); const y_hi = @as(u64, @truncate(y >> 64)); @@ -273,7 +273,7 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { // Reduce a 256-bit representative of a polynomial modulo the irreducible polynomial x^128 + x^127 + x^126 + x^121 + 1. // This is done using Shay Gueron's black magic demysticated here: // https://blog.quarkslab.com/reversing-a-finite-field-multiplication-optimization.html - inline fn reduce(x: I256) u128 { + fn reduce(x: I256) u128 { const hi = x.hi ^ (x.mid >> 64); const lo = x.lo ^ (x.mid << 64); const p64 = (((1 << 121) | (1 << 126) | (1 << 127)) >> 64); diff --git a/lib/std/crypto/pcurves/p256/p256_64.zig b/lib/std/crypto/pcurves/p256/p256_64.zig index f3d38ca3e6..e79d51814e 100644 --- a/lib/std/crypto/pcurves/p256/p256_64.zig +++ b/lib/std/crypto/pcurves/p256/p256_64.zig @@ -72,7 +72,7 @@ pub const NonMontgomeryDomainFieldElement = [4]u64; /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) +% arg3 +% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -91,7 +91,7 @@ inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) vo /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) -% arg3 -% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -109,7 +109,7 @@ inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) v /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] -inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { +fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { @setRuntimeSafety(mode == .Debug); const x = @as(u128, arg1) * @as(u128, arg2); @@ -128,7 +128,7 @@ inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { /// arg3: [0x0 ~> 0xffffffffffffffff] /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] -inline fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { +fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { @setRuntimeSafety(mode == .Debug); const mask = 0 -% @as(u64, arg1); diff --git a/lib/std/crypto/pcurves/p256/p256_scalar_64.zig b/lib/std/crypto/pcurves/p256/p256_scalar_64.zig index 736a3ea8b7..c549831b20 100644 --- a/lib/std/crypto/pcurves/p256/p256_scalar_64.zig +++ b/lib/std/crypto/pcurves/p256/p256_scalar_64.zig @@ -72,7 +72,7 @@ pub const NonMontgomeryDomainFieldElement = [4]u64; /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) +% arg3 +% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -91,7 +91,7 @@ inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) vo /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) -% arg3 -% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -109,7 +109,7 @@ inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) v /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] -inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { +fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { @setRuntimeSafety(mode == .Debug); const x = @as(u128, arg1) * @as(u128, arg2); @@ -128,7 +128,7 @@ inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { /// arg3: [0x0 ~> 0xffffffffffffffff] /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] -inline fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { +fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { @setRuntimeSafety(mode == .Debug); const mask = 0 -% @as(u64, arg1); diff --git a/lib/std/crypto/pcurves/p384/p384_64.zig b/lib/std/crypto/pcurves/p384/p384_64.zig index e1419e7c81..d6f33028f7 100644 --- a/lib/std/crypto/pcurves/p384/p384_64.zig +++ b/lib/std/crypto/pcurves/p384/p384_64.zig @@ -41,7 +41,7 @@ pub const NonMontgomeryDomainFieldElement = [6]u64; /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) +% arg3 +% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -60,7 +60,7 @@ inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) vo /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) -% arg3 -% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -78,7 +78,7 @@ inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) v /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] -inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { +fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { @setRuntimeSafety(mode == .Debug); const x = @as(u128, arg1) * @as(u128, arg2); @@ -97,7 +97,7 @@ inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { /// arg3: [0x0 ~> 0xffffffffffffffff] /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] -inline fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { +fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { @setRuntimeSafety(mode == .Debug); const mask = 0 -% @as(u64, arg1); diff --git a/lib/std/crypto/pcurves/p384/p384_scalar_64.zig b/lib/std/crypto/pcurves/p384/p384_scalar_64.zig index 68a0a0ca2f..74f7e7813f 100644 --- a/lib/std/crypto/pcurves/p384/p384_scalar_64.zig +++ b/lib/std/crypto/pcurves/p384/p384_scalar_64.zig @@ -41,7 +41,7 @@ pub const NonMontgomeryDomainFieldElement = [6]u64; /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) +% arg3 +% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -60,7 +60,7 @@ inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) vo /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) -% arg3 -% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -78,7 +78,7 @@ inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) v /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] -inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { +fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { @setRuntimeSafety(mode == .Debug); const x = @as(u128, arg1) * @as(u128, arg2); @@ -97,7 +97,7 @@ inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { /// arg3: [0x0 ~> 0xffffffffffffffff] /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] -inline fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { +fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { @setRuntimeSafety(mode == .Debug); const mask = 0 -% @as(u64, arg1); diff --git a/lib/std/crypto/pcurves/secp256k1/secp256k1_64.zig b/lib/std/crypto/pcurves/secp256k1/secp256k1_64.zig index 1c69b90eea..547da19bea 100644 --- a/lib/std/crypto/pcurves/secp256k1/secp256k1_64.zig +++ b/lib/std/crypto/pcurves/secp256k1/secp256k1_64.zig @@ -41,7 +41,7 @@ pub const NonMontgomeryDomainFieldElement = [4]u64; /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) +% arg3 +% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -60,7 +60,7 @@ inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) vo /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) -% arg3 -% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -78,7 +78,7 @@ inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) v /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] -inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { +fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { @setRuntimeSafety(mode == .Debug); const x = @as(u128, arg1) * @as(u128, arg2); @@ -97,7 +97,7 @@ inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { /// arg3: [0x0 ~> 0xffffffffffffffff] /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] -inline fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { +fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { @setRuntimeSafety(mode == .Debug); const mask = 0 -% @as(u64, arg1); diff --git a/lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig b/lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig index 97bf5f0a45..71e6f1baba 100644 --- a/lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig +++ b/lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig @@ -41,7 +41,7 @@ pub const NonMontgomeryDomainFieldElement = [4]u64; /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) +% arg3 +% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -60,7 +60,7 @@ inline fn addcarryxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) vo /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0x1] -inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { +fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) void { const x = @as(u128, arg2) -% arg3 -% arg1; out1.* = @truncate(x); out2.* = @truncate(x >> 64); @@ -78,7 +78,7 @@ inline fn subborrowxU64(out1: *u64, out2: *u1, arg1: u1, arg2: u64, arg3: u64) v /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] /// out2: [0x0 ~> 0xffffffffffffffff] -inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { +fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { @setRuntimeSafety(mode == .Debug); const x = @as(u128, arg1) * @as(u128, arg2); @@ -97,7 +97,7 @@ inline fn mulxU64(out1: *u64, out2: *u64, arg1: u64, arg2: u64) void { /// arg3: [0x0 ~> 0xffffffffffffffff] /// Output Bounds: /// out1: [0x0 ~> 0xffffffffffffffff] -inline fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { +fn cmovznzU64(out1: *u64, arg1: u1, arg2: u64, arg3: u64) void { @setRuntimeSafety(mode == .Debug); const mask = 0 -% @as(u64, arg1); diff --git a/lib/std/crypto/poly1305.zig b/lib/std/crypto/poly1305.zig index 787f105904..5bf5a57428 100644 --- a/lib/std/crypto/poly1305.zig +++ b/lib/std/crypto/poly1305.zig @@ -31,13 +31,13 @@ pub const Poly1305 = struct { }; } - inline fn add(a: u64, b: u64, c: u1) struct { u64, u1 } { + fn add(a: u64, b: u64, c: u1) struct { u64, u1 } { const v1 = @addWithOverflow(a, b); const v2 = @addWithOverflow(v1[0], c); return .{ v2[0], v1[1] | v2[1] }; } - inline fn sub(a: u64, b: u64, c: u1) struct { u64, u1 } { + fn sub(a: u64, b: u64, c: u1) struct { u64, u1 } { const v1 = @subWithOverflow(a, b); const v2 = @subWithOverflow(v1[0], c); return .{ v2[0], v1[1] | v2[1] }; diff --git a/lib/std/crypto/salsa20.zig b/lib/std/crypto/salsa20.zig index 0660c5ba06..eb434ed15a 100644 --- a/lib/std/crypto/salsa20.zig +++ b/lib/std/crypto/salsa20.zig @@ -41,7 +41,7 @@ fn SalsaVecImpl(comptime rounds: comptime_int) type { }; } - inline fn salsaCore(x: *BlockVec, input: BlockVec, comptime feedback: bool) void { + fn salsaCore(x: *BlockVec, input: BlockVec, comptime feedback: bool) void { const n1n2n3n0 = Lane{ input[3][1], input[3][2], input[3][3], input[3][0] }; const n1n2 = Half{ n1n2n3n0[0], n1n2n3n0[1] }; const n3n0 = Half{ n1n2n3n0[2], n1n2n3n0[3] }; @@ -203,7 +203,7 @@ fn SalsaNonVecImpl(comptime rounds: comptime_int) type { d: u6, }; - inline fn Rp(a: usize, b: usize, c: usize, d: u6) QuarterRound { + fn Rp(a: usize, b: usize, c: usize, d: u6) QuarterRound { return QuarterRound{ .a = a, .b = b, @@ -212,7 +212,7 @@ fn SalsaNonVecImpl(comptime rounds: comptime_int) type { }; } - inline fn salsaCore(x: *BlockVec, input: BlockVec, comptime feedback: bool) void { + fn salsaCore(x: *BlockVec, input: BlockVec, comptime feedback: bool) void { const arx_steps = comptime [_]QuarterRound{ Rp(4, 0, 12, 7), Rp(8, 4, 0, 9), Rp(12, 8, 4, 13), Rp(0, 12, 8, 18), Rp(9, 5, 1, 7), Rp(13, 9, 5, 9), Rp(1, 13, 9, 13), Rp(5, 1, 13, 18), diff --git a/lib/std/crypto/timing_safe.zig b/lib/std/crypto/timing_safe.zig index 92dbc9cc9d..2dbd2f5192 100644 --- a/lib/std/crypto/timing_safe.zig +++ b/lib/std/crypto/timing_safe.zig @@ -265,7 +265,7 @@ test classify { // Comparing secret data must be done in constant time. The result // is going to be considered as secret as well. - var res = std.crypto.utils.timingSafeEql([32]u8, out, secret); + var res = std.crypto.timing_safe.eql([32]u8, out, secret); // If we want to make a conditional jump based on a secret, // it has to be declassified. diff --git a/lib/std/crypto/tls.zig b/lib/std/crypto/tls.zig index 64fcf15896..e647a7710e 100644 --- a/lib/std/crypto/tls.zig +++ b/lib/std/crypto/tls.zig @@ -593,11 +593,11 @@ pub fn hmac(comptime Hmac: type, message: []const u8, key: [Hmac.key_length]u8) return result; } -pub inline fn extension(et: ExtensionType, bytes: anytype) [2 + 2 + bytes.len]u8 { +pub fn extension(et: ExtensionType, bytes: anytype) [2 + 2 + bytes.len]u8 { return int(u16, @intFromEnum(et)) ++ array(u16, u8, bytes); } -pub inline fn array( +pub fn array( comptime Len: type, comptime Elem: type, elems: anytype, @@ -622,7 +622,7 @@ pub inline fn array( return arr; } -pub inline fn int(comptime Int: type, val: Int) [@divExact(@bitSizeOf(Int), 8)]u8 { +pub fn int(comptime Int: type, val: Int) [@divExact(@bitSizeOf(Int), 8)]u8 { var arr: [@divExact(@bitSizeOf(Int), 8)]u8 = undefined; std.mem.writeInt(Int, &arr, val, .big); return arr; diff --git a/lib/std/crypto/tls/Client.zig b/lib/std/crypto/tls/Client.zig index 8eab61c2fa..082fc9da70 100644 --- a/lib/std/crypto/tls/Client.zig +++ b/lib/std/crypto/tls/Client.zig @@ -1235,7 +1235,7 @@ fn logSecrets(w: *Writer, context: anytype, secrets: anytype) void { }) catch {}; } -inline fn big(x: anytype) @TypeOf(x) { +fn big(x: anytype) @TypeOf(x) { return switch (native_endian) { .big => x, .little => @byteSwap(x), diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 06b6cec887..fed06492c1 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -231,10 +231,6 @@ pub fn print(comptime fmt: []const u8, args: anytype) void { nosuspend w.print(fmt, args) catch return; } -pub fn getStderrMutex() *std.Thread.Mutex { - @compileError("deprecated. call std.debug.lockStdErr() and std.debug.unlockStdErr() instead which will integrate properly with std.Progress"); -} - /// TODO multithreaded awareness var self_debug_info: ?SelfInfo = null; @@ -658,9 +654,8 @@ pub fn defaultPanic( if (uefi.system_table.boot_services) |bs| { // ExitData buffer must be allocated using boot_services.allocatePool (spec: page 220) - const exit_data: []u16 = uefi.raw_pool_allocator.alloc(u16, exit_msg.len + 1) catch @trap(); - @memcpy(exit_data, exit_msg[0..exit_data.len]); // Includes null terminator. - _ = bs.exit(uefi.handle, .aborted, exit_data.len, exit_data.ptr); + const exit_data = uefi.raw_pool_allocator.dupeZ(u16, exit_msg) catch @trap(); + bs.exit(uefi.handle, .aborted, exit_data) catch {}; } @trap(); }, diff --git a/lib/std/fs.zig b/lib/std/fs.zig index b33383dc2d..64a909d6c0 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -35,8 +35,6 @@ pub const realpathW = posix.realpathW; pub const getAppDataDir = @import("fs/get_app_data_dir.zig").getAppDataDir; pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirError; -pub const MAX_PATH_BYTES = @compileError("deprecated; renamed to max_path_bytes"); - /// The maximum length of a file path that the operating system will accept. /// /// Paths, including those returned from file system operations, may be longer @@ -90,9 +88,6 @@ pub const max_name_bytes = switch (native_os) { @compileError("NAME_MAX not implemented for " ++ @tagName(native_os)), }; -/// Deprecated: use `max_name_bytes` -pub const MAX_NAME_BYTES = max_name_bytes; - pub const base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".*; /// Base64 encoder, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem. @@ -101,11 +96,6 @@ pub const base64_encoder = base64.Base64Encoder.init(base64_alphabet, null); /// Base64 decoder, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem. pub const base64_decoder = base64.Base64Decoder.init(base64_alphabet, null); -/// Deprecated. Use `cwd().atomicSymLink()` instead. -pub fn atomicSymLink(_: Allocator, existing_path: []const u8, new_path: []const u8) !void { - try cwd().atomicSymLink(existing_path, new_path, .{}); -} - /// Same as `Dir.updateFile`, except asserts that both `source_path` and `dest_path` /// are absolute. See `Dir.updateFile` for a function that operates on both /// absolute and relative paths. diff --git a/lib/std/fs/Dir.zig b/lib/std/fs/Dir.zig index 0bf4b68eba..47cb28b950 100644 --- a/lib/std/fs/Dir.zig +++ b/lib/std/fs/Dir.zig @@ -1402,9 +1402,6 @@ pub fn setAsCwd(self: Dir) !void { try posix.fchdir(self.fd); } -/// Deprecated: use `OpenOptions` -pub const OpenDirOptions = OpenOptions; - pub const OpenOptions = struct { /// `true` means the opened directory can be used as the `Dir` parameter /// for functions which operate based on an open directory handle. When `false`, @@ -2511,8 +2508,6 @@ pub fn writeFile(self: Dir, options: WriteFileOptions) WriteFileError!void { try file.writeAll(options.data); } -pub const writeFile2 = @compileError("deprecated; renamed to writeFile"); - pub const AccessError = posix.AccessError; /// Test accessing `sub_path`. diff --git a/lib/std/fs/File.zig b/lib/std/fs/File.zig index c3cc767a00..223bee5729 100644 --- a/lib/std/fs/File.zig +++ b/lib/std/fs/File.zig @@ -1045,7 +1045,7 @@ pub const Reader = struct { r.pos = offset; }, .streaming, .streaming_reading => { - if (offset >= r.pos) return Reader.seekBy(r, offset - r.pos); + if (offset >= r.pos) return Reader.seekBy(r, @intCast(offset - r.pos)); if (r.seek_err) |err| return err; posix.lseek_SET(r.file.handle, offset) catch |err| { r.seek_err = err; @@ -1333,6 +1333,7 @@ pub const Writer = struct { .file = w.file, .mode = w.mode, .pos = w.pos, + .interface = Reader.initInterface(w.interface.buffer), .seek_err = w.seek_err, }; } diff --git a/lib/std/hash.zig b/lib/std/hash.zig index d01cbde6c1..27107e1ddf 100644 --- a/lib/std/hash.zig +++ b/lib/std/hash.zig @@ -80,9 +80,8 @@ fn uint16(input: u16) u16 { return x; } -/// DEPRECATED: use std.hash.int() /// Source: https://github.com/skeeto/hash-prospector -pub fn uint32(input: u32) u32 { +fn uint32(input: u32) u32 { var x: u32 = input; x = (x ^ (x >> 17)) *% 0xed5ad4bb; x = (x ^ (x >> 11)) *% 0xac4c1b51; diff --git a/lib/std/http/test.zig b/lib/std/http/test.zig index 130d2803d6..4c3466d5c9 100644 --- a/lib/std/http/test.zig +++ b/lib/std/http/test.zig @@ -150,7 +150,8 @@ test "HTTP server handles a chunked transfer coding request" { "content-type: text/plain\r\n" ++ "\r\n" ++ "message from server!\n"; - var stream_reader = stream.reader(&.{}); + var tiny_buffer: [1]u8 = undefined; // allows allocRemaining to detect limit exceeded + var stream_reader = stream.reader(&tiny_buffer); const response = try stream_reader.interface().allocRemaining(gpa, .limited(expected_response.len)); defer gpa.free(response); try expectEqualStrings(expected_response, response); @@ -288,7 +289,8 @@ test "Server.Request.respondStreaming non-chunked, unknown content-length" { var stream_writer = stream.writer(&.{}); try stream_writer.interface.writeAll(request_bytes); - var stream_reader = stream.reader(&.{}); + var tiny_buffer: [1]u8 = undefined; // allows allocRemaining to detect limit exceeded + var stream_reader = stream.reader(&tiny_buffer); const response = try stream_reader.interface().allocRemaining(gpa, .limited(8192)); defer gpa.free(response); @@ -358,7 +360,8 @@ test "receiving arbitrary http headers from the client" { var stream_writer = stream.writer(&.{}); try stream_writer.interface.writeAll(request_bytes); - var stream_reader = stream.reader(&.{}); + var tiny_buffer: [1]u8 = undefined; // allows allocRemaining to detect limit exceeded + var stream_reader = stream.reader(&tiny_buffer); const response = try stream_reader.interface().allocRemaining(gpa, .limited(8192)); defer gpa.free(response); diff --git a/lib/std/math/big/int.zig b/lib/std/math/big/int.zig index 33938dbd42..f07f5e422d 100644 --- a/lib/std/math/big/int.zig +++ b/lib/std/math/big/int.zig @@ -2222,9 +2222,6 @@ pub const Const = struct { TargetTooSmall, }; - /// Deprecated; use `toInt`. - pub const to = toInt; - /// Convert `self` to `Int`. /// /// Returns an error if self cannot be narrowed into the requested type without truncation. @@ -2855,9 +2852,6 @@ pub const Managed = struct { pub const ConvertError = Const.ConvertError; - /// Deprecated; use `toInt`. - pub const to = toInt; - /// Convert `self` to `Int`. /// /// Returns an error if self cannot be narrowed into the requested type without truncation. diff --git a/lib/std/math/big/int_test.zig b/lib/std/math/big/int_test.zig index 3683eb2bcd..f44b254cf1 100644 --- a/lib/std/math/big/int_test.zig +++ b/lib/std/math/big/int_test.zig @@ -688,7 +688,7 @@ test "string set base 36" { defer a.deinit(); try a.setString(36, "fifvthrv1mzt79ez9"); - try testing.expectEqual(123456789123456789123456789, try a.to(u128)); + try testing.expectEqual(123456789123456789123456789, try a.toInt(u128)); } test "string set bad char error" { diff --git a/lib/std/mem.zig b/lib/std/mem.zig index a5613536c6..c9d0bddc74 100644 --- a/lib/std/mem.zig +++ b/lib/std/mem.zig @@ -2258,8 +2258,6 @@ test byteSwapAllFields { }, k); } -pub const tokenize = @compileError("deprecated; use tokenizeAny, tokenizeSequence, or tokenizeScalar"); - /// Returns an iterator that iterates over the slices of `buffer` that are not /// any of the items in `delimiters`. /// @@ -2458,8 +2456,6 @@ test "tokenize (reset)" { } } -pub const split = @compileError("deprecated; use splitSequence, splitAny, or splitScalar"); - /// Returns an iterator that iterates over the slices of `buffer` that /// are separated by the byte sequence in `delimiter`. /// @@ -2659,8 +2655,6 @@ test "split (reset)" { } } -pub const splitBackwards = @compileError("deprecated; use splitBackwardsSequence, splitBackwardsAny, or splitBackwardsScalar"); - /// Returns an iterator that iterates backwards over the slices of `buffer` that /// are separated by the sequence in `delimiter`. /// diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 5a4ec517b0..0cee23cfa8 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -418,29 +418,6 @@ test fieldInfo { try testing.expect(comptime uf.type == u8); } -/// Deprecated: use @FieldType -pub fn FieldType(comptime T: type, comptime field: FieldEnum(T)) type { - return @FieldType(T, @tagName(field)); -} - -test FieldType { - const S = struct { - a: u8, - b: u16, - }; - - const U = union { - c: u32, - d: *const u8, - }; - - try testing.expect(FieldType(S, .a) == u8); - try testing.expect(FieldType(S, .b) == u16); - - try testing.expect(FieldType(U, .c) == u32); - try testing.expect(FieldType(U, .d) == *const u8); -} - pub fn fieldNames(comptime T: type) *const [fields(T).len][:0]const u8 { return comptime blk: { const fieldInfos = fields(T); diff --git a/lib/std/net.zig b/lib/std/net.zig index 38a7675772..97a78a28fb 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -19,6 +19,7 @@ const File = std.fs.File; // first release to support them. pub const has_unix_sockets = switch (native_os) { .windows => builtin.os.version_range.windows.isAtLeast(.win10_rs4) orelse false, + .wasi => false, else => true, }; @@ -217,8 +218,6 @@ pub const Address = extern union { /// Sets SO_REUSEADDR and SO_REUSEPORT on POSIX. /// Sets SO_REUSEADDR on Windows, which is roughly equivalent. reuse_address: bool = false, - /// Deprecated. Does the same thing as reuse_address. - reuse_port: bool = false, force_nonblocking: bool = false, }; @@ -235,7 +234,7 @@ pub const Address = extern union { }; errdefer s.stream.close(); - if (options.reuse_address or options.reuse_port) { + if (options.reuse_address) { try posix.setsockopt( sockfd, posix.SOL.SOCKET, @@ -869,7 +868,7 @@ pub fn getAddressList(gpa: Allocator, name: []const u8, port: u16) GetAddressLis const name_c = try gpa.dupeZ(u8, name); defer gpa.free(name_c); - const port_c = try std.fmt.allocPrintSentinel(gpa, "{}", .{port}, 0); + const port_c = try std.fmt.allocPrintSentinel(gpa, "{d}", .{port}, 0); defer gpa.free(port_c); const ws2_32 = windows.ws2_32; @@ -1080,7 +1079,7 @@ fn linuxLookupName( } } else { try canon.resize(gpa, 0); - try addrs.ensureUnusedCapacity(gpa, 1); + try addrs.ensureUnusedCapacity(gpa, 2); linuxLookupNameFromNull(addrs, family, flags, port); } if (addrs.items.len == 0) return error.UnknownHostName; @@ -1355,7 +1354,7 @@ fn parseHosts( const line = br.takeDelimiterExclusive('\n') catch |err| switch (err) { error.StreamTooLong => { // Skip lines that are too long. - br.discardDelimiterInclusive('\n') catch |e| switch (e) { + _ = br.discardDelimiterInclusive('\n') catch |e| switch (e) { error.EndOfStream => break, error.ReadFailed => return error.ReadFailed, }; @@ -1398,6 +1397,25 @@ fn parseHosts( } } +test parseHosts { + if (builtin.os.tag == .wasi) { + // TODO parsing addresses should not have OS dependencies + return error.SkipZigTest; + } + var reader: std.io.Reader = .fixed( + \\127.0.0.1 localhost + \\::1 localhost + \\127.0.0.2 abcd + ); + var addrs: ArrayList(LookupAddr) = .empty; + defer addrs.deinit(std.testing.allocator); + var canon: ArrayList(u8) = .empty; + defer canon.deinit(std.testing.allocator); + try parseHosts(std.testing.allocator, &addrs, &canon, "abcd", posix.AF.UNSPEC, 1234, &reader); + try std.testing.expectEqual(1, addrs.items.len); + try std.testing.expectFmt("127.0.0.2:1234", "{f}", .{addrs.items[0].addr}); +} + pub fn isValidHostName(hostname: []const u8) bool { if (hostname.len >= 254) return false; if (!std.unicode.utf8ValidateSlice(hostname)) return false; @@ -1562,9 +1580,12 @@ const ResolvConf = struct { }; } - fn parse(rc: *ResolvConf, br: *io.Reader) !void { + const Directive = enum { options, nameserver, domain, search }; + const Option = enum { ndots, attempts, timeout }; + + fn parse(rc: *ResolvConf, reader: *io.Reader) !void { const gpa = rc.gpa; - while (br.takeSentinel('\n')) |line_with_comment| { + while (reader.takeSentinel('\n')) |line_with_comment| { const line = line: { var split = mem.splitScalar(u8, line_with_comment, '#'); break :line split.first(); @@ -1572,8 +1593,8 @@ const ResolvConf = struct { var line_it = mem.tokenizeAny(u8, line, " \t"); const token = line_it.next() orelse continue; - if (mem.eql(u8, token, "options")) { - while (line_it.next()) |sub_tok| { + switch (std.meta.stringToEnum(Directive, token) orelse continue) { + .options => while (line_it.next()) |sub_tok| { var colon_it = mem.splitScalar(u8, sub_tok, ':'); const name = colon_it.first(); const value_txt = colon_it.next() orelse continue; @@ -1581,22 +1602,25 @@ const ResolvConf = struct { error.Overflow => 255, error.InvalidCharacter => continue, }; - if (mem.eql(u8, name, "ndots")) { - rc.ndots = @min(value, 15); - } else if (mem.eql(u8, name, "attempts")) { - rc.attempts = @min(value, 10); - } else if (mem.eql(u8, name, "timeout")) { - rc.timeout = @min(value, 60); + switch (std.meta.stringToEnum(Option, name) orelse continue) { + .ndots => rc.ndots = @min(value, 15), + .attempts => rc.attempts = @min(value, 10), + .timeout => rc.timeout = @min(value, 60), } - } - } else if (mem.eql(u8, token, "nameserver")) { - const ip_txt = line_it.next() orelse continue; - try linuxLookupNameFromNumericUnspec(gpa, &rc.ns, ip_txt, 53); - } else if (mem.eql(u8, token, "domain") or mem.eql(u8, token, "search")) { - rc.search.items.len = 0; - try rc.search.appendSlice(gpa, line_it.rest()); + }, + .nameserver => { + const ip_txt = line_it.next() orelse continue; + try linuxLookupNameFromNumericUnspec(gpa, &rc.ns, ip_txt, 53); + }, + .domain, .search => { + rc.search.items.len = 0; + try rc.search.appendSlice(gpa, line_it.rest()); + }, } - } else |err| return err; + } else |err| switch (err) { + error.EndOfStream => if (reader.bufferedLen() != 0) return error.EndOfStream, + else => |e| return e, + } if (rc.ns.items.len == 0) { return linuxLookupNameFromNumericUnspec(gpa, &rc.ns, "127.0.0.1", 53); @@ -1849,9 +1873,15 @@ pub const Stream = struct { } } - const ReadError = posix.ReadError; + pub const ReadError = posix.ReadError || error{ + SocketNotBound, + MessageTooBig, + NetworkSubsystemFailed, + ConnectionResetByPeer, + SocketNotConnected, + }; - const WriteError = posix.SendMsgError || error{ + pub const WriteError = posix.SendMsgError || error{ ConnectionResetByPeer, SocketNotBound, MessageTooBig, @@ -1863,11 +1893,12 @@ pub const Stream = struct { pub const Reader = switch (native_os) { .windows => struct { - /// Use `interface` to access portably. + /// Use `interface` for portable code. interface_state: io.Reader, - /// Use `getStream` to access portably. + /// Use `getStream` for portable code. net_stream: Stream, - err: ?Error = null, + /// Use `getError` for portable code. + error_state: ?Error, pub const Error = ReadError; @@ -1875,6 +1906,10 @@ pub const Stream = struct { return r.stream; } + pub fn getError(r: *const Reader) ?Error { + return r.error_state; + } + pub fn interface(r: *Reader) *io.Reader { return &r.interface_state; } @@ -1882,22 +1917,33 @@ pub const Stream = struct { pub fn init(net_stream: Stream, buffer: []u8) Reader { return .{ .interface_state = .{ - .context = undefined, .vtable = &.{ .stream = stream }, .buffer = buffer, + .seek = 0, + .end = 0, }, .net_stream = net_stream, + .error_state = null, }; } fn stream(io_r: *io.Reader, io_w: *io.Writer, limit: io.Limit) io.Reader.StreamError!usize { - const r: *Reader = @fieldParentPtr("interface", io_r); - var iovecs: [max_buffers_len]windows.WSABUF = undefined; - const bufs = io_w.writableVectorWsa(&iovecs, limit); - assert(bufs[0].len > 0); + const r: *Reader = @alignCast(@fieldParentPtr("interface_state", io_r)); + var iovecs: [max_buffers_len]windows.ws2_32.WSABUF = undefined; + const bufs = try io_w.writableVectorWsa(&iovecs, limit); + assert(bufs[0].len != 0); + const n = streamBufs(r, bufs) catch |err| { + r.error_state = err; + return error.ReadFailed; + }; + if (n == 0) return error.EndOfStream; + return n; + } + + fn streamBufs(r: *Reader, bufs: []windows.ws2_32.WSABUF) Error!u32 { var n: u32 = undefined; var flags: u32 = 0; - const rc = windows.ws2_32.WSARecvFrom(r.net_stream.handle, bufs.ptr, bufs.len, &n, &flags, null, null, null, null); + const rc = windows.ws2_32.WSARecvFrom(r.net_stream.handle, bufs.ptr, @intCast(bufs.len), &n, &flags, null, null, null, null); if (rc != 0) switch (windows.ws2_32.WSAGetLastError()) { .WSAECONNRESET => return error.ConnectionResetByPeer, .WSAEFAULT => unreachable, // a pointer is not completely contained in user address space. @@ -1913,11 +1959,11 @@ pub const Stream = struct { .WSA_OPERATION_ABORTED => unreachable, // not using overlapped I/O else => |err| return windows.unexpectedWSAError(err), }; - if (n == 0) return error.EndOfStream; return n; } }, else => struct { + /// Use `getStream`, `interface`, and `getError` for portable code. file_reader: File.Reader, pub const Error = ReadError; @@ -1940,6 +1986,10 @@ pub const Stream = struct { pub fn getStream(r: *const Reader) Stream { return .{ .handle = r.file_reader.file.handle }; } + + pub fn getError(r: *const Reader) ?Error { + return r.file_reader.err; + } }, }; @@ -1949,6 +1999,8 @@ pub const Stream = struct { interface: io.Writer, /// Use `getStream` for cross-platform support. stream: Stream, + /// This field is present on all systems. + err: ?Error = null, pub const Error = WriteError; @@ -1966,43 +2018,39 @@ pub const Stream = struct { return w.stream; } + fn addWsaBuf(v: []windows.ws2_32.WSABUF, i: *u32, bytes: []const u8) void { + const cap = std.math.maxInt(u32); + var remaining = bytes; + while (remaining.len > cap) { + if (v.len - i.* == 0) return; + v[i.*] = .{ .buf = @constCast(remaining.ptr), .len = cap }; + i.* += 1; + remaining = remaining[cap..]; + } else { + @branchHint(.likely); + if (v.len - i.* == 0) return; + v[i.*] = .{ .buf = @constCast(remaining.ptr), .len = @intCast(remaining.len) }; + i.* += 1; + } + } + fn drain(io_w: *io.Writer, data: []const []const u8, splat: usize) io.Writer.Error!usize { - const w: *Writer = @fieldParentPtr("interface", io_w); + const w: *Writer = @alignCast(@fieldParentPtr("interface", io_w)); const buffered = io_w.buffered(); comptime assert(native_os == .windows); - var iovecs: [max_buffers_len]windows.WSABUF = undefined; + var iovecs: [max_buffers_len]windows.ws2_32.WSABUF = undefined; var len: u32 = 0; - if (buffered.len != 0) { - iovecs[len] = .{ - .buf = buffered.ptr, - .len = buffered.len, - }; - len += 1; - } - for (data) |bytes| { - if (bytes.len == 0) continue; - iovecs[len] = .{ - .buf = bytes.ptr, - .len = bytes.len, - }; - len += 1; - if (iovecs.len - len == 0) break; - } - if (len == 0) return 0; + addWsaBuf(&iovecs, &len, buffered); + for (data[0 .. data.len - 1]) |bytes| addWsaBuf(&iovecs, &len, bytes); const pattern = data[data.len - 1]; - switch (splat) { - 0 => if (iovecs[len - 1].buf == data[data.len - 1].ptr) { - len -= 1; - }, - 1 => {}, + if (iovecs.len - len != 0) switch (splat) { + 0 => {}, + 1 => addWsaBuf(&iovecs, &len, pattern), else => switch (pattern.len) { 0 => {}, - 1 => memset: { - // Replace the 1-byte buffer with a bigger one. - if (iovecs[len - 1].buf == data[data.len - 1].ptr) len -= 1; - if (iovecs.len - len == 0) break :memset; + 1 => { const splat_buffer_candidate = io_w.buffer[io_w.end..]; - var backup_buffer: [32]u8 = undefined; + var backup_buffer: [64]u8 = undefined; const splat_buffer = if (splat_buffer_candidate.len >= backup_buffer.len) splat_buffer_candidate else @@ -2010,31 +2058,29 @@ pub const Stream = struct { const memset_len = @min(splat_buffer.len, splat); const buf = splat_buffer[0..memset_len]; @memset(buf, pattern[0]); - iovecs[len] = .{ .buf = buf.ptr, .len = buf.len }; - len += 1; + addWsaBuf(&iovecs, &len, buf); var remaining_splat = splat - buf.len; while (remaining_splat > splat_buffer.len and len < iovecs.len) { - iovecs[len] = .{ .buf = splat_buffer.ptr, .len = splat_buffer.len }; + addWsaBuf(&iovecs, &len, splat_buffer); remaining_splat -= splat_buffer.len; - len += 1; - } - if (remaining_splat > 0 and iovecs.len - len != 0) { - iovecs[len] = .{ .buf = splat_buffer.ptr, .len = remaining_splat }; - len += 1; } + addWsaBuf(&iovecs, &len, splat_buffer[0..remaining_splat]); }, - else => for (0..splat - 1) |_| { - if (iovecs.len - len == 0) break; - iovecs[len] = .{ - .buf = pattern.ptr, - .len = pattern.len, - }; - len += 1; + else => for (0..@min(splat, iovecs.len - len)) |_| { + addWsaBuf(&iovecs, &len, pattern); }, }, - } + }; + const n = sendBufs(w.stream.handle, iovecs[0..len]) catch |err| { + w.err = err; + return error.WriteFailed; + }; + return io_w.consume(n); + } + + fn sendBufs(handle: Stream.Handle, bufs: []windows.ws2_32.WSABUF) Error!u32 { var n: u32 = undefined; - const rc = windows.ws2_32.WSASend(w.stream.handle, &iovecs, len, &n, 0, null, null); + const rc = windows.ws2_32.WSASend(handle, bufs.ptr, @intCast(bufs.len), &n, 0, null, null); if (rc == windows.ws2_32.SOCKET_ERROR) switch (windows.ws2_32.WSAGetLastError()) { .WSAECONNABORTED => return error.ConnectionResetByPeer, .WSAECONNRESET => return error.ConnectionResetByPeer, @@ -2055,7 +2101,7 @@ pub const Stream = struct { .WSA_OPERATION_ABORTED => unreachable, // not using overlapped I/O else => |err| return windows.unexpectedWSAError(err), }; - return io_w.consume(n); + return n; } }, else => struct { @@ -2084,95 +2130,68 @@ pub const Stream = struct { return .{ .handle = w.file_writer.file.handle }; } + fn addBuf(v: []posix.iovec_const, i: *@FieldType(posix.msghdr_const, "iovlen"), bytes: []const u8) void { + // OS checks ptr addr before length so zero length vectors must be omitted. + if (bytes.len == 0) return; + if (v.len - i.* == 0) return; + v[i.*] = .{ .base = bytes.ptr, .len = bytes.len }; + i.* += 1; + } + fn drain(io_w: *io.Writer, data: []const []const u8, splat: usize) io.Writer.Error!usize { - const w: *Writer = @fieldParentPtr("interface", io_w); + const w: *Writer = @alignCast(@fieldParentPtr("interface", io_w)); const buffered = io_w.buffered(); - var iovecs: [max_buffers_len]std.posix.iovec_const = undefined; - var msg: posix.msghdr_const = msg: { - var i: usize = 0; - if (buffered.len != 0) { - iovecs[i] = .{ - .base = buffered.ptr, - .len = buffered.len, - }; - i += 1; - } - for (data) |bytes| { - // OS checks ptr addr before length so zero length vectors must be omitted. - if (bytes.len == 0) continue; - iovecs[i] = .{ - .base = bytes.ptr, - .len = bytes.len, - }; - i += 1; - if (iovecs.len - i == 0) break; - } - break :msg .{ - .name = null, - .namelen = 0, - .iov = &iovecs, - .iovlen = i, - .control = null, - .controllen = 0, - .flags = 0, - }; + var iovecs: [max_buffers_len]posix.iovec_const = undefined; + var msg: posix.msghdr_const = .{ + .name = null, + .namelen = 0, + .iov = &iovecs, + .iovlen = 0, + .control = null, + .controllen = 0, + .flags = 0, }; - if (msg.iovlen == 0) return 0; + addBuf(&iovecs, &msg.iovlen, buffered); + for (data[0 .. data.len - 1]) |bytes| addBuf(&iovecs, &msg.iovlen, bytes); const pattern = data[data.len - 1]; - switch (splat) { - 0 => if (iovecs[msg.iovlen - 1].base == data[data.len - 1].ptr) { - msg.iovlen -= 1; - }, - 1 => {}, + if (iovecs.len - msg.iovlen != 0) switch (splat) { + 0 => {}, + 1 => addBuf(&iovecs, &msg.iovlen, pattern), else => switch (pattern.len) { 0 => {}, - 1 => memset: { - // Replace the 1-byte buffer with a bigger one. - if (iovecs[msg.iovlen - 1].base == data[data.len - 1].ptr) msg.iovlen -= 1; - if (iovecs.len - msg.iovlen == 0) break :memset; + 1 => { const splat_buffer_candidate = io_w.buffer[io_w.end..]; - var backup_buffer: [32]u8 = undefined; + var backup_buffer: [64]u8 = undefined; const splat_buffer = if (splat_buffer_candidate.len >= backup_buffer.len) splat_buffer_candidate else &backup_buffer; - if (splat_buffer.len == 0) break :memset; const memset_len = @min(splat_buffer.len, splat); const buf = splat_buffer[0..memset_len]; @memset(buf, pattern[0]); - iovecs[msg.iovlen] = .{ .base = buf.ptr, .len = buf.len }; - msg.iovlen += 1; + addBuf(&iovecs, &msg.iovlen, buf); var remaining_splat = splat - buf.len; while (remaining_splat > splat_buffer.len and iovecs.len - msg.iovlen != 0) { assert(buf.len == splat_buffer.len); - iovecs[msg.iovlen] = .{ .base = splat_buffer.ptr, .len = splat_buffer.len }; - msg.iovlen += 1; + addBuf(&iovecs, &msg.iovlen, splat_buffer); remaining_splat -= splat_buffer.len; } - if (remaining_splat > 0 and iovecs.len - msg.iovlen != 0) { - iovecs[msg.iovlen] = .{ .base = splat_buffer.ptr, .len = remaining_splat }; - msg.iovlen += 1; - } + addBuf(&iovecs, &msg.iovlen, splat_buffer[0..remaining_splat]); }, - else => for (0..splat - 1) |_| { - if (iovecs.len - msg.iovlen == 0) break; - iovecs[msg.iovlen] = .{ - .base = pattern.ptr, - .len = pattern.len, - }; - msg.iovlen += 1; + else => for (0..@min(splat, iovecs.len - msg.iovlen)) |_| { + addBuf(&iovecs, &msg.iovlen, pattern); }, }, - } + }; const flags = posix.MSG.NOSIGNAL; - return io_w.consume(std.posix.sendmsg(w.file_writer.file.handle, &msg, flags) catch |err| { + return io_w.consume(posix.sendmsg(w.file_writer.file.handle, &msg, flags) catch |err| { w.err = err; return error.WriteFailed; }); } fn sendFile(io_w: *io.Writer, file_reader: *File.Reader, limit: io.Limit) io.Writer.FileError!usize { - const w: *Writer = @fieldParentPtr("interface", io_w); + const w: *Writer = @alignCast(@fieldParentPtr("interface", io_w)); const n = try w.file_writer.interface.sendFileHeader(io_w.buffered(), file_reader, limit); return io_w.consume(n); } @@ -2188,7 +2207,6 @@ pub const Stream = struct { } const max_buffers_len = 8; - const splat_buffer_len = 256; }; pub const Server = struct { diff --git a/lib/std/net/test.zig b/lib/std/net/test.zig index 02c927d566..a7e6b465cb 100644 --- a/lib/std/net/test.zig +++ b/lib/std/net/test.zig @@ -208,7 +208,8 @@ test "listen on a port, send bytes, receive bytes" { const socket = try net.tcpConnectToAddress(server_address); defer socket.close(); - _ = try socket.writer().writeAll("Hello world!"); + var stream_writer = socket.writer(&.{}); + try stream_writer.interface.writeAll("Hello world!"); } }; @@ -218,7 +219,8 @@ test "listen on a port, send bytes, receive bytes" { var client = try server.accept(); defer client.stream.close(); var buf: [16]u8 = undefined; - const n = try client.stream.reader().read(&buf); + var stream_reader = client.stream.reader(&.{}); + const n = try stream_reader.interface().readSliceShort(&buf); try testing.expectEqual(@as(usize, 12), n); try testing.expectEqualSlices(u8, "Hello world!", buf[0..n]); @@ -232,10 +234,10 @@ test "listen on an in use port" { const localhost = try net.Address.parseIp("127.0.0.1", 0); - var server1 = try localhost.listen(.{ .reuse_port = true }); + var server1 = try localhost.listen(.{ .reuse_address = true }); defer server1.deinit(); - var server2 = try server1.listen_address.listen(.{ .reuse_port = true }); + var server2 = try server1.listen_address.listen(.{ .reuse_address = true }); defer server2.deinit(); } @@ -299,7 +301,8 @@ test "listen on a unix socket, send bytes, receive bytes" { const socket = try net.connectUnixSocket(path); defer socket.close(); - _ = try socket.writer().writeAll("Hello world!"); + var stream_writer = socket.writer(&.{}); + try stream_writer.interface.writeAll("Hello world!"); } }; @@ -309,13 +312,14 @@ test "listen on a unix socket, send bytes, receive bytes" { var client = try server.accept(); defer client.stream.close(); var buf: [16]u8 = undefined; - const n = try client.stream.reader().read(&buf); + var stream_reader = client.stream.reader(&.{}); + const n = try stream_reader.interface().readSliceShort(&buf); try testing.expectEqual(@as(usize, 12), n); try testing.expectEqualSlices(u8, "Hello world!", buf[0..n]); } -test "listen on a unix socket with reuse_port option" { +test "listen on a unix socket with reuse_address option" { if (!net.has_unix_sockets) return error.SkipZigTest; // Windows doesn't implement reuse port option. if (builtin.os.tag == .windows) return error.SkipZigTest; @@ -326,7 +330,7 @@ test "listen on a unix socket with reuse_port option" { const socket_addr = try net.Address.initUnix(socket_path); defer std.fs.cwd().deleteFile(socket_path) catch {}; - var server = try socket_addr.listen(.{ .reuse_port = true }); + var server = try socket_addr.listen(.{ .reuse_address = true }); server.deinit(); } diff --git a/lib/std/os/uefi.zig b/lib/std/os/uefi.zig index 6526f590fa..53aa884d4a 100644 --- a/lib/std/os/uefi.zig +++ b/lib/std/os/uefi.zig @@ -24,9 +24,51 @@ pub var handle: Handle = undefined; /// A pointer to the EFI System Table that is passed to the EFI image's entry point. pub var system_table: *tables.SystemTable = undefined; +/// UEFI's memory interfaces exclusively act on 4096-byte pages. +pub const Page = [4096]u8; + /// A handle to an event structure. pub const Event = *opaque {}; +pub const EventRegistration = *const opaque {}; + +pub const EventType = packed struct(u32) { + lo_context: u8 = 0, + /// If an event of this type is not already in the signaled state, then + /// the event’s NotificationFunction will be queued at the event’s NotifyTpl + /// whenever the event is being waited on via EFI_BOOT_SERVICES.WaitForEvent() + /// or EFI_BOOT_SERVICES.CheckEvent() . + wait: bool = false, + /// The event’s NotifyFunction is queued whenever the event is signaled. + signal: bool = false, + hi_context: u20 = 0, + /// The event is allocated from runtime memory. If an event is to be signaled + /// after the call to EFI_BOOT_SERVICES.ExitBootServices() the event’s data + /// structure and notification function need to be allocated from runtime + /// memory. + runtime: bool = false, + timer: bool = false, + + /// This event should not be combined with any other event types. This event + /// type is functionally equivalent to the EFI_EVENT_GROUP_EXIT_BOOT_SERVICES + /// event group. + pub const signal_exit_boot_services: EventType = .{ + .signal = true, + .lo_context = 1, + }; + + /// The event is to be notified by the system when SetVirtualAddressMap() + /// is performed. This event type is a composite of EVT_NOTIFY_SIGNAL, + /// EVT_RUNTIME, and EVT_RUNTIME_CONTEXT and should not be combined with + /// any other event types. + pub const signal_virtual_address_change: EventType = .{ + .runtime = true, + .hi_context = 0x20000, + .signal = true, + .lo_context = 2, + }; +}; + /// The calling convention used for all external functions part of the UEFI API. pub const cc: std.builtin.CallingConvention = switch (@import("builtin").target.cpu.arch) { .x86_64 => .{ .x86_64_win = .{} }, @@ -52,7 +94,11 @@ pub const IpAddress = extern union { /// GUIDs are align(8) unless otherwise specified. pub const Guid = extern struct { - time_low: u32, + comptime { + std.debug.assert(std.mem.Alignment.of(Guid) == .@"8"); + } + + time_low: u32 align(8), time_mid: u16, time_high_and_version: u16, clock_seq_high_and_reserved: u8, @@ -60,7 +106,7 @@ pub const Guid = extern struct { node: [6]u8, /// Format GUID into hexadecimal lowercase xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format - pub fn format(self: @This(), writer: *std.io.Writer) std.io.Writer.Error!void { + pub fn format(self: Guid, writer: *std.io.Writer) std.io.Writer.Error!void { const time_low = @byteSwap(self.time_low); const time_mid = @byteSwap(self.time_mid); const time_high_and_version = @byteSwap(self.time_high_and_version); @@ -75,7 +121,7 @@ pub const Guid = extern struct { }); } - pub fn eql(a: std.os.uefi.Guid, b: std.os.uefi.Guid) bool { + pub fn eql(a: Guid, b: Guid) bool { return a.time_low == b.time_low and a.time_mid == b.time_mid and a.time_high_and_version == b.time_high_and_version and diff --git a/lib/std/os/uefi/pool_allocator.zig b/lib/std/os/uefi/pool_allocator.zig index 0508ad0312..5acdcf6af4 100644 --- a/lib/std/os/uefi/pool_allocator.zig +++ b/lib/std/os/uefi/pool_allocator.zig @@ -28,14 +28,16 @@ const UefiPoolAllocator = struct { const full_len = metadata_len + len; - var unaligned_ptr: [*]align(8) u8 = undefined; - if (uefi.system_table.boot_services.?.allocatePool(uefi.efi_pool_memory_type, full_len, &unaligned_ptr) != .success) return null; + const unaligned_slice = uefi.system_table.boot_services.?.allocatePool( + uefi.efi_pool_memory_type, + full_len, + ) catch return null; - const unaligned_addr = @intFromPtr(unaligned_ptr); + const unaligned_addr = @intFromPtr(unaligned_slice.ptr); const aligned_addr = mem.alignForward(usize, unaligned_addr + @sizeOf(usize), ptr_align); - const aligned_ptr = unaligned_ptr + (aligned_addr - unaligned_addr); - getHeader(aligned_ptr).* = unaligned_ptr; + const aligned_ptr = unaligned_slice.ptr + (aligned_addr - unaligned_addr); + getHeader(aligned_ptr).* = unaligned_slice.ptr; return aligned_ptr; } @@ -76,7 +78,7 @@ const UefiPoolAllocator = struct { ) void { _ = alignment; _ = ret_addr; - _ = uefi.system_table.boot_services.?.freePool(getHeader(buf.ptr).*); + uefi.system_table.boot_services.?.freePool(getHeader(buf.ptr).*) catch unreachable; } }; @@ -117,10 +119,12 @@ fn uefi_alloc( std.debug.assert(@intFromEnum(alignment) <= 3); - var ptr: [*]align(8) u8 = undefined; - if (uefi.system_table.boot_services.?.allocatePool(uefi.efi_pool_memory_type, len, &ptr) != .success) return null; + const slice = uefi.system_table.boot_services.?.allocatePool( + uefi.efi_pool_memory_type, + len, + ) catch return null; - return ptr; + return slice.ptr; } fn uefi_resize( @@ -161,5 +165,5 @@ fn uefi_free( ) void { _ = alignment; _ = ret_addr; - _ = uefi.system_table.boot_services.?.freePool(@alignCast(buf.ptr)); + uefi.system_table.boot_services.?.freePool(@alignCast(buf.ptr)) catch unreachable; } diff --git a/lib/std/os/uefi/tables.zig b/lib/std/os/uefi/tables.zig index 0e0a1e0aa8..f8541dc321 100644 --- a/lib/std/os/uefi/tables.zig +++ b/lib/std/os/uefi/tables.zig @@ -1,3 +1,12 @@ +const std = @import("std"); +const uefi = std.os.uefi; +const Handle = uefi.Handle; +const Event = uefi.Event; +const Guid = uefi.Guid; +const cc = uefi.cc; +const math = std.math; +const assert = std.debug.assert; + pub const BootServices = @import("tables/boot_services.zig").BootServices; pub const RuntimeServices = @import("tables/runtime_services.zig").RuntimeServices; pub const ConfigurationTable = @import("tables/configuration_table.zig").ConfigurationTable; @@ -7,29 +16,90 @@ pub const TableHeader = @import("tables/table_header.zig").TableHeader; pub const EventNotify = *const fn (event: Event, ctx: *anyopaque) callconv(cc) void; pub const TimerDelay = enum(u32) { - timer_cancel, - timer_periodic, - timer_relative, + cancel, + periodic, + relative, }; pub const MemoryType = enum(u32) { + pub const Oem = math.IntFittingRange( + 0, + @intFromEnum(MemoryType.oem_end) - @intFromEnum(MemoryType.oem_start), + ); + pub const Vendor = math.IntFittingRange( + 0, + @intFromEnum(MemoryType.vendor_end) - @intFromEnum(MemoryType.vendor_start), + ); + + /// can only be allocated using .allocate_any_pages mode unless you are explicitly targeting an interface that states otherwise reserved_memory_type, loader_code, loader_data, boot_services_code, boot_services_data, + /// can only be allocated using .allocate_any_pages mode unless you are explicitly targeting an interface that states otherwise runtime_services_code, + /// can only be allocated using .allocate_any_pages mode unless you are explicitly targeting an interface that states otherwise runtime_services_data, conventional_memory, unusable_memory, + /// can only be allocated using .allocate_any_pages mode unless you are explicitly targeting an interface that states otherwise acpi_reclaim_memory, + /// can only be allocated using .allocate_any_pages mode unless you are explicitly targeting an interface that states otherwise acpi_memory_nvs, memory_mapped_io, memory_mapped_io_port_space, pal_code, persistent_memory, + unaccepted_memory, max_memory_type, + invalid_start, + invalid_end = 0x6FFFFFFF, + /// MemoryType values in the range 0x70000000..0x7FFFFFFF are reserved for OEM use. + oem_start = 0x70000000, + oem_end = 0x7FFFFFFF, + /// MemoryType values in the range 0x80000000..0xFFFFFFFF are reserved for use by UEFI + /// OS loaders that are provided by operating system vendors. + vendor_start = 0x80000000, + vendor_end = 0xFFFFFFFF, _, + + pub fn fromOem(value: Oem) MemoryType { + const oem_start = @intFromEnum(MemoryType.oem_start); + return @enumFromInt(oem_start + value); + } + + pub fn toOem(memtype: MemoryType) ?Oem { + const as_int = @intFromEnum(memtype); + const oem_start = @intFromEnum(MemoryType.oem_start); + if (as_int < oem_start) return null; + if (as_int > @intFromEnum(MemoryType.oem_end)) return null; + return @truncate(as_int - oem_start); + } + + pub fn fromVendor(value: Vendor) MemoryType { + const vendor_start = @intFromEnum(MemoryType.vendor_start); + return @enumFromInt(vendor_start + value); + } + + pub fn toVendor(memtype: MemoryType) ?Vendor { + const as_int = @intFromEnum(memtype); + const vendor_start = @intFromEnum(MemoryType.vendor_start); + if (as_int < @intFromEnum(MemoryType.vendor_end)) return null; + if (as_int > @intFromEnum(MemoryType.vendor_end)) return null; + return @truncate(as_int - vendor_start); + } + + pub fn format(self: MemoryType, w: *std.io.Writer) std.io.WriteError!void { + if (self.toOem()) |oemval| + try w.print("OEM({X})", .{oemval}) + else if (self.toVendor()) |vendorval| + try w.print("Vendor({X})", .{vendorval}) + else if (std.enums.tagName(MemoryType, self)) |name| + try w.print("{s}", .{name}) + else + try w.print("INVALID({X})", .{@intFromEnum(self)}); + } }; pub const MemoryDescriptorAttribute = packed struct(u64) { @@ -51,6 +121,8 @@ pub const MemoryDescriptorAttribute = packed struct(u64) { memory_runtime: bool, }; +pub const MemoryMapKey = enum(usize) { _ }; + pub const MemoryDescriptor = extern struct { type: MemoryType, physical_start: u64, @@ -59,20 +131,121 @@ pub const MemoryDescriptor = extern struct { attribute: MemoryDescriptorAttribute, }; +pub const MemoryMapInfo = struct { + key: MemoryMapKey, + descriptor_size: usize, + descriptor_version: u32, + /// The number of descriptors in the map. + len: usize, +}; + +pub const MemoryMapSlice = struct { + info: MemoryMapInfo, + ptr: [*]align(@alignOf(MemoryDescriptor)) u8, + + pub fn iterator(self: MemoryMapSlice) MemoryDescriptorIterator { + return .{ .ctx = self }; + } + + pub fn get(self: MemoryMapSlice, index: usize) ?*MemoryDescriptor { + if (index >= self.info.len) return null; + return self.getUnchecked(index); + } + + pub fn getUnchecked(self: MemoryMapSlice, index: usize) *MemoryDescriptor { + const offset: usize = index * self.info.descriptor_size; + return @alignCast(@ptrCast(self.ptr[offset..])); + } +}; + +pub const MemoryDescriptorIterator = struct { + ctx: MemoryMapSlice, + index: usize = 0, + + pub fn next(self: *MemoryDescriptorIterator) ?*MemoryDescriptor { + const md = self.ctx.get(self.index) orelse return null; + self.index += 1; + return md; + } +}; + pub const LocateSearchType = enum(u32) { all_handles, by_register_notify, by_protocol, }; -pub const OpenProtocolAttributes = packed struct(u32) { - by_handle_protocol: bool = false, - get_protocol: bool = false, - test_protocol: bool = false, - by_child_controller: bool = false, - by_driver: bool = false, - exclusive: bool = false, - reserved: u26 = 0, +pub const LocateSearch = union(LocateSearchType) { + all_handles, + by_register_notify: uefi.EventRegistration, + by_protocol: *const Guid, +}; + +pub const OpenProtocolAttributes = enum(u32) { + pub const Bits = packed struct(u32) { + by_handle_protocol: bool = false, + get_protocol: bool = false, + test_protocol: bool = false, + by_child_controller: bool = false, + by_driver: bool = false, + exclusive: bool = false, + reserved: u26 = 0, + }; + + by_handle_protocol = @bitCast(Bits{ .by_handle_protocol = true }), + get_protocol = @bitCast(Bits{ .get_protocol = true }), + test_protocol = @bitCast(Bits{ .test_protocol = true }), + by_child_controller = @bitCast(Bits{ .by_child_controller = true }), + by_driver = @bitCast(Bits{ .by_driver = true }), + by_driver_exclusive = @bitCast(Bits{ .by_driver = true, .exclusive = true }), + exclusive = @bitCast(Bits{ .exclusive = true }), + _, + + pub fn fromBits(bits: Bits) OpenProtocolAttributes { + return @bitCast(bits); + } + + pub fn toBits(self: OpenProtocolAttributes) Bits { + return @bitCast(self); + } +}; + +pub const OpenProtocolArgs = union(OpenProtocolAttributes) { + /// Used in the implementation of `handleProtocol`. + by_handle_protocol: struct { agent: ?Handle = null, controller: ?Handle = null }, + /// Used by a driver to get a protocol interface from a handle. Care must be + /// taken when using this open mode because the driver that opens a protocol + /// interface in this manner will not be informed if the protocol interface + /// is uninstalled or reinstalled. The caller is also not required to close + /// the protocol interface with `closeProtocol`. + get_protocol: struct { agent: ?Handle = null, controller: ?Handle = null }, + /// Used by a driver to test for the existence of a protocol interface on a + /// handle. The caller only use the return status code. The caller is also + /// not required to close the protocol interface with `closeProtocol`. + test_protocol: struct { agent: ?Handle = null, controller: ?Handle = null }, + /// Used by bus drivers to show that a protocol interface is being used by one + /// of the child controllers of a bus. This information is used by + /// `BootServices.connectController` to recursively connect all child controllers + /// and by `BootServices.disconnectController` to get the list of child + /// controllers that a bus driver created. + by_child_controller: struct { agent: Handle, controller: Handle }, + /// Used by a driver to gain access to a protocol interface. When this mode + /// is used, the driver’s Stop() function will be called by + /// `BootServices.disconnectController` if the protocol interface is reinstalled + /// or uninstalled. Once a protocol interface is opened by a driver with this + /// attribute, no other drivers will be allowed to open the same protocol interface + /// with the `.by_driver` attribute. + by_driver: struct { agent: Handle, controller: Handle }, + /// Used by a driver to gain exclusive access to a protocol interface. If any + /// other drivers have the protocol interface opened with an attribute of + /// `.by_driver`, then an attempt will be made to remove them with + /// `BootServices.disconnectController`. + by_driver_exclusive: struct { agent: Handle, controller: Handle }, + /// Used by applications to gain exclusive access to a protocol interface. If + /// any drivers have the protocol interface opened with an attribute of + /// `.by_driver`, then an attempt will be made to remove them by calling the + /// driver’s Stop() function. + exclusive: struct { agent: Handle, controller: ?Handle = null }, }; pub const ProtocolInformationEntry = extern struct { @@ -83,19 +256,25 @@ pub const ProtocolInformationEntry = extern struct { }; pub const InterfaceType = enum(u32) { - efi_native_interface, + native, +}; + +pub const AllocateLocation = union(AllocateType) { + any, + max_address: [*]align(4096) uefi.Page, + address: [*]align(4096) uefi.Page, }; pub const AllocateType = enum(u32) { - allocate_any_pages, - allocate_max_address, - allocate_address, + any, + max_address, + address, }; pub const PhysicalAddress = u64; pub const CapsuleHeader = extern struct { - capsule_guid: Guid align(8), + capsule_guid: Guid, header_size: u32, flags: u32, capsule_image_size: u32, @@ -110,13 +289,13 @@ pub const UefiCapsuleBlockDescriptor = extern struct { }; pub const ResetType = enum(u32) { - reset_cold, - reset_warm, - reset_shutdown, - reset_platform_specific, + cold, + warm, + shutdown, + platform_specific, }; -pub const global_variable align(8) = Guid{ +pub const global_variable = Guid{ .time_low = 0x8be4df61, .time_mid = 0x93ca, .time_high_and_version = 0x11d2, @@ -128,10 +307,3 @@ pub const global_variable align(8) = Guid{ test { std.testing.refAllDeclsRecursive(@This()); } - -const std = @import("std"); -const uefi = std.os.uefi; -const Handle = uefi.Handle; -const Event = uefi.Event; -const Guid = uefi.Guid; -const cc = uefi.cc; diff --git a/lib/std/os/uefi/tables/boot_services.zig b/lib/std/os/uefi/tables/boot_services.zig index c889ce3ffe..f2a8b73b83 100644 --- a/lib/std/os/uefi/tables/boot_services.zig +++ b/lib/std/os/uefi/tables/boot_services.zig @@ -1,21 +1,31 @@ const std = @import("std"); const uefi = std.os.uefi; const Event = uefi.Event; +const EventRegistration = uefi.EventRegistration; const Guid = uefi.Guid; const Handle = uefi.Handle; +const Page = uefi.Page; +const Pages = uefi.Pages; const Status = uefi.Status; const TableHeader = uefi.tables.TableHeader; const DevicePathProtocol = uefi.protocol.DevicePath; +const AllocateLocation = uefi.tables.AllocateLocation; const AllocateType = uefi.tables.AllocateType; const MemoryType = uefi.tables.MemoryType; const MemoryDescriptor = uefi.tables.MemoryDescriptor; +const MemoryMapKey = uefi.tables.MemoryMapKey; +const MemoryMapInfo = uefi.tables.MemoryMapInfo; +const MemoryMapSlice = uefi.tables.MemoryMapSlice; const TimerDelay = uefi.tables.TimerDelay; const InterfaceType = uefi.tables.InterfaceType; +const LocateSearch = uefi.tables.LocateSearch; const LocateSearchType = uefi.tables.LocateSearchType; +const OpenProtocolArgs = uefi.tables.OpenProtocolArgs; const OpenProtocolAttributes = uefi.tables.OpenProtocolAttributes; const ProtocolInformationEntry = uefi.tables.ProtocolInformationEntry; const EventNotify = uefi.tables.EventNotify; const cc = uefi.cc; +const Error = Status.Error; /// Boot services are services provided by the system's firmware until the operating system takes /// over control over the hardware by calling exitBootServices. @@ -32,173 +42,1236 @@ pub const BootServices = extern struct { hdr: TableHeader, /// Raises a task's priority level and returns its previous level. - raiseTpl: *const fn (new_tpl: usize) callconv(cc) usize, + raiseTpl: *const fn (new_tpl: TaskPriorityLevel) callconv(cc) TaskPriorityLevel, /// Restores a task's priority level to its previous value. - restoreTpl: *const fn (old_tpl: usize) callconv(cc) void, + restoreTpl: *const fn (old_tpl: TaskPriorityLevel) callconv(cc) void, /// Allocates memory pages from the system. - allocatePages: *const fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) u8) callconv(cc) Status, + _allocatePages: *const fn (alloc_type: AllocateType, mem_type: MemoryType, pages: usize, memory: *[*]align(4096) Page) callconv(cc) Status, /// Frees memory pages. - freePages: *const fn (memory: [*]align(4096) u8, pages: usize) callconv(cc) Status, + _freePages: *const fn (memory: [*]align(4096) Page, pages: usize) callconv(cc) Status, /// Returns the current memory map. - getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]MemoryDescriptor, map_key: *usize, descriptor_size: *usize, descriptor_version: *u32) callconv(cc) Status, + _getMemoryMap: *const fn (mmap_size: *usize, mmap: ?[*]align(@alignOf(MemoryDescriptor)) u8, map_key: *MemoryMapKey, descriptor_size: *usize, descriptor_version: *u32) callconv(cc) Status, /// Allocates pool memory. - allocatePool: *const fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(cc) Status, + _allocatePool: *const fn (pool_type: MemoryType, size: usize, buffer: *[*]align(8) u8) callconv(cc) Status, /// Returns pool memory to the system. - freePool: *const fn (buffer: [*]align(8) u8) callconv(cc) Status, + _freePool: *const fn (buffer: [*]align(8) u8) callconv(cc) Status, /// Creates an event. - createEvent: *const fn (type: u32, notify_tpl: usize, notify_func: ?*const fn (Event, ?*anyopaque) callconv(cc) void, notify_ctx: ?*const anyopaque, event: *Event) callconv(cc) Status, + _createEvent: *const fn (type: u32, notify_tpl: TaskPriorityLevel, notify_func: ?*const fn (Event, ?*anyopaque) callconv(cc) void, notify_ctx: ?*anyopaque, event: *Event) callconv(cc) Status, /// Sets the type of timer and the trigger time for a timer event. - setTimer: *const fn (event: Event, type: TimerDelay, trigger_time: u64) callconv(cc) Status, + _setTimer: *const fn (event: Event, type: TimerDelay, trigger_time: u64) callconv(cc) Status, /// Stops execution until an event is signaled. - waitForEvent: *const fn (event_len: usize, events: [*]const Event, index: *usize) callconv(cc) Status, + _waitForEvent: *const fn (event_len: usize, events: [*]const Event, index: *usize) callconv(cc) Status, /// Signals an event. - signalEvent: *const fn (event: Event) callconv(cc) Status, + _signalEvent: *const fn (event: Event) callconv(cc) Status, /// Closes an event. - closeEvent: *const fn (event: Event) callconv(cc) Status, + _closeEvent: *const fn (event: Event) callconv(cc) Status, /// Checks whether an event is in the signaled state. - checkEvent: *const fn (event: Event) callconv(cc) Status, + _checkEvent: *const fn (event: Event) callconv(cc) Status, /// Installs a protocol interface on a device handle. If the handle does not exist, it is created /// and added to the list of handles in the system. installMultipleProtocolInterfaces() /// performs more error checking than installProtocolInterface(), so its use is recommended over this. - installProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface_type: InterfaceType, interface: *anyopaque) callconv(cc) Status, + _installProtocolInterface: *const fn (handle: Handle, protocol: *const Guid, interface_type: InterfaceType, interface: *anyopaque) callconv(cc) Status, /// Reinstalls a protocol interface on a device handle - reinstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(cc) Status, + _reinstallProtocolInterface: *const fn (handle: Handle, protocol: *const Guid, old_interface: *anyopaque, new_interface: *anyopaque) callconv(cc) Status, /// Removes a protocol interface from a device handle. Usage of /// uninstallMultipleProtocolInterfaces is recommended over this. - uninstallProtocolInterface: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *anyopaque) callconv(cc) Status, + _uninstallProtocolInterface: *const fn (handle: Handle, protocol: *const Guid, interface: *anyopaque) callconv(cc) Status, /// Queries a handle to determine if it supports a specified protocol. - handleProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque) callconv(cc) Status, + _handleProtocol: *const fn (handle: Handle, protocol: *const Guid, interface: *?*anyopaque) callconv(cc) Status, - reserved: *anyopaque, + _reserved: *anyopaque, /// Creates an event that is to be signaled whenever an interface is installed for a specified protocol. - registerProtocolNotify: *const fn (protocol: *align(8) const Guid, event: Event, registration: **anyopaque) callconv(cc) Status, + _registerProtocolNotify: *const fn (protocol: *const Guid, event: Event, registration: *EventRegistration) callconv(cc) Status, /// Returns an array of handles that support a specified protocol. - locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, buffer_size: *usize, buffer: [*]Handle) callconv(cc) Status, + _locateHandle: *const fn (search_type: LocateSearchType, protocol: ?*const Guid, search_key: ?*const anyopaque, buffer_size: *usize, buffer: ?[*]Handle) callconv(cc) Status, /// Locates the handle to a device on the device path that supports the specified protocol - locateDevicePath: *const fn (protocols: *align(8) const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(cc) Status, + _locateDevicePath: *const fn (protocols: *const Guid, device_path: **const DevicePathProtocol, device: *?Handle) callconv(cc) Status, /// Adds, updates, or removes a configuration table entry from the EFI System Table. - installConfigurationTable: *const fn (guid: *align(8) const Guid, table: ?*anyopaque) callconv(cc) Status, + _installConfigurationTable: *const fn (guid: *const Guid, table: ?*anyopaque) callconv(cc) Status, /// Loads an EFI image into memory. - loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, image_handle: *?Handle) callconv(cc) Status, + _loadImage: *const fn (boot_policy: bool, parent_image_handle: Handle, device_path: ?*const DevicePathProtocol, source_buffer: ?[*]const u8, source_size: usize, image_handle: *Handle) callconv(cc) Status, /// Transfers control to a loaded image's entry point. - startImage: *const fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(cc) Status, + _startImage: *const fn (image_handle: Handle, exit_data_size: ?*usize, exit_data: ?*[*]u16) callconv(cc) Status, /// Terminates a loaded EFI image and returns control to boot services. - exit: *const fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?*const anyopaque) callconv(cc) Status, + _exit: *const fn (image_handle: Handle, exit_status: Status, exit_data_size: usize, exit_data: ?[*]align(2) const u8) callconv(cc) Status, /// Unloads an image. - unloadImage: *const fn (image_handle: Handle) callconv(cc) Status, + _unloadImage: *const fn (image_handle: Handle) callconv(cc) Status, /// Terminates all boot services. - exitBootServices: *const fn (image_handle: Handle, map_key: usize) callconv(cc) Status, + _exitBootServices: *const fn (image_handle: Handle, map_key: MemoryMapKey) callconv(cc) Status, /// Returns a monotonically increasing count for the platform. - getNextMonotonicCount: *const fn (count: *u64) callconv(cc) Status, + _getNextMonotonicCount: *const fn (count: *u64) callconv(cc) Status, /// Induces a fine-grained stall. - stall: *const fn (microseconds: usize) callconv(cc) Status, + _stall: *const fn (microseconds: usize) callconv(cc) Status, /// Sets the system's watchdog timer. - setWatchdogTimer: *const fn (timeout: usize, watchdog_code: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(cc) Status, + _setWatchdogTimer: *const fn (timeout: usize, watchdog_code: u64, data_size: usize, watchdog_data: ?[*]const u16) callconv(cc) Status, /// Connects one or more drives to a controller. - connectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, remaining_device_path: ?*DevicePathProtocol, recursive: bool) callconv(cc) Status, + _connectController: *const fn (controller_handle: Handle, driver_image_handle: ?[*:null]?Handle, remaining_device_path: ?*const DevicePathProtocol, recursive: bool) callconv(cc) Status, // Disconnects one or more drivers from a controller - disconnectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(cc) Status, + _disconnectController: *const fn (controller_handle: Handle, driver_image_handle: ?Handle, child_handle: ?Handle) callconv(cc) Status, /// Queries a handle to determine if it supports a specified protocol. - openProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, interface: *?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(cc) Status, + _openProtocol: *const fn (handle: Handle, protocol: *const Guid, interface: ?*?*anyopaque, agent_handle: ?Handle, controller_handle: ?Handle, attributes: OpenProtocolAttributes) callconv(cc) Status, /// Closes a protocol on a handle that was opened using openProtocol(). - closeProtocol: *const fn (handle: Handle, protocol: *align(8) const Guid, agent_handle: Handle, controller_handle: ?Handle) callconv(cc) Status, + _closeProtocol: *const fn (handle: Handle, protocol: *const Guid, agent_handle: Handle, controller_handle: ?Handle) callconv(cc) Status, /// Retrieves the list of agents that currently have a protocol interface opened. - openProtocolInformation: *const fn (handle: Handle, protocol: *align(8) const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(cc) Status, + _openProtocolInformation: *const fn (handle: Handle, protocol: *const Guid, entry_buffer: *[*]ProtocolInformationEntry, entry_count: *usize) callconv(cc) Status, /// Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated from pool. - protocolsPerHandle: *const fn (handle: Handle, protocol_buffer: *[*]*align(8) const Guid, protocol_buffer_count: *usize) callconv(cc) Status, + _protocolsPerHandle: *const fn (handle: Handle, protocol_buffer: *[*]*const Guid, protocol_buffer_count: *usize) callconv(cc) Status, /// Returns an array of handles that support the requested protocol in a buffer allocated from pool. - locateHandleBuffer: *const fn (search_type: LocateSearchType, protocol: ?*align(8) const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(cc) Status, + _locateHandleBuffer: *const fn (search_type: LocateSearchType, protocol: ?*const Guid, search_key: ?*const anyopaque, num_handles: *usize, buffer: *[*]Handle) callconv(cc) Status, /// Returns the first protocol instance that matches the given protocol. - locateProtocol: *const fn (protocol: *align(8) const Guid, registration: ?*const anyopaque, interface: *?*anyopaque) callconv(cc) Status, + _locateProtocol: *const fn (protocol: *const Guid, registration: ?EventRegistration, interface: *?*const anyopaque) callconv(cc) Status, /// Installs one or more protocol interfaces into the boot services environment // TODO: use callconv(cc) instead once that works - installMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.c) Status, + _installMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.c) Status, /// Removes one or more protocol interfaces into the boot services environment // TODO: use callconv(cc) instead once that works - uninstallMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.c) Status, + _uninstallMultipleProtocolInterfaces: *const fn (handle: *Handle, ...) callconv(.c) Status, /// Computes and returns a 32-bit CRC for a data buffer. - calculateCrc32: *const fn (data: [*]const u8, data_size: usize, *u32) callconv(cc) Status, + _calculateCrc32: *const fn (data: [*]const u8, data_size: usize, *u32) callconv(cc) Status, /// Copies the contents of one buffer to another buffer - copyMem: *const fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(cc) void, + _copyMem: *const fn (dest: [*]u8, src: [*]const u8, len: usize) callconv(cc) void, /// Fills a buffer with a specified value - setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(cc) void, + _setMem: *const fn (buffer: [*]u8, size: usize, value: u8) callconv(cc) void, /// Creates an event in a group. - createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EventNotify, notify_ctx: *const anyopaque, event_group: *align(8) const Guid, event: *Event) callconv(cc) Status, + _createEventEx: *const fn (type: u32, notify_tpl: usize, notify_func: EventNotify, notify_ctx: *const anyopaque, event_group: *const Guid, event: *Event) callconv(cc) Status, + + pub const AllocatePagesError = uefi.UnexpectedError || error{ + OutOfResources, + InvalidParameter, + NotFound, + }; + + pub const FreePagesError = uefi.UnexpectedError || error{ + NotFound, + InvalidParameter, + }; + + pub const GetMemoryMapError = uefi.UnexpectedError || error{ + InvalidParameter, + BufferTooSmall, + }; + + pub const AllocatePoolError = uefi.UnexpectedError || error{ + OutOfResources, + InvalidParameter, + }; + + pub const FreePoolError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const CreateEventError = uefi.UnexpectedError || error{ + InvalidParameter, + OutOfResources, + }; + + pub const SetTimerError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const WaitForEventError = uefi.UnexpectedError || error{ + InvalidParameter, + Unsupported, + }; + + pub const CheckEventError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const ReinstallProtocolInterfaceError = uefi.UnexpectedError || error{ + NotFound, + AccessDenied, + InvalidParameter, + }; + + pub const HandleProtocolError = uefi.UnexpectedError || error{ + Unsupported, + }; + + pub const RegisterProtocolNotifyError = uefi.UnexpectedError || error{ + OutOfResources, + InvalidParameter, + }; + + pub const NumHandlesError = uefi.UnexpectedError || error{ + OutOfResources, + }; + + pub const LocateHandleError = uefi.UnexpectedError || error{ + BufferTooSmall, + InvalidParameter, + }; + + pub const LocateDevicePathError = uefi.UnexpectedError || error{ + NotFound, + InvalidParameter, + }; + + pub const InstallConfigurationTableError = uefi.UnexpectedError || error{ + InvalidParameter, + OutOfResources, + }; + + pub const UninstallConfigurationTableError = InstallConfigurationTableError || error{ + NotFound, + }; + + pub const LoadImageError = uefi.UnexpectedError || error{ + NotFound, + InvalidParameter, + Unsupported, + OutOfResources, + LoadError, + DeviceError, + AccessDenied, + SecurityViolation, + }; + + pub const StartImageError = uefi.UnexpectedError || error{ + InvalidParameter, + SecurityViolation, + }; + + pub const ExitError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const ExitBootServicesError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const GetNextMonotonicCountError = uefi.UnexpectedError || error{ + DeviceError, + InvalidParameter, + }; + + pub const SetWatchdogTimerError = uefi.UnexpectedError || error{ + InvalidParameter, + Unsupported, + DeviceError, + }; + + pub const ConnectControllerError = uefi.UnexpectedError || error{ + InvalidParameter, + NotFound, + SecurityViolation, + }; + + pub const DisconnectControllerError = uefi.UnexpectedError || error{ + InvalidParameter, + OutOfResources, + DeviceError, + }; + + pub const OpenProtocolError = uefi.UnexpectedError || error{ + InvalidParameter, + Unsupported, + AccessDenied, + AlreadyStarted, + }; + + pub const CloseProtocolError = uefi.UnexpectedError || error{ + InvalidParameter, + NotFound, + }; + + pub const OpenProtocolInformationError = uefi.UnexpectedError || error{ + OutOfResources, + }; + + pub const ProtocolsPerHandleError = uefi.UnexpectedError || error{ + InvalidParameter, + OutOfResources, + }; + + pub const LocateHandleBufferError = uefi.UnexpectedError || error{ + InvalidParameter, + OutOfResources, + }; + + pub const LocateProtocolError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const InstallProtocolInterfacesError = uefi.UnexpectedError || error{ + AlreadyStarted, + OutOfResources, + InvalidParameter, + }; + + pub const UninstallProtocolInterfacesError = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + pub const CalculateCrc32Error = uefi.UnexpectedError || error{ + InvalidParameter, + }; + + /// Allocates pages of memory. + /// + /// This function scans the memory map to locate free pages. When it finds a + /// physically contiguous block of pages that is large enough and also satisfies + /// the allocation requirements of `alloc_type`, it changes the memory map to + /// indicate that the pages are now of type `mem_type`. + /// + /// In general, UEFI OS loaders and UEFI applications should allocate memory + /// (and pool) of type `.loader_data`. UEFI boot service drivers must allocate + /// memory (and pool) of type `.boot_services_data`. UREFI runtime drivers + /// should allocate memory (and pool) of type `.runtime_services_data` + /// (although such allocation can only be made during boot services time). + /// + /// Allocation requests of `.allocate_any_pages` allocate any available range + /// of pages that satisfies the request. + /// + /// Allocation requests of `.allocate_max_address` allocate any available range + /// of pages whose uppermost address is less than or equal to the address + /// pointed to by the input. + /// + /// Allocation requests of `.allocate_address` allocate pages at the address + /// pointed to by the input. + pub fn allocatePages( + self: *BootServices, + location: AllocateLocation, + mem_type: MemoryType, + pages: usize, + ) AllocatePagesError![]align(4096) Page { + var ptr: [*]align(4096) Page = switch (location) { + .any => undefined, + .address, .max_address => |ptr| ptr, + }; + + switch (self._allocatePages( + std.meta.activeTag(location), + mem_type, + pages, + &ptr, + )) { + .success => return ptr[0..pages], + .out_of_resources => return error.OutOfResources, + .invalid_parameter => return error.InvalidParameter, + .not_found => return error.NotFound, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn freePages(self: *BootServices, pages: []align(4096) Page) FreePagesError!void { + switch (self._freePages(pages.ptr, pages.len)) { + .success => {}, + .not_found => return error.NotFound, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn getMemoryMapInfo(self: *const BootServices) uefi.UnexpectedError!MemoryMapInfo { + var info: MemoryMapInfo = undefined; + info.len = 0; + + switch (self._getMemoryMap( + &info.len, + null, + &info.key, + &info.descriptor_size, + &info.descriptor_version, + )) { + .success, .buffer_too_small => { + info.len = @divExact(info.len, info.descriptor_size); + return info; + }, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn getMemoryMap( + self: *const BootServices, + buffer: []align(@alignOf(MemoryDescriptor)) u8, + ) GetMemoryMapError!MemoryMapSlice { + var info: MemoryMapInfo = undefined; + info.len = buffer.len; + + switch (self._getMemoryMap( + &info.len, + buffer.ptr, + &info.key, + &info.descriptor_size, + &info.descriptor_version, + )) { + .success => { + info.len = @divExact(info.len, info.descriptor_size); + return .{ .info = info, .ptr = buffer.ptr }; + }, + .buffer_too_small => return error.BufferTooSmall, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Allocates a memory region of `size` bytes from memory of type `pool_type` + /// and returns the allocated memory. Allocates pages from `.conventional_memory` + /// as needed to grow the requested pool type. + pub fn allocatePool( + self: *BootServices, + pool_type: MemoryType, + size: usize, + ) AllocatePoolError![]align(8) u8 { + var ptr: [*]align(8) u8 = undefined; + + switch (self._allocatePool(pool_type, size, &ptr)) { + .success => return ptr[0..size], + .out_of_resources => return error.OutOfResources, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn freePool(self: *BootServices, ptr: [*]align(8) u8) FreePoolError!void { + switch (self._freePool(ptr)) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn createEvent( + self: *BootServices, + event_type: uefi.EventType, + notify_opts: NotifyOpts, + ) CreateEventError!Event { + var evt: Event = undefined; + + switch (self._createEvent( + @bitCast(event_type), + notify_opts.tpl, + notify_opts.function, + notify_opts.context, + &evt, + )) { + .success => return evt, + .invalid_parameter => return error.InvalidParameter, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Cancels any previous time trigger setting for the event, and sets a new + /// trigger timer for the event. + /// + /// Returns `error.InvalidParameter` if the event is not a timer event. + pub fn setTimer( + self: *BootServices, + event: Event, + @"type": TimerDelay, + trigger_time: u64, + ) SetTimerError!void { + switch (self._setTimer(event, @"type", trigger_time)) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Returns the event that was signaled, along with its index in the slice. + pub fn waitForEvent( + self: *BootServices, + events: []const Event, + ) WaitForEventError!struct { *const Event, usize } { + var idx: usize = undefined; + switch (self._waitForEvent(events.len, events.ptr, &idx)) { + .success => return .{ &events[idx], idx }, + .invalid_parameter => return error.InvalidParameter, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// If `event` is `EventType.signal`, then the event’s notification function + /// is scheduled to be invoked at the event’s notification task priority level. + /// This function may be invoked from any task priority level. + /// + /// If the supplied Event is a part of an event group, then all of the events + /// in the event group are also signaled and their notification functions are + /// scheduled. + /// + /// When signaling an event group, it is possible to create an event in the + /// group, signal it and then close the event to remove it from the group. + pub fn signalEvent(self: *BootServices, event: Event) uefi.UnexpectedError!void { + switch (self._signalEvent(event)) { + .success => {}, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn closeEvent(self: *BootServices, event: Event) uefi.UnexpectedError!void { + switch (self._closeEvent(event)) { + .success => {}, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Checks to see whether an event is signaled. + /// + /// The underlying function is equivalent to this pseudo-code: + /// ``` + /// if (event.type.signal) + /// return error.InvalidParameter; + /// + /// if (event.signaled) { + /// event.signaled = false; + /// return true; + /// } + /// + /// const notify = event.notification_function orelse return false; + /// notify(); + /// + /// if (event.signaled) { + /// event.signaled = false; + /// return true; + /// } + /// + /// return false; + /// ``` + pub fn checkEvent(self: *BootServices, event: Event) CheckEventError!bool { + switch (self._checkEvent(event)) { + .success => return true, + .not_ready => return false, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// See `installProtocolInterfaces`. + /// + /// Does not call `self._installProtocolInterface`, because + /// `self._installMultipleProtocolInterfaces` performs more error checks. + pub fn installProtocolInterface( + self: *BootServices, + handle: ?Handle, + interface: anytype, + ) InstallProtocolInterfacesError!Handle { + return self.installProtocolInterfaces(handle, .{ + interface, + }); + } + + /// Reinstalls a protocol interface on a device handle. + /// + /// `new` may be the same as `old`. If it is, the registered protocol notifications + /// occur for the handle without replacing the interface on the handle. + /// + /// Any process that has registered to wait for the installation of the interface + /// is notified. + /// + /// The caller is responsible for ensuring that there are no references to `old` + /// if it is being removed. + pub fn reinstallProtocolInterface( + self: *BootServices, + handle: Handle, + Protocol: type, + old: ?*const Protocol, + new: ?*const Protocol, + ) ReinstallProtocolInterfaceError!void { + if (!@hasDecl(Protocol, "guid")) + @compileError("protocol is missing guid"); + + switch (self._reinstallProtocolInterface( + handle, + &Protocol.guid, + old, + new, + )) { + .success => {}, + .not_found => return error.NotFound, + .access_denied => return error.AccessDenied, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// See `uninstallProtocolInterfaces`. + /// + /// Does not call `self._uninstallProtocolInterface`, because + /// `self._uninstallMultipleProtocolInterfaces` performs more error checks. + pub fn uninstallProtocolInterface( + self: *BootServices, + handle: Handle, + interface: anytype, + ) UninstallProtocolInterfacesError!void { + return self.uninstallProtocolInterfaces(handle, .{ + interface, + }); + } + + /// Returns a pointer to the `Protocol` interface if it's supported by the + /// handle. + /// + /// Note that UEFI implementations are no longer required to implement this + /// function, so it's implemented using `openProtocol` instead. + pub fn handleProtocol( + self: *BootServices, + Protocol: type, + handle: Handle, + ) HandleProtocolError!?*Protocol { + // per https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html#efi-boot-services-handleprotocol + // handleProtocol is basically `openProtocol` where: + // 1. agent_handle is `uefi.handle` (aka handle passed to `EfiMain`) + // 2. controller_handle is `null` + // 3. attributes is `EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL` + + return self.openProtocol( + Protocol, + handle, + .{ .by_handle_protocol = .{ .agent = uefi.handle } }, + ) catch |err| switch (err) { + error.AlreadyStarted => return uefi.unexpectedStatus(.already_started), + error.AccessDenied => return uefi.unexpectedStatus(.access_denied), + error.InvalidParameter => return uefi.unexpectedStatus(.invalid_parameter), + else => return @errorCast(err), + }; + } + + pub fn registerProtocolNotify( + self: *BootServices, + Protocol: type, + event: Event, + ) RegisterProtocolNotifyError!EventRegistration { + if (!@hasDecl(Protocol, "guid")) + @compileError("Protocol is missing guid"); + + var registration: EventRegistration = undefined; + switch (self._registerProtocolNotify( + &Protocol.guid, + event, + ®istration, + )) { + .success => return registration, + .out_of_resources => return error.OutOfResources, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Returns the number of handles that match the given search criteria. + pub fn locateHandleLen(self: *const BootServices, search: LocateSearch) NumHandlesError!usize { + var len: usize = 0; + switch (self._locateHandle( + std.meta.activeTag(search), + if (search == .by_protocol) search.by_protocol else null, + if (search == .by_register_notify) search.by_register_notify else null, + &len, + null, + )) { + .success => return @divExact(len, @sizeOf(Handle)), + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// To determine the necessary size of `buffer`, call `locateHandleLen` first. + pub fn locateHandle( + self: *BootServices, + search: LocateSearch, + buffer: []Handle, + ) LocateHandleError![]Handle { + var len: usize = @sizeOf(Handle) * buffer.len; + switch (self._locateHandle( + std.meta.activeTag(search), + if (search == .by_protocol) search.by_protocol else null, + if (search == .by_register_notify) search.by_register_notify else null, + &len, + buffer.ptr, + )) { + .success => return buffer[0..@divExact(len, @sizeOf(Handle))], + .not_found => return buffer[0..0], + .buffer_too_small => return error.BufferTooSmall, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Locates all devices on `device_path` that support `Protocol`. Once the closest + /// match to `device_path` is found, it returns the unmatched device path and handle. + pub fn locateDevicePath( + self: *const BootServices, + device_path: *const DevicePathProtocol, + Protocol: type, + ) LocateHandleError!?struct { *const DevicePathProtocol, Handle } { + if (!@hasDecl(Protocol, "guid")) + @compileError("Protocol is missing guid"); + + var dev_path = device_path; + var device: ?Handle = undefined; + switch (self._locateDevicePath( + &Protocol.guid, + &dev_path, + &device, + )) { + .success => return .{ dev_path, device.? }, + .not_found => return null, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn installConfigurationTable( + self: *BootServices, + guid: *const Guid, + table: *anyopaque, + ) InstallConfigurationTableError!void { + switch (self._installConfigurationTable( + guid, + table, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn uninstallConfigurationTable( + self: *BootServices, + guid: *const Guid, + ) UninstallConfigurationTableError!void { + switch (self._installConfigurationTable( + guid, + null, + )) { + .success => {}, + .not_found => return error.NotFound, + .invalid_parameter => return error.InvalidParameter, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub const LoadImageSource = union(enum) { + buffer: []const u8, + device_path: *const DevicePathProtocol, + }; + + pub fn loadImage( + self: *BootServices, + boot_policy: bool, + parent_image: Handle, + source: LoadImageSource, + ) LoadImageError!Handle { + var handle: Handle = undefined; + + switch (self._loadImage( + boot_policy, + parent_image, + if (source == .device_path) source.device_path else null, + if (source == .buffer) source.buffer.ptr else null, + if (source == .buffer) source.buffer.len else 0, + &handle, + )) { + .success => return handle, + .not_found => return error.NotFound, + .invalid_parameter => return error.InvalidParameter, + .unsupported => return error.Unsupported, + .out_of_resources => return error.OutOfResources, + .load_error => return error.LoadError, + .device_error => return error.DeviceError, + .access_denied => return error.AccessDenied, + .security_violation => return error.SecurityViolation, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn startImage(self: *BootServices, image: Handle) StartImageError!ImageExitData { + var exit_data_size: usize = undefined; + var exit_data: [*]u16 = undefined; + + const exit_code = switch (self._startImage( + image, + &exit_data_size, + &exit_data, + )) { + .invalid_parameter => return error.InvalidParameter, + .security_violation => return error.SecurityViolation, + else => |exit_code| exit_code, + }; + + if (exit_data_size == 0) return .{ + .code = exit_code, + .description = null, + .data = null, + }; + + const description_ptr: [*:0]const u16 = @ptrCast(exit_data); + const description = std.mem.sliceTo(description_ptr, 0); + + return ImageExitData{ + .code = exit_code, + .description = description, + .data = exit_data[description.len + 1 .. exit_data_size], + }; + } + + /// `message` must be allocated using `allocatePool`. + pub fn exit( + self: *BootServices, + handle: Handle, + status: Status, + message: ?[:0]const u16, + ) ExitError!void { + switch (self._exit( + handle, + status, + if (message) |msg| (2 * msg.len) + 1 else 0, + if (message) |msg| @ptrCast(msg.ptr) else null, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + else => |exit_status| return uefi.unexpectedStatus(exit_status), + } + } + + /// `message` should be a null-terminated u16 string followed by binary data + /// allocated using `allocatePool`. + pub fn exitWithData( + self: *BootServices, + handle: Handle, + status: Status, + data: []align(2) const u8, + ) ExitError!void { + switch (self._exit(handle, status, data.len, data.ptr)) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + else => |exit_status| return uefi.unexpectedStatus(exit_status), + } + } + + /// The result is the exit code of the unload handler. Any error codes are + /// `try/catch`-able, leaving only success and warning codes as the result. + pub fn unloadImage( + self: *BootServices, + image: Handle, + ) Status.Error!Status { + const status = self._unloadImage(image); + try status.err(); + return status; + } + + pub fn exitBootServices( + self: *BootServices, + image: Handle, + map_key: MemoryMapKey, + ) ExitBootServicesError!void { + switch (self._exitBootServices(image, map_key)) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn getNextMonotonicCount( + self: *const BootServices, + count: *u64, + ) GetNextMonotonicCountError!void { + switch (self._getNextMonotonicCount(count)) { + .success => {}, + .device_error => return error.DeviceError, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn stall(self: *const BootServices, microseconds: usize) uefi.UnexpectedError!void { + switch (self._stall(microseconds)) { + .success => {}, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn setWatchdogTimer( + self: *BootServices, + timeout: usize, + watchdog_code: u64, + data: ?[]const u16, + ) SetWatchdogTimerError!void { + switch (self._setWatchdogTimer( + timeout, + watchdog_code, + if (data) |d| d.len else 0, + if (data) |d| d.ptr else null, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .unsupported => return error.Unsupported, + .device_error => return error.DeviceError, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// `driver_image` should be a null-terminated ordered list of handles. + pub fn connectController( + self: *BootServices, + controller: Handle, + driver_image: ?[*:null]?Handle, + remaining_device_path: ?*const DevicePathProtocol, + recursive: bool, + ) ConnectControllerError!void { + switch (self._connectController( + controller, + driver_image, + remaining_device_path, + recursive, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .not_found => return error.NotFound, + .security_violation => return error.SecurityViolation, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn disconnectController( + self: *BootServices, + controller: Handle, + driver_image: ?Handle, + child: ?Handle, + ) DisconnectControllerError!void { + switch (self._disconnectController( + controller, + driver_image, + child, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .out_of_resources => return error.OutOfResources, + .device_error => return error.DeviceError, + else => |status| return uefi.unexpectedStatus(status), + } + } /// Opens a protocol with a structure as the loaded image for a UEFI application - pub fn openProtocolSt(self: *BootServices, comptime protocol: type, handle: Handle) !*protocol { - if (!@hasDecl(protocol, "guid")) - @compileError("Protocol is missing guid!"); + /// + /// If `flag` is `.test_protocol`, then the only valid return value is `null`, + /// and `Status.unsupported` is returned. Otherwise, if `_openProtocol` returns + /// `Status.unsupported`, then `null` is returned. + pub fn openProtocol( + self: *BootServices, + Protocol: type, + handle: Handle, + attributes: OpenProtocolArgs, + ) OpenProtocolError!?*Protocol { + if (!@hasDecl(Protocol, "guid")) + @compileError("Protocol is missing guid: " ++ @typeName(Protocol)); - var ptr: ?*protocol = undefined; + const agent_handle: ?Handle, const controller_handle: ?Handle = switch (attributes) { + inline else => |arg| .{ arg.agent, arg.controller }, + }; - try self.openProtocol( + var ptr: ?*Protocol = undefined; + + switch (self._openProtocol( handle, - &protocol.guid, + &Protocol.guid, @as(*?*anyopaque, @ptrCast(&ptr)), - // Invoking handle (loaded image) - uefi.handle, - // Control handle (null as not a driver) - null, - uefi.tables.OpenProtocolAttributes{ .by_handle_protocol = true }, - ).err(); + agent_handle, + controller_handle, + std.meta.activeTag(attributes), + )) { + .success => return if (attributes == .test_protocol) null else ptr, + .unsupported => return if (attributes == .test_protocol) error.Unsupported else null, + .access_denied => return error.AccessDenied, + .already_started => return error.AlreadyStarted, + else => |status| return uefi.unexpectedStatus(status), + } + } - return ptr.?; + pub fn closeProtocol( + self: *BootServices, + handle: Handle, + Protocol: type, + agent: Handle, + controller: ?Handle, + ) CloseProtocolError!void { + if (!@hasDecl(Protocol, "guid")) + @compileError("protocol is missing guid: " ++ @typeName(Protocol)); + + switch (self._closeProtocol( + handle, + &Protocol.guid, + agent, + controller, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .not_found => return error.NotFound, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn openProtocolInformation( + self: *const BootServices, + handle: Handle, + Protocol: type, + ) OpenProtocolInformationError!?[]ProtocolInformationEntry { + var entries: [*]ProtocolInformationEntry = undefined; + var len: usize = undefined; + + switch (self._openProtocolInformation( + handle, + &Protocol.guid, + &entries, + &len, + )) { + .success => return entries[0..len], + .not_found => return null, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn protocolsPerHandle( + self: *const BootServices, + handle: Handle, + ) ProtocolsPerHandleError![]*const Guid { + var guids: [*]*const Guid = undefined; + var len: usize = undefined; + + switch (self._protocolsPerHandle( + handle, + &guids, + &len, + )) { + .success => return guids[0..len], + .invalid_parameter => return error.InvalidParameter, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn locateHandleBuffer( + self: *const BootServices, + search: LocateSearch, + ) LocateHandleBufferError!?[]Handle { + var handles: [*]Handle = undefined; + var len: usize = undefined; + + switch (self._locateHandleBuffer( + std.meta.activeTag(search), + if (search == .by_protocol) search.by_protocol else null, + if (search == .by_register_notify) search.by_register_notify else null, + &len, + &handles, + )) { + .success => return handles[0..len], + .invalid_parameter => return error.InvalidParameter, + .not_found => return null, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn locateProtocol( + self: *const BootServices, + Protocol: type, + registration: ?EventRegistration, + ) LocateProtocolError!?*Protocol { + var interface: *Protocol = undefined; + + switch (self._locateProtocol( + &Protocol.guid, + registration, + @ptrCast(&interface), + )) { + .success => return interface, + .not_found => return null, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Installs a set of protocol interfaces into the boot services environment. + /// + /// This function's final argument should be a tuple of pointers to protocol + /// interfaces. For example: + /// + /// ``` + /// const handle = try boot_services.installProtocolInterfaces(null, .{ + /// &my_interface_1, + /// &my_interface_2, + /// }); + /// ``` + /// + /// The underlying function accepts a vararg list of pairs of Guid pointers + /// and opaque pointers to the interface. To provide a guid, the interface + /// types should declare a `guid` constant like so: + /// + /// ``` + /// pub const guid: uefi.Guid = .{ ... }; + /// ``` + /// + /// See `std.os.uefi.protocol` for examples of protocol type definitions. + pub fn installProtocolInterfaces( + self: *BootServices, + handle: ?Handle, + interfaces: anytype, + ) InstallProtocolInterfacesError!Handle { + var hdl: ?Handle = handle; + const args_tuple = protocolInterfaces(&hdl, interfaces); + + switch (@call( + .auto, + self._installMultipleProtocolInterfaces, + args_tuple, + )) { + .success => return hdl.?, + .already_started => return error.AlreadyStarted, + .out_of_resources => return error.OutOfResources, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn uninstallProtocolInterfaces( + self: *BootServices, + handle: Handle, + interfaces: anytype, + ) UninstallProtocolInterfacesError!void { + const args_tuple = protocolInterfaces(handle, interfaces); + + switch (@call( + .auto, + self._uninstallMultipleProtocolInterfaces, + args_tuple, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn calculateCrc32( + self: *const BootServices, + data: []const u8, + ) CalculateCrc32Error!u32 { + var value: u32 = undefined; + switch (self._calculateCrc32(data.ptr, data.len, &value)) { + .success => return value, + .invalid_parameter => return error.InvalidParameter, + else => |status| return uefi.unexpectedStatus(status), + } } pub const signature: u64 = 0x56524553544f4f42; - pub const event_timer: u32 = 0x80000000; - pub const event_runtime: u32 = 0x40000000; - pub const event_notify_wait: u32 = 0x00000100; - pub const event_notify_signal: u32 = 0x00000200; - pub const event_signal_exit_boot_services: u32 = 0x00000201; - pub const event_signal_virtual_address_change: u32 = 0x00000202; + pub const NotifyOpts = struct { + tpl: TaskPriorityLevel = .application, + function: ?*const fn (Event, ?*anyopaque) callconv(cc) void = null, + context: ?*anyopaque = null, + }; - pub const tpl_application: usize = 4; - pub const tpl_callback: usize = 8; - pub const tpl_notify: usize = 16; - pub const tpl_high_level: usize = 31; + pub const TaskPriorityLevel = enum(usize) { + application = 4, + callback = 8, + notify = 16, + high_level = 31, + _, + }; + + pub const ImageExitData = struct { + code: Status, + description: ?[:0]const u16, + data: ?[]const u16, + }; }; + +fn protocolInterfaces( + handle_arg: anytype, + interfaces: anytype, +) ProtocolInterfaces(@TypeOf(handle_arg), @TypeOf(interfaces)) { + var result: ProtocolInterfaces( + @TypeOf(handle_arg), + @TypeOf(interfaces), + ) = undefined; + result[0] = handle_arg; + + var idx: usize = 1; + inline for (interfaces) |interface| { + const InterfacePtr = @TypeOf(interface); + const Interface = switch (@typeInfo(InterfacePtr)) { + .pointer => |pointer| pointer.child, + else => @compileError("expected tuple of '*const Protocol', got " ++ @typeName(InterfacePtr)), + }; + + if (!@hasDecl(Interface, "guid")) + @compileError("protocol interface '" ++ @typeName(Interface) ++ + "' does not declare a 'const guid: uefi.Guid'."); + + switch (@typeInfo(Interface)) { + .@"struct" => |struct_info| if (struct_info.layout != .@"extern") + @compileLog("protocol interface '" ++ @typeName(Interface) ++ + "' is not extern - this is likely a mistake"), + else => @compileError("protocol interface must be a struct, got " ++ @typeName(Interface)), + } + + result[idx] = &Interface.guid; + result[idx + 1] = @ptrCast(interface); + idx += 2; + } + + return result; +} + +fn ProtocolInterfaces(HandleType: type, Interfaces: type) type { + const interfaces_type_info = @typeInfo(Interfaces); + if (interfaces_type_info != .@"struct" or !interfaces_type_info.@"struct".is_tuple) + @compileError("expected tuple of protocol interfaces, got " ++ @typeName(Interfaces)); + const interfaces_info = interfaces_type_info.@"struct"; + + var tuple_types: [interfaces_info.fields.len * 2 + 1]type = undefined; + tuple_types[0] = HandleType; + var idx = 1; + while (idx < tuple_types.len) : (idx += 2) { + tuple_types[idx] = *const Guid; + tuple_types[idx + 1] = *const anyopaque; + } + + return std.meta.Tuple(tuple_types[0..]); +} diff --git a/lib/std/os/uefi/tables/configuration_table.zig b/lib/std/os/uefi/tables/configuration_table.zig index 75ea2a215b..9c87ee2437 100644 --- a/lib/std/os/uefi/tables/configuration_table.zig +++ b/lib/std/os/uefi/tables/configuration_table.zig @@ -5,7 +5,7 @@ pub const ConfigurationTable = extern struct { vendor_guid: Guid, vendor_table: *anyopaque, - pub const acpi_20_table_guid align(8) = Guid{ + pub const acpi_20_table_guid: Guid = .{ .time_low = 0x8868e871, .time_mid = 0xe4f1, .time_high_and_version = 0x11d3, @@ -13,7 +13,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x22, .node = [_]u8{ 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81 }, }; - pub const acpi_10_table_guid align(8) = Guid{ + pub const acpi_10_table_guid: Guid = .{ .time_low = 0xeb9d2d30, .time_mid = 0x2d88, .time_high_and_version = 0x11d3, @@ -21,7 +21,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x16, .node = [_]u8{ 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }, }; - pub const sal_system_table_guid align(8) = Guid{ + pub const sal_system_table_guid: Guid = .{ .time_low = 0xeb9d2d32, .time_mid = 0x2d88, .time_high_and_version = 0x113d, @@ -29,7 +29,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x16, .node = [_]u8{ 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }, }; - pub const smbios_table_guid align(8) = Guid{ + pub const smbios_table_guid: Guid = .{ .time_low = 0xeb9d2d31, .time_mid = 0x2d88, .time_high_and_version = 0x11d3, @@ -37,7 +37,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x16, .node = [_]u8{ 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }, }; - pub const smbios3_table_guid align(8) = Guid{ + pub const smbios3_table_guid: Guid = .{ .time_low = 0xf2fd1544, .time_mid = 0x9794, .time_high_and_version = 0x4a2c, @@ -45,7 +45,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x2e, .node = [_]u8{ 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 }, }; - pub const mps_table_guid align(8) = Guid{ + pub const mps_table_guid: Guid = .{ .time_low = 0xeb9d2d2f, .time_mid = 0x2d88, .time_high_and_version = 0x11d3, @@ -53,7 +53,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x16, .node = [_]u8{ 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }, }; - pub const json_config_data_table_guid align(8) = Guid{ + pub const json_config_data_table_guid: Guid = .{ .time_low = 0x87367f87, .time_mid = 0x1119, .time_high_and_version = 0x41ce, @@ -61,7 +61,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0xec, .node = [_]u8{ 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }, }; - pub const json_capsule_data_table_guid align(8) = Guid{ + pub const json_capsule_data_table_guid: Guid = .{ .time_low = 0x35e7a725, .time_mid = 0x8dd2, .time_high_and_version = 0x4cac, @@ -69,7 +69,7 @@ pub const ConfigurationTable = extern struct { .clock_seq_low = 0x11, .node = [_]u8{ 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }, }; - pub const json_capsule_result_table_guid align(8) = Guid{ + pub const json_capsule_result_table_guid: Guid = .{ .time_low = 0xdbc461c3, .time_mid = 0xb3de, .time_high_and_version = 0x422a, diff --git a/lib/std/os/uefi/tables/runtime_services.zig b/lib/std/os/uefi/tables/runtime_services.zig index 2beae3b5c5..63bc9ad531 100644 --- a/lib/std/os/uefi/tables/runtime_services.zig +++ b/lib/std/os/uefi/tables/runtime_services.zig @@ -6,10 +6,12 @@ const Time = uefi.Time; const TimeCapabilities = uefi.TimeCapabilities; const Status = uefi.Status; const MemoryDescriptor = uefi.tables.MemoryDescriptor; +const MemoryMapSlice = uefi.tables.MemoryMapSlice; const ResetType = uefi.tables.ResetType; const CapsuleHeader = uefi.tables.CapsuleHeader; const PhysicalAddress = uefi.tables.PhysicalAddress; const cc = uefi.cc; +const Error = Status.Error; /// Runtime services are provided by the firmware before and after exitBootServices has been called. /// @@ -23,50 +25,511 @@ pub const RuntimeServices = extern struct { hdr: TableHeader, /// Returns the current time and date information, and the time-keeping capabilities of the hardware platform. - getTime: *const fn (time: *uefi.Time, capabilities: ?*TimeCapabilities) callconv(cc) Status, + _getTime: *const fn (time: *Time, capabilities: ?*TimeCapabilities) callconv(cc) Status, /// Sets the current local time and date information - setTime: *const fn (time: *uefi.Time) callconv(cc) Status, + _setTime: *const fn (time: *const Time) callconv(cc) Status, /// Returns the current wakeup alarm clock setting - getWakeupTime: *const fn (enabled: *bool, pending: *bool, time: *uefi.Time) callconv(cc) Status, + _getWakeupTime: *const fn (enabled: *bool, pending: *bool, time: *Time) callconv(cc) Status, /// Sets the system wakeup alarm clock time - setWakeupTime: *const fn (enable: *bool, time: ?*uefi.Time) callconv(cc) Status, + _setWakeupTime: *const fn (enable: bool, time: ?*const Time) callconv(cc) Status, /// Changes the runtime addressing mode of EFI firmware from physical to virtual. - setVirtualAddressMap: *const fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]MemoryDescriptor) callconv(cc) Status, + _setVirtualAddressMap: *const fn (mmap_size: usize, descriptor_size: usize, descriptor_version: u32, virtual_map: [*]align(@alignOf(MemoryDescriptor)) u8) callconv(cc) Status, /// Determines the new virtual address that is to be used on subsequent memory accesses. - convertPointer: *const fn (debug_disposition: usize, address: **anyopaque) callconv(cc) Status, + _convertPointer: *const fn (debug_disposition: DebugDisposition, address: *?*anyopaque) callconv(cc) Status, /// Returns the value of a variable. - getVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: ?*u32, data_size: *usize, data: ?*anyopaque) callconv(cc) Status, + _getVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *const Guid, attributes: ?*VariableAttributes, data_size: *usize, data: ?*anyopaque) callconv(cc) Status, /// Enumerates the current variable names. - getNextVariableName: *const fn (var_name_size: *usize, var_name: [*:0]u16, vendor_guid: *align(8) Guid) callconv(cc) Status, + _getNextVariableName: *const fn (var_name_size: *usize, var_name: ?[*:0]const u16, vendor_guid: *Guid) callconv(cc) Status, /// Sets the value of a variable. - setVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *align(8) const Guid, attributes: u32, data_size: usize, data: *anyopaque) callconv(cc) Status, + _setVariable: *const fn (var_name: [*:0]const u16, vendor_guid: *const Guid, attributes: VariableAttributes, data_size: usize, data: [*]const u8) callconv(cc) Status, /// Return the next high 32 bits of the platform's monotonic counter - getNextHighMonotonicCount: *const fn (high_count: *u32) callconv(cc) Status, + _getNextHighMonotonicCount: *const fn (high_count: *u32) callconv(cc) Status, /// Resets the entire platform. - resetSystem: *const fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?*const anyopaque) callconv(cc) noreturn, + _resetSystem: *const fn (reset_type: ResetType, reset_status: Status, data_size: usize, reset_data: ?[*]const u16) callconv(cc) noreturn, /// Passes capsules to the firmware with both virtual and physical mapping. /// Depending on the intended consumption, the firmware may process the capsule immediately. /// If the payload should persist across a system reset, the reset value returned from /// `queryCapsuleCapabilities` must be passed into resetSystem and will cause the capsule /// to be processed by the firmware as part of the reset process. - updateCapsule: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, scatter_gather_list: PhysicalAddress) callconv(cc) Status, + _updateCapsule: *const fn (capsule_header_array: [*]*const CapsuleHeader, capsule_count: usize, scatter_gather_list: PhysicalAddress) callconv(cc) Status, /// Returns if the capsule can be supported via `updateCapsule` - queryCapsuleCapabilities: *const fn (capsule_header_array: **CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, reset_type: ResetType) callconv(cc) Status, + _queryCapsuleCapabilities: *const fn (capsule_header_array: [*]*const CapsuleHeader, capsule_count: usize, maximum_capsule_size: *usize, reset_type: *ResetType) callconv(cc) Status, /// Returns information about the EFI variables - queryVariableInfo: *const fn (attributes: *u32, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(cc) Status, + _queryVariableInfo: *const fn (attributes: VariableAttributes, maximum_variable_storage_size: *u64, remaining_variable_storage_size: *u64, maximum_variable_size: *u64) callconv(cc) Status, + + pub const GetTimeError = uefi.UnexpectedError || error{ + DeviceError, + Unsupported, + }; + + pub const SetTimeError = uefi.UnexpectedError || error{ + DeviceError, + Unsupported, + }; + + pub const GetWakeupTimeError = uefi.UnexpectedError || error{ + DeviceError, + Unsupported, + }; + + pub const SetWakeupTimeError = uefi.UnexpectedError || error{ + InvalidParameter, + DeviceError, + Unsupported, + }; + + pub const SetVirtualAddressMapError = uefi.UnexpectedError || error{ + Unsupported, + NoMapping, + NotFound, + }; + + pub const ConvertPointerError = uefi.UnexpectedError || error{ + InvalidParameter, + Unsupported, + }; + + pub const GetVariableSizeError = uefi.UnexpectedError || error{ + DeviceError, + Unsupported, + }; + + pub const GetVariableError = GetVariableSizeError || error{ + BufferTooSmall, + }; + + pub const SetVariableError = uefi.UnexpectedError || error{ + InvalidParameter, + OutOfResources, + DeviceError, + WriteProtected, + SecurityViolation, + NotFound, + Unsupported, + }; + + pub const GetNextHighMonotonicCountError = uefi.UnexpectedError || error{ + DeviceError, + Unsupported, + }; + + pub const UpdateCapsuleError = uefi.UnexpectedError || error{ + InvalidParameter, + DeviceError, + Unsupported, + OutOfResources, + }; + + pub const QueryCapsuleCapabilitiesError = uefi.UnexpectedError || error{ + Unsupported, + OutOfResources, + }; + + pub const QueryVariableInfoError = uefi.UnexpectedError || error{ + InvalidParameter, + Unsupported, + }; + + /// Returns the current time and the time capabilities of the platform. + pub fn getTime( + self: *const RuntimeServices, + ) GetTimeError!struct { Time, TimeCapabilities } { + var time: Time = undefined; + var capabilities: TimeCapabilities = undefined; + + switch (self._getTime(&time, &capabilities)) { + .success => return .{ time, capabilities }, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn setTime(self: *RuntimeServices, time: *const Time) SetTimeError!void { + switch (self._setTime(time)) { + .success => {}, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub const GetWakeupTime = struct { + enabled: bool, + pending: bool, + time: Time, + }; + + pub fn getWakeupTime( + self: *const RuntimeServices, + ) GetWakeupTimeError!GetWakeupTime { + var result: GetWakeupTime = undefined; + switch (self._getWakeupTime( + &result.enabled, + &result.pending, + &result.time, + )) { + .success => return result, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub const SetWakeupTime = union(enum) { + enabled: *const Time, + disabled, + }; + + pub fn setWakeupTime( + self: *RuntimeServices, + set: SetWakeupTime, + ) SetWakeupTimeError!void { + switch (self._setWakeupTime( + set != .disabled, + if (set == .enabled) set.enabled else null, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn setVirtualAddressMap( + self: *RuntimeServices, + map: MemoryMapSlice, + ) SetVirtualAddressMapError!void { + switch (self._setVirtualAddressMap( + map.info.len * map.info.descriptor_size, + map.info.descriptor_size, + map.info.descriptor_version, + @ptrCast(map.ptr), + )) { + .success => {}, + .unsupported => return error.Unsupported, + .no_mapping => return error.NoMapping, + .not_found => return error.NotFound, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn convertPointer( + self: *const RuntimeServices, + comptime disposition: DebugDisposition, + cvt: @FieldType(PointerConversion, @tagName(disposition)), + ) ConvertPointerError!?@FieldType(PointerConversion, @tagName(disposition)) { + var pointer = cvt; + + switch (self._convertPointer(disposition, @ptrCast(&pointer))) { + .success => return pointer, + .not_found => return null, + .invalid_parameter => return error.InvalidParameter, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Returns the length of the variable's data and its attributes. + pub fn getVariableSize( + self: *const RuntimeServices, + name: [*:0]const u16, + guid: *const Guid, + ) GetVariableSizeError!?struct { usize, VariableAttributes } { + var size: usize = 0; + var attrs: VariableAttributes = undefined; + + switch (self._getVariable( + name, + guid, + &attrs, + &size, + null, + )) { + .buffer_too_small => return .{ size, attrs }, + .not_found => return null, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// To determine the minimum necessary buffer size for the variable, call + /// `getVariableSize` first. + pub fn getVariable( + self: *const RuntimeServices, + name: [*:0]const u16, + guid: *const Guid, + buffer: []u8, + ) GetVariableError!?struct { []u8, VariableAttributes } { + var attrs: VariableAttributes = undefined; + var len = buffer.len; + + switch (self._getVariable( + name, + guid, + &attrs, + &len, + buffer.ptr, + )) { + .success => return .{ buffer[0..len], attrs }, + .not_found => return null, + .buffer_too_small => return error.BufferTooSmall, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn variableNameIterator( + self: *const RuntimeServices, + buffer: []u16, + ) VariableNameIterator { + buffer[0] = 0; + return .{ + .services = self, + .buffer = buffer, + .guid = undefined, + }; + } + + pub fn setVariable( + self: *RuntimeServices, + name: [*:0]const u16, + guid: *const Guid, + attributes: VariableAttributes, + data: []const u8, + ) SetVariableError!void { + switch (self._setVariable( + name, + guid, + attributes, + data.len, + data.ptr, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .out_of_resources => return error.OutOfResources, + .device_error => return error.DeviceError, + .write_protected => return error.WriteProtected, + .security_violation => return error.SecurityViolation, + .not_found => return error.NotFound, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn getNextHighMonotonicCount(self: *const RuntimeServices) GetNextHighMonotonicCountError!u32 { + var cnt: u32 = undefined; + switch (self._getNextHighMonotonicCount(&cnt)) { + .success => return cnt, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn resetSystem( + self: *RuntimeServices, + reset_type: ResetType, + reset_status: Status, + data: ?[]align(2) const u8, + ) noreturn { + self._resetSystem( + reset_type, + reset_status, + if (data) |d| d.len else 0, + if (data) |d| @alignCast(@ptrCast(d.ptr)) else null, + ); + } + + pub fn updateCapsule( + self: *RuntimeServices, + capsules: []*const CapsuleHeader, + scatter_gather_list: PhysicalAddress, + ) UpdateCapsuleError!void { + switch (self._updateCapsule( + capsules.ptr, + capsules.len, + scatter_gather_list, + )) { + .success => {}, + .invalid_parameter => return error.InvalidParameter, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn queryCapsuleCapabilities( + self: *const RuntimeServices, + capsules: []*const CapsuleHeader, + ) QueryCapsuleCapabilitiesError!struct { u64, ResetType } { + var max_capsule_size: u64 = undefined; + var reset_type: ResetType = undefined; + + switch (self._queryCapsuleCapabilities( + capsules.ptr, + capsules.len, + &max_capsule_size, + &reset_type, + )) { + .success => return .{ max_capsule_size, reset_type }, + .unsupported => return error.Unsupported, + .out_of_resources => return error.OutOfResources, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub fn queryVariableInfo( + self: *const RuntimeServices, + // Note: .append_write is ignored + attributes: VariableAttributes, + ) QueryVariableInfoError!VariableInfo { + var res: VariableInfo = undefined; + + switch (self._queryVariableInfo( + attributes, + &res.max_variable_storage_size, + &res.remaining_variable_storage_size, + &res.max_variable_size, + )) { + .success => return res, + .invalid_parameter => return error.InvalidParameter, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + pub const DebugDisposition = enum(usize) { + const Bits = packed struct(usize) { + optional_ptr: bool = false, + _pad: std.meta.Int(.unsigned, @bitSizeOf(usize) - 1) = 0, + }; + + pointer = @bitCast(Bits{}), + optional = @bitCast(Bits{ .optional_ptr = true }), + _, + }; + + pub const PointerConversion = union(DebugDisposition) { + pointer: *anyopaque, + optional: ?*anyopaque, + }; + + pub const VariableAttributes = packed struct(u32) { + non_volatile: bool = false, + bootservice_access: bool = false, + runtime_access: bool = false, + hardware_error_record: bool = false, + /// Note: deprecated and should be considered reserved. + authenticated_write_access: bool = false, + time_based_authenticated_write_access: bool = false, + append_write: bool = false, + /// Indicates that the variable payload begins with a EFI_VARIABLE_AUTHENTICATION_3 + /// structure, and potentially more structures as indicated by fields of + /// this structure. + enhanced_authenticated_access: bool = false, + _pad: u24 = 0, + }; + + pub const VariableAuthentication3 = extern struct { + version: u8 = 1, + type: Type, + metadata_size: u32, + flags: Flags, + + pub fn payloadConst(self: *const VariableAuthentication3) []const u8 { + return @constCast(self).payload(); + } + + pub fn payload(self: *VariableAuthentication3) []u8 { + var ptr: [*]u8 = @ptrCast(self); + return ptr[@sizeOf(VariableAuthentication3)..self.metadata_size]; + } + + pub const Flags = packed struct(u32) { + update_cert: bool = false, + _pad: u31 = 0, + }; + + pub const Type = enum(u8) { + timestamp = 1, + nonce = 2, + _, + }; + }; + + pub const VariableInfo = struct { + max_variable_storage_size: u64, + remaining_variable_storage_size: u64, + max_variable_size: u64, + }; + + pub const VariableNameIterator = struct { + pub const NextSizeError = uefi.UnexpectedError || error{ + DeviceError, + Unsupported, + }; + + pub const IterateVariableNameError = NextSizeError || error{ + BufferTooSmall, + }; + + services: *const RuntimeServices, + buffer: []u16, + guid: Guid, + + pub fn nextSize(self: *VariableNameIterator) NextSizeError!?usize { + var len: usize = 0; + switch (self.services._getNextVariableName( + &len, + null, + &self.guid, + )) { + .buffer_too_small => return len, + .not_found => return null, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + + /// Call `nextSize` to get the length of the next variable name and check + /// if `buffer` is large enough to hold the name. + pub fn next( + self: *VariableNameIterator, + ) IterateVariableNameError!?[:0]const u16 { + var len = self.buffer.len; + switch (self.services._getNextVariableName( + &len, + @ptrCast(self.buffer.ptr), + &self.guid, + )) { + .success => return self.buffer[0 .. len - 1 :0], + .not_found => return null, + .buffer_too_small => return error.BufferTooSmall, + .device_error => return error.DeviceError, + .unsupported => return error.Unsupported, + else => |status| return uefi.unexpectedStatus(status), + } + } + }; pub const signature: u64 = 0x56524553544e5552; }; diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index a388072e74..52a227df28 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -146,7 +146,7 @@ pub fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HAN // call has failed. There is not really a sane way to handle // this other than retrying the creation after the OS finishes // the deletion. - std.time.sleep(std.time.ns_per_ms); + std.Thread.sleep(std.time.ns_per_ms); continue; }, .VIRUS_INFECTED, .VIRUS_DELETED => return error.AntivirusInterference, @@ -2848,9 +2848,6 @@ pub const STD_OUTPUT_HANDLE = maxInt(DWORD) - 11 + 1; /// The standard error device. Initially, this is the active console screen buffer, CONOUT$. pub const STD_ERROR_HANDLE = maxInt(DWORD) - 12 + 1; -/// Deprecated; use `std.builtin.CallingConvention.winapi` instead. -pub const WINAPI: std.builtin.CallingConvention = .winapi; - pub const BOOL = c_int; pub const BOOLEAN = BYTE; pub const BYTE = u8; diff --git a/lib/std/posix.zig b/lib/std/posix.zig index db5b06828b..8941d044c5 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -772,12 +772,12 @@ pub fn exit(status: u8) noreturn { if (native_os == .uefi) { const uefi = std.os.uefi; // exit() is only available if exitBootServices() has not been called yet. - // This call to exit should not fail, so we don't care about its return value. + // This call to exit should not fail, so we catch-ignore errors. if (uefi.system_table.boot_services) |bs| { - _ = bs.exit(uefi.handle, @enumFromInt(status), 0, null); + bs.exit(uefi.handle, @enumFromInt(status), null) catch {}; } // If we can't exit, reboot the system instead. - uefi.system_table.runtime_services.resetSystem(.reset_cold, @enumFromInt(status), 0, null); + uefi.system_table.runtime_services.resetSystem(.cold, @enumFromInt(status), null); } system.exit(status); } @@ -6088,6 +6088,9 @@ pub const SendError = error{ /// The local network interface used to reach the destination is down. NetworkSubsystemFailed, + + /// The destination address is not listening. + ConnectionRefused, } || UnexpectedError; pub const SendMsgError = SendError || error{ @@ -6315,7 +6318,6 @@ pub fn send( error.AddressNotAvailable => unreachable, error.SocketNotConnected => unreachable, error.UnreachableAddress => unreachable, - error.ConnectionRefused => unreachable, else => |e| return e, }; } @@ -6986,6 +6988,20 @@ pub fn tcsetpgrp(handle: fd_t, pgrp: pid_t) TermioSetPgrpError!void { } } +pub const SetSidError = error{ + /// The calling process is already a process group leader, or the process group ID of a process other than the calling process matches the process ID of the calling process. + PermissionDenied, +} || UnexpectedError; + +pub fn setsid() SetSidError!pid_t { + const rc = system.setsid(); + switch (errno(rc)) { + .SUCCESS => return rc, + .PERM => return error.PermissionDenied, + else => |err| return unexpectedErrno(err), + } +} + pub fn signalfd(fd: fd_t, mask: *const sigset_t, flags: u32) !fd_t { const rc = system.signalfd(fd, mask, flags); switch (errno(rc)) { diff --git a/lib/std/posix/test.zig b/lib/std/posix/test.zig index 993b8e28cd..499bdd32cc 100644 --- a/lib/std/posix/test.zig +++ b/lib/std/posix/test.zig @@ -1161,7 +1161,7 @@ test "POSIX file locking with fcntl" { posix.exit(0); } else { // parent waits for child to get shared lock: - std.time.sleep(1 * std.time.ns_per_ms); + std.Thread.sleep(1 * std.time.ns_per_ms); // parent expects deadlock when attempting to upgrade the shared lock to exclusive: struct_flock.start = 1; struct_flock.type = posix.F.WRLCK; diff --git a/lib/std/time.zig b/lib/std/time.zig index b9808cf747..504257a852 100644 --- a/lib/std/time.zig +++ b/lib/std/time.zig @@ -8,9 +8,6 @@ const posix = std.posix; pub const epoch = @import("time/epoch.zig"); -/// Deprecated: moved to std.Thread.sleep -pub const sleep = std.Thread.sleep; - /// Get a calendar timestamp, in seconds, relative to UTC 1970-01-01. /// Precision of timing depends on the hardware and operating system. /// The return value is signed because it is possible to have a date that is @@ -59,9 +56,7 @@ pub fn nanoTimestamp() i128 { return ns; }, .uefi => { - var value: std.os.uefi.Time = undefined; - const status = std.os.uefi.system_table.runtime_services.getTime(&value, null); - assert(status == .success); + const value, _ = std.os.uefi.system_table.runtime_services.getTime() catch return 0; return value.toEpoch(); }, else => { @@ -144,9 +139,7 @@ pub const Instant = struct { return .{ .timestamp = ns }; }, .uefi => { - var value: std.os.uefi.Time = undefined; - const status = std.os.uefi.system_table.runtime_services.getTime(&value, null); - if (status != .success) return error.Unsupported; + const value, _ = std.os.uefi.system_table.runtime_services.getTime() catch return error.Unsupported; return .{ .timestamp = value.toEpoch() }; }, // On darwin, use UPTIME_RAW instead of MONOTONIC as it ticks while diff --git a/lib/std/unicode.zig b/lib/std/unicode.zig index ef694f33ba..15b57b4f29 100644 --- a/lib/std/unicode.zig +++ b/lib/std/unicode.zig @@ -972,8 +972,6 @@ pub fn utf16LeToUtf8ArrayList(result: *std.ArrayList(u8), utf16le: []const u16) return utf16LeToUtf8ArrayListImpl(result, utf16le, .cannot_encode_surrogate_half); } -pub const utf16leToUtf8Alloc = @compileError("deprecated; renamed to utf16LeToUtf8Alloc"); - /// Caller must free returned memory. pub fn utf16LeToUtf8Alloc(allocator: mem.Allocator, utf16le: []const u16) Utf16LeToUtf8AllocError![]u8 { // optimistically guess that it will all be ascii. @@ -984,8 +982,6 @@ pub fn utf16LeToUtf8Alloc(allocator: mem.Allocator, utf16le: []const u16) Utf16L return result.toOwnedSlice(); } -pub const utf16leToUtf8AllocZ = @compileError("deprecated; renamed to utf16LeToUtf8AllocZ"); - /// Caller must free returned memory. pub fn utf16LeToUtf8AllocZ(allocator: mem.Allocator, utf16le: []const u16) Utf16LeToUtf8AllocError![:0]u8 { // optimistically guess that it will all be ascii (and allocate space for the null terminator) @@ -1054,8 +1050,6 @@ fn utf16LeToUtf8Impl(utf8: []u8, utf16le: []const u16, comptime surrogates: Surr return dest_index; } -pub const utf16leToUtf8 = @compileError("deprecated; renamed to utf16LeToUtf8"); - pub fn utf16LeToUtf8(utf8: []u8, utf16le: []const u16) Utf16LeToUtf8Error!usize { return utf16LeToUtf8Impl(utf8, utf16le, .cannot_encode_surrogate_half); } @@ -1175,8 +1169,6 @@ pub fn utf8ToUtf16LeAlloc(allocator: mem.Allocator, utf8: []const u8) error{ Inv return result.toOwnedSlice(); } -pub const utf8ToUtf16LeWithNull = @compileError("deprecated; renamed to utf8ToUtf16LeAllocZ"); - pub fn utf8ToUtf16LeAllocZ(allocator: mem.Allocator, utf8: []const u8) error{ InvalidUtf8, OutOfMemory }![:0]u16 { // optimistically guess that it will not require surrogate pairs var result = try std.ArrayList(u16).initCapacity(allocator, utf8.len + 1); @@ -1487,8 +1479,6 @@ fn formatUtf16Le(utf16le: []const u16, writer: *std.io.Writer) std.io.Writer.Err try writer.writeAll(buf[0..u8len]); } -pub const fmtUtf16le = @compileError("deprecated; renamed to fmtUtf16Le"); - /// Return a Formatter for a (potentially ill-formed) UTF-16 LE string, /// which will be converted to UTF-8 during formatting. /// Unpaired surrogates are replaced by the replacement character (U+FFFD). diff --git a/lib/std/valgrind.zig b/lib/std/valgrind.zig index 7b095a8997..5447eefc57 100644 --- a/lib/std/valgrind.zig +++ b/lib/std/valgrind.zig @@ -200,18 +200,6 @@ pub fn nonSimdCall3(func: fn (usize, usize, usize, usize) usize, a1: usize, a2: return doClientRequestExpr(0, .ClientCall3, @intFromPtr(func), a1, a2, a3, 0); } -/// Deprecated: use `nonSimdCall0` -pub const nonSIMDCall0 = nonSimdCall0; - -/// Deprecated: use `nonSimdCall1` -pub const nonSIMDCall1 = nonSimdCall1; - -/// Deprecated: use `nonSimdCall2` -pub const nonSIMDCall2 = nonSimdCall2; - -/// Deprecated: use `nonSimdCall3` -pub const nonSIMDCall3 = nonSimdCall3; - /// Counts the number of errors that have been recorded by a tool. Nb: /// the tool must record the errors with VG_(maybe_record_error)() or /// VG_(unique_error)() for them to be counted. diff --git a/lib/std/valgrind/callgrind.zig b/lib/std/valgrind/callgrind.zig index 6718f40643..6ae8cc5f20 100644 --- a/lib/std/valgrind/callgrind.zig +++ b/lib/std/valgrind/callgrind.zig @@ -10,8 +10,6 @@ pub const ClientRequest = enum(usize) { StopInstrumentation, }; -pub const CallgrindClientRequest = @compileError("std.valgrind.callgrind.CallgrindClientRequest renamed to std.valgrind.callgrind.ClientRequest"); - fn doClientRequestExpr(default: usize, request: ClientRequest, a1: usize, a2: usize, a3: usize, a4: usize, a5: usize) usize { return valgrind.doClientRequest(default, @as(usize, @intCast(@intFromEnum(request))), a1, a2, a3, a4, a5); } diff --git a/lib/std/valgrind/memcheck.zig b/lib/std/valgrind/memcheck.zig index d0e0f0bd8c..aeeae896f0 100644 --- a/lib/std/valgrind/memcheck.zig +++ b/lib/std/valgrind/memcheck.zig @@ -20,8 +20,6 @@ pub const ClientRequest = enum(usize) { DisableAddrErrorReportingInRange, }; -pub const MemCheckClientRequest = @compileError("std.valgrind.memcheck.MemCheckClientRequest renamed to std.valgrind.memcheck.ClientRequest"); - fn doClientRequestExpr(default: usize, request: ClientRequest, a1: usize, a2: usize, a3: usize, a4: usize, a5: usize) usize { return valgrind.doClientRequest(default, @as(usize, @intCast(@intFromEnum(request))), a1, a2, a3, a4, a5); } diff --git a/lib/std/zig.zig b/lib/std/zig.zig index ccdf65b1be..f504d7f66e 100644 --- a/lib/std/zig.zig +++ b/lib/std/zig.zig @@ -23,7 +23,6 @@ pub const Zir = @import("zig/Zir.zig"); pub const Zoir = @import("zig/Zoir.zig"); pub const ZonGen = @import("zig/ZonGen.zig"); pub const system = @import("zig/system.zig"); -pub const CrossTarget = @compileError("deprecated; use std.Target.Query"); pub const BuiltinFn = @import("zig/BuiltinFn.zig"); pub const AstRlAnnotate = @import("zig/AstRlAnnotate.zig"); pub const LibCInstallation = @import("zig/LibCInstallation.zig"); @@ -596,7 +595,7 @@ pub fn putAstErrorsIntoBundle( pub fn resolveTargetQueryOrFatal(target_query: std.Target.Query) std.Target { return std.zig.system.resolveTargetQuery(target_query) catch |err| - fatal("unable to resolve target: {s}", .{@errorName(err)}); + std.process.fatal("unable to resolve target: {s}", .{@errorName(err)}); } pub fn parseTargetQueryOrReportFatalError( @@ -620,7 +619,7 @@ pub fn parseTargetQueryOrReportFatalError( @tagName(diags.arch.?), help_text.items, }); } - fatal("unknown CPU: '{s}'", .{diags.cpu_name.?}); + std.process.fatal("unknown CPU: '{s}'", .{diags.cpu_name.?}); }, error.UnknownCpuFeature => { help: { @@ -633,7 +632,7 @@ pub fn parseTargetQueryOrReportFatalError( @tagName(diags.arch.?), help_text.items, }); } - fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); + std.process.fatal("unknown CPU feature: '{s}'", .{diags.unknown_feature_name.?}); }, error.UnknownObjectFormat => { help: { @@ -644,7 +643,7 @@ pub fn parseTargetQueryOrReportFatalError( } std.log.info("available object formats:\n{s}", .{help_text.items}); } - fatal("unknown object format: '{s}'", .{opts.object_format.?}); + std.process.fatal("unknown object format: '{s}'", .{opts.object_format.?}); }, error.UnknownArchitecture => { help: { @@ -655,17 +654,14 @@ pub fn parseTargetQueryOrReportFatalError( } std.log.info("available architectures:\n{s} native\n", .{help_text.items}); } - fatal("unknown architecture: '{s}'", .{diags.unknown_architecture_name.?}); + std.process.fatal("unknown architecture: '{s}'", .{diags.unknown_architecture_name.?}); }, - else => |e| fatal("unable to parse target query '{s}': {s}", .{ + else => |e| std.process.fatal("unable to parse target query '{s}': {s}", .{ opts.arch_os_abi, @errorName(e), }), }; } -/// Deprecated; see `std.process.fatal`. -pub const fatal = std.process.fatal; - /// Collects all the environment variables that Zig could possibly inspect, so /// that we can do reflection on this and print them with `zig env`. pub const EnvVar = enum { diff --git a/lib/std/zig/c_translation.zig b/lib/std/zig/c_translation.zig index 813b409c90..c8cd980f57 100644 --- a/lib/std/zig/c_translation.zig +++ b/lib/std/zig/c_translation.zig @@ -254,9 +254,6 @@ test "sizeof" { pub const CIntLiteralBase = enum { decimal, octal, hex }; -/// Deprecated: use `CIntLiteralBase` -pub const CIntLiteralRadix = CIntLiteralBase; - fn PromoteIntLiteralReturnType(comptime SuffixType: type, comptime number: comptime_int, comptime base: CIntLiteralBase) type { const signed_decimal = [_]type{ c_int, c_long, c_longlong, c_ulonglong }; const signed_oct_hex = [_]type{ c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong }; diff --git a/lib/std/zig/llvm/Builder.zig b/lib/std/zig/llvm/Builder.zig index b3e0311cdd..f3ff63ec33 100644 --- a/lib/std/zig/llvm/Builder.zig +++ b/lib/std/zig/llvm/Builder.zig @@ -2037,7 +2037,7 @@ pub const Alignment = enum(u6) { pub fn format(p: Prefixed, w: *Writer) Writer.Error!void { const byte_units = p.alignment.toByteUnits() orelse return; - return w.print("{s}align ({d})", .{ p.prefix, byte_units }); + return w.print("{s}align {d}", .{ p.prefix, byte_units }); } }; @@ -2384,7 +2384,7 @@ pub const Global = struct { }; fn format(data: FormatData, w: *Writer) Writer.Error!void { try w.print("@{f}", .{ - data.global.unwrap(data.builder).name(data.builder).fmt(data.builder, null), + data.global.unwrap(data.builder).name(data.builder).fmt(data.builder, .quote_unless_valid_identifier), }); } pub fn fmt(self: Index, builder: *const Builder) std.fmt.Formatter(FormatData, format) { @@ -8401,7 +8401,7 @@ pub const Metadata = enum(u32) { }, w); }, .string => |node| try w.print("{s}{f}", .{ - @as([]const u8, if (is_specialized) "" else "!"), node.fmt(builder), + @as([]const u8, if (is_specialized) "!" else ""), node.fmt(builder), }), inline .bool, .u32, .u64 => |node| try w.print("{}", .{node}), inline .di_flags, .sp_flags => |node| try w.print("{f}", .{node}), @@ -9782,7 +9782,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void instruction_index.name(&function).fmt(self), @tagName(tag), extra.lhs.fmt(function_index, self, .{ .percent = true }), - extra.rhs.fmt(function_index, self, .{ .percent = true }), + extra.rhs.fmt(function_index, self, .{}), }); }, .addrspacecast, @@ -10638,7 +10638,7 @@ fn fnTypeAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = std.hash.Wyhash.init(comptime std.hash.uint32(@intFromEnum(tag))); + var hasher = std.hash.Wyhash.init(comptime std.hash.int(@intFromEnum(tag))); hasher.update(std.mem.asBytes(&key.ret)); hasher.update(std.mem.sliceAsBytes(key.params)); return @truncate(hasher.final()); @@ -10698,7 +10698,7 @@ fn vectorTypeAssumeCapacity( builder: *const Builder, pub fn hash(_: @This(), key: Type.Vector) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(tag)), + comptime std.hash.int(@intFromEnum(tag)), std.mem.asBytes(&key), )); } @@ -10727,7 +10727,7 @@ fn arrayTypeAssumeCapacity(self: *Builder, len: u64, child: Type) Type { builder: *const Builder, pub fn hash(_: @This(), key: Type.Vector) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Type.Tag.small_array)), + comptime std.hash.int(@intFromEnum(Type.Tag.small_array)), std.mem.asBytes(&key), )); } @@ -10753,7 +10753,7 @@ fn arrayTypeAssumeCapacity(self: *Builder, len: u64, child: Type) Type { builder: *const Builder, pub fn hash(_: @This(), key: Type.Array) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Type.Tag.array)), + comptime std.hash.int(@intFromEnum(Type.Tag.array)), std.mem.asBytes(&key), )); } @@ -10794,7 +10794,7 @@ fn structTypeAssumeCapacity( builder: *const Builder, pub fn hash(_: @This(), key: []const Type) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(tag)), + comptime std.hash.int(@intFromEnum(tag)), std.mem.sliceAsBytes(key), )); } @@ -10826,7 +10826,7 @@ fn opaqueTypeAssumeCapacity(self: *Builder, name: String) Type { builder: *const Builder, pub fn hash(_: @This(), key: String) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Type.Tag.named_structure)), + comptime std.hash.int(@intFromEnum(Type.Tag.named_structure)), std.mem.asBytes(&key), )); } @@ -10887,7 +10887,7 @@ fn getOrPutTypeNoExtraAssumeCapacity(self: *Builder, item: Type.Item) struct { n builder: *const Builder, pub fn hash(_: @This(), key: Type.Item) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Type.Tag.simple)), + comptime std.hash.int(@intFromEnum(Type.Tag.simple)), std.mem.asBytes(&key), )); } @@ -11021,7 +11021,7 @@ fn bigIntConstAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); + var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); hasher.update(std.mem.asBytes(&key.type)); hasher.update(std.mem.sliceAsBytes(key.limbs)); return @truncate(hasher.final()); @@ -11084,7 +11084,7 @@ fn doubleConstAssumeCapacity(self: *Builder, val: f64) Constant { builder: *const Builder, pub fn hash(_: @This(), key: f64) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Constant.Tag.double)), + comptime std.hash.int(@intFromEnum(Constant.Tag.double)), std.mem.asBytes(&key), )); } @@ -11115,7 +11115,7 @@ fn fp128ConstAssumeCapacity(self: *Builder, val: f128) Constant { builder: *const Builder, pub fn hash(_: @This(), key: f128) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Constant.Tag.fp128)), + comptime std.hash.int(@intFromEnum(Constant.Tag.fp128)), std.mem.asBytes(&key), )); } @@ -11149,7 +11149,7 @@ fn x86_fp80ConstAssumeCapacity(self: *Builder, val: f80) Constant { builder: *const Builder, pub fn hash(_: @This(), key: f80) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Constant.Tag.x86_fp80)), + comptime std.hash.int(@intFromEnum(Constant.Tag.x86_fp80)), std.mem.asBytes(&key)[0..10], )); } @@ -11182,7 +11182,7 @@ fn ppc_fp128ConstAssumeCapacity(self: *Builder, val: [2]f64) Constant { builder: *const Builder, pub fn hash(_: @This(), key: [2]f64) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Constant.Tag.ppc_fp128)), + comptime std.hash.int(@intFromEnum(Constant.Tag.ppc_fp128)), std.mem.asBytes(&key), )); } @@ -11317,7 +11317,7 @@ fn splatConstAssumeCapacity(self: *Builder, ty: Type, val: Constant) Constant { builder: *const Builder, pub fn hash(_: @This(), key: Constant.Splat) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Constant.Tag.splat)), + comptime std.hash.int(@intFromEnum(Constant.Tag.splat)), std.mem.asBytes(&key), )); } @@ -11420,7 +11420,7 @@ fn blockAddrConstAssumeCapacity( builder: *const Builder, pub fn hash(_: @This(), key: Constant.BlockAddress) u32 { return @truncate(std.hash.Wyhash.hash( - comptime std.hash.uint32(@intFromEnum(Constant.Tag.blockaddress)), + comptime std.hash.int(@intFromEnum(Constant.Tag.blockaddress)), std.mem.asBytes(&key), )); } @@ -11546,7 +11546,7 @@ fn castConstAssumeCapacity(self: *Builder, tag: Constant.Tag, val: Constant, ty: builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { return @truncate(std.hash.Wyhash.hash( - std.hash.uint32(@intFromEnum(key.tag)), + std.hash.int(@intFromEnum(key.tag)), std.mem.asBytes(&key.cast), )); } @@ -11621,7 +11621,7 @@ fn gepConstAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = std.hash.Wyhash.init(comptime std.hash.uint32(@intFromEnum(tag))); + var hasher = std.hash.Wyhash.init(comptime std.hash.int(@intFromEnum(tag))); hasher.update(std.mem.asBytes(&key.type)); hasher.update(std.mem.asBytes(&key.base)); hasher.update(std.mem.asBytes(&key.inrange)); @@ -11685,7 +11685,7 @@ fn binConstAssumeCapacity( builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { return @truncate(std.hash.Wyhash.hash( - std.hash.uint32(@intFromEnum(key.tag)), + std.hash.int(@intFromEnum(key.tag)), std.mem.asBytes(&key.extra), )); } @@ -11723,7 +11723,7 @@ fn asmConstAssumeCapacity( builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { return @truncate(std.hash.Wyhash.hash( - std.hash.uint32(@intFromEnum(key.tag)), + std.hash.int(@intFromEnum(key.tag)), std.mem.asBytes(&key.extra), )); } @@ -11773,7 +11773,7 @@ fn getOrPutConstantNoExtraAssumeCapacity( builder: *const Builder, pub fn hash(_: @This(), key: Constant.Item) u32 { return @truncate(std.hash.Wyhash.hash( - std.hash.uint32(@intFromEnum(key.tag)), + std.hash.int(@intFromEnum(key.tag)), std.mem.asBytes(&key.data), )); } @@ -11804,7 +11804,7 @@ fn getOrPutConstantAggregateAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); + var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); hasher.update(std.mem.asBytes(&key.type)); hasher.update(std.mem.sliceAsBytes(key.vals)); return @truncate(hasher.final()); @@ -12421,7 +12421,7 @@ fn metadataSimpleAssumeCapacity(self: *Builder, tag: Metadata.Tag, value: anytyp const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); + var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); inline for (std.meta.fields(@TypeOf(value))) |field| { hasher.update(std.mem.asBytes(&@field(key.value, field.name))); } @@ -12457,7 +12457,7 @@ fn metadataDistinctAssumeCapacity(self: *Builder, tag: Metadata.Tag, value: anyt const Adapter = struct { pub fn hash(_: @This(), key: Key) u32 { return @truncate(std.hash.Wyhash.hash( - std.hash.uint32(@intFromEnum(key.tag)), + std.hash.int(@intFromEnum(key.tag)), std.mem.asBytes(&key.index), )); } @@ -12853,7 +12853,7 @@ fn debugEnumeratorAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(key.tag))); + var hasher = std.hash.Wyhash.init(std.hash.int(@intFromEnum(key.tag))); hasher.update(std.mem.asBytes(&key.name)); hasher.update(std.mem.asBytes(&key.bit_width)); hasher.update(std.mem.sliceAsBytes(key.value.limbs)); @@ -12935,7 +12935,7 @@ fn debugExpressionAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.expression))); + var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.expression))); hasher.update(std.mem.sliceAsBytes(key.elements)); return @truncate(hasher.final()); } @@ -12981,7 +12981,7 @@ fn metadataTupleAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.tuple))); + var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.tuple))); hasher.update(std.mem.sliceAsBytes(key.elements)); return @truncate(hasher.final()); } @@ -13029,7 +13029,7 @@ fn strTupleAssumeCapacity( const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Key) u32 { - var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.tuple))); + var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.tuple))); hasher.update(std.mem.sliceAsBytes(key.elements)); return @truncate(hasher.final()); } @@ -13159,7 +13159,7 @@ fn metadataConstantAssumeCapacity(self: *Builder, constant: Constant) Metadata { const Adapter = struct { builder: *const Builder, pub fn hash(_: @This(), key: Constant) u32 { - var hasher = comptime std.hash.Wyhash.init(std.hash.uint32(@intFromEnum(Metadata.Tag.constant))); + var hasher = comptime std.hash.Wyhash.init(std.hash.int(@intFromEnum(Metadata.Tag.constant))); hasher.update(std.mem.asBytes(&key)); return @truncate(hasher.final()); } diff --git a/src/Compilation.zig b/src/Compilation.zig index 709415f3b1..afa2ac9fab 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1029,7 +1029,9 @@ pub const CObject = struct { pub fn destroy(bundle: *Bundle, gpa: Allocator) void { for (bundle.file_names.values()) |file_name| gpa.free(file_name); + bundle.file_names.deinit(gpa); for (bundle.category_names.values()) |category_name| gpa.free(category_name); + bundle.category_names.deinit(gpa); for (bundle.diags) |*diag| diag.deinit(gpa); gpa.free(bundle.diags); gpa.destroy(bundle); @@ -3040,7 +3042,7 @@ fn flush( // If there's an output file, it wants to decide where the LLVM object goes! const sub_prog_node = comp.link_prog_node.start("LLVM Emit Object", 0); defer sub_prog_node.end(); - try llvm_object.emit(.{ + try llvm_object.emit(.{ .zcu = zcu, .tid = tid }, .{ .pre_ir_path = comp.verbose_llvm_ir, .pre_bc_path = comp.verbose_llvm_bc, diff --git a/src/IncrementalDebugServer.zig b/src/IncrementalDebugServer.zig index e7c7461e5d..e5fcb71424 100644 --- a/src/IncrementalDebugServer.zig +++ b/src/IncrementalDebugServer.zig @@ -55,14 +55,15 @@ fn runThread(ids: *IncrementalDebugServer) void { const conn = server.accept() catch @panic("IncrementalDebugServer: failed to accept"); defer conn.stream.close(); + var stream_reader = conn.stream.reader(&cmd_buf); + while (ids.running.load(.monotonic)) { conn.stream.writeAll("zig> ") catch @panic("IncrementalDebugServer: failed to write"); - var fbs = std.io.fixedBufferStream(&cmd_buf); - conn.stream.reader().streamUntilDelimiter(fbs.writer(), '\n', cmd_buf.len) catch |err| switch (err) { + const untrimmed = stream_reader.interface().takeSentinel('\n') catch |err| switch (err) { error.EndOfStream => break, else => @panic("IncrementalDebugServer: failed to read command"), }; - const cmd_and_arg = std.mem.trim(u8, fbs.getWritten(), " \t\r\n"); + const cmd_and_arg = std.mem.trim(u8, untrimmed, " \t\r\n"); const cmd: []const u8, const arg: []const u8 = if (std.mem.indexOfScalar(u8, cmd_and_arg, ' ')) |i| .{ cmd_and_arg[0..i], cmd_and_arg[i + 1 ..] } else diff --git a/src/InternPool.zig b/src/InternPool.zig index 8471a1ad9e..ba5725ec30 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -1861,7 +1861,7 @@ pub const NullTerminatedString = enum(u32) { pub fn hash(ctx: @This(), a: NullTerminatedString) u32 { _ = ctx; - return std.hash.uint32(@intFromEnum(a)); + return std.hash.int(@intFromEnum(a)); } }; @@ -4740,7 +4740,7 @@ pub const Index = enum(u32) { pub fn hash(ctx: @This(), a: Index) u32 { _ = ctx; - return std.hash.uint32(@intFromEnum(a)); + return std.hash.int(@intFromEnum(a)); } }; @@ -12725,7 +12725,7 @@ const GlobalErrorSet = struct { name: NullTerminatedString, ) Allocator.Error!GlobalErrorSet.Index { if (name == .empty) return .none; - const hash = std.hash.uint32(@intFromEnum(name)); + const hash = std.hash.int(@intFromEnum(name)); var map = ges.shared.map.acquire(); const Map = @TypeOf(map); var map_mask = map.header().mask(); @@ -12818,7 +12818,7 @@ const GlobalErrorSet = struct { name: NullTerminatedString, ) ?GlobalErrorSet.Index { if (name == .empty) return .none; - const hash = std.hash.uint32(@intFromEnum(name)); + const hash = std.hash.int(@intFromEnum(name)); const map = ges.shared.map.acquire(); const map_mask = map.header().mask(); const names_items = ges.shared.names.acquire().view().items(.@"0"); diff --git a/src/Sema.zig b/src/Sema.zig index 92f6705e4e..6672ba5b36 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -9705,7 +9705,6 @@ fn funcCommon( func_inst, cc_src, is_noinline, - is_generic, ); } @@ -9745,7 +9744,6 @@ fn funcCommon( func_inst, cc_src, is_noinline, - is_generic, ); } @@ -9762,7 +9760,6 @@ fn funcCommon( func_inst, cc_src, is_noinline, - is_generic, ); } @@ -9779,7 +9776,6 @@ fn finishFunc( func_inst: Zir.Inst.Index, cc_src: LazySrcLoc, is_noinline: bool, - is_generic: bool, ) CompileError!Air.Inst.Ref { const pt = sema.pt; const zcu = pt.zcu; @@ -9911,13 +9907,6 @@ fn finishFunc( }), } - if (!is_generic and sema.wantErrorReturnTracing(return_type)) { - // Make sure that StackTrace's fields are resolved so that the backend can - // lower this fn type. - const unresolved_stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace); - try unresolved_stack_trace_ty.resolveFields(pt); - } - return Air.internedToRef(if (opt_func_index != .none) opt_func_index else func_ty); } @@ -13052,8 +13041,10 @@ fn analyzeSwitchRuntimeBlock( sema.air_extra.appendSliceAssumeCapacity(@ptrCast(cases_extra.items)); sema.air_extra.appendSliceAssumeCapacity(@ptrCast(else_body)); + const has_any_continues = spa.operand == .loop and child_block.label.?.merges.extra_insts.items.len > 0; + return try child_block.addInst(.{ - .tag = if (spa.operand == .loop) .loop_switch_br else .switch_br, + .tag = if (has_any_continues) .loop_switch_br else .switch_br, .data = .{ .pl_op = .{ .operand = operand, .payload = payload_index, diff --git a/src/Zcu.zig b/src/Zcu.zig index 26ee09cfbf..6d07477edc 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -808,7 +808,7 @@ pub const Namespace = struct { pub fn hash(ctx: NavNameContext, nav: InternPool.Nav.Index) u32 { const name = ctx.zcu.intern_pool.getNav(nav).name; - return std.hash.uint32(@intFromEnum(name)); + return std.hash.int(@intFromEnum(name)); } pub fn eql(ctx: NavNameContext, a_nav: InternPool.Nav.Index, b_nav: InternPool.Nav.Index, b_index: usize) bool { @@ -824,7 +824,7 @@ pub const Namespace = struct { pub fn hash(ctx: NameAdapter, s: InternPool.NullTerminatedString) u32 { _ = ctx; - return std.hash.uint32(@intFromEnum(s)); + return std.hash.int(@intFromEnum(s)); } pub fn eql(ctx: NameAdapter, a: InternPool.NullTerminatedString, b_nav: InternPool.Nav.Index, b_index: usize) bool { diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 5678b36ef9..cd8bf44866 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -3975,7 +3975,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index, is_dispatch_loop: bool) Inner var width_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; width_bigint.sub(max_bigint, min_bigint); width_bigint.addScalar(width_bigint.toConst(), 1); - break :width width_bigint.toConst().to(u32) catch null; + break :width width_bigint.toConst().toInt(u32) catch null; }; try cg.startBlock(.block, .empty); // whole switch block start @@ -4016,7 +4016,7 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index, is_dispatch_loop: bool) Inner const val_bigint = val.toBigInt(&val_space, zcu); var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; index_bigint.sub(val_bigint, min_bigint); - branch_list[index_bigint.toConst().to(u32) catch unreachable] = case.idx; + branch_list[index_bigint.toConst().toInt(u32) catch unreachable] = case.idx; } for (case.ranges) |range| { var low_space: Value.BigIntSpace = undefined; @@ -4025,9 +4025,9 @@ fn airSwitchBr(cg: *CodeGen, inst: Air.Inst.Index, is_dispatch_loop: bool) Inner const high_bigint = Value.fromInterned(range[1].toInterned().?).toBigInt(&high_space, zcu); var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; index_bigint.sub(low_bigint, min_bigint); - const start = index_bigint.toConst().to(u32) catch unreachable; + const start = index_bigint.toConst().toInt(u32) catch unreachable; index_bigint.sub(high_bigint, min_bigint); - const end = (index_bigint.toConst().to(u32) catch unreachable) + 1; + const end = (index_bigint.toConst().toInt(u32) catch unreachable) + 1; @memset(branch_list[start..end], case.idx); } } diff --git a/src/arch/wasm/Mir.zig b/src/arch/wasm/Mir.zig index 3aee13acd7..98b263951f 100644 --- a/src/arch/wasm/Mir.zig +++ b/src/arch/wasm/Mir.zig @@ -687,7 +687,7 @@ pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayListUnmanaged(u8)) st const sp_global: Wasm.GlobalIndex = .stack_pointer; // load stack pointer code.appendAssumeCapacity(@intFromEnum(std.wasm.Opcode.global_get)); - std.leb.writeULEB128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; + std.leb.writeUleb128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; // store stack pointer so we can restore it when we return from the function code.appendAssumeCapacity(@intFromEnum(std.wasm.Opcode.local_tee)); leb.writeUleb128(code.fixedWriter(), mir.prologue.sp_local) catch unreachable; @@ -710,7 +710,7 @@ pub fn lower(mir: *const Mir, wasm: *Wasm, code: *std.ArrayListUnmanaged(u8)) st // Store the current stack pointer value into the global stack pointer so other function calls will // start from this value instead and not overwrite the current stack. code.appendAssumeCapacity(@intFromEnum(std.wasm.Opcode.global_set)); - std.leb.writeULEB128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; + std.leb.writeUleb128(code.fixedWriter(), @intFromEnum(sp_global)) catch unreachable; } var emit: Emit = .{ diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 486497a365..80542b551f 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -179277,7 +179277,7 @@ fn lowerSwitchBr( var table_len_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; table_len_bigint.sub(max_bigint, min_bigint); assert(table_len_bigint.positive); // min <= max - break :table_len @as(u11, table_len_bigint.toConst().to(u10) catch break :table) + 1; // no more than a 1024 entry table + break :table_len @as(u11, table_len_bigint.toConst().toInt(u10) catch break :table) + 1; // no more than a 1024 entry table }; assert(prong_items <= table_len); // each prong item introduces at least one unique integer to the range if (prong_items < table_len >> 2) break :table; // no more than 75% waste @@ -179353,7 +179353,7 @@ fn lowerSwitchBr( const val_bigint = val.toBigInt(&val_space, zcu); var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; index_bigint.sub(val_bigint, min_bigint); - table[index_bigint.toConst().to(u10) catch unreachable] = @intCast(cg.mir_instructions.len); + table[index_bigint.toConst().toInt(u10) catch unreachable] = @intCast(cg.mir_instructions.len); } for (case.ranges) |range| { var low_space: Value.BigIntSpace = undefined; @@ -179362,9 +179362,9 @@ fn lowerSwitchBr( const high_bigint = Value.fromInterned(range[1].toInterned().?).toBigInt(&high_space, zcu); var index_bigint: std.math.big.int.Mutable = .{ .limbs = limbs, .positive = undefined, .len = undefined }; index_bigint.sub(low_bigint, min_bigint); - const start = index_bigint.toConst().to(u10) catch unreachable; + const start = index_bigint.toConst().toInt(u10) catch unreachable; index_bigint.sub(high_bigint, min_bigint); - const end = @as(u11, index_bigint.toConst().to(u10) catch unreachable) + 1; + const end = @as(u11, index_bigint.toConst().toInt(u10) catch unreachable) + 1; @memset(table[start..end], @intCast(cg.mir_instructions.len)); } } diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 3d670dce83..e726a2bdd3 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -494,8 +494,6 @@ pub const Object = struct { gpa: Allocator, builder: Builder, - pt: Zcu.PerThread, - debug_compile_unit: Builder.Metadata, debug_enums_fwd_ref: Builder.Metadata, @@ -626,10 +624,6 @@ pub const Object = struct { obj.* = .{ .gpa = gpa, .builder = builder, - .pt = .{ - .zcu = comp.zcu.?, - .tid = .main, - }, .debug_compile_unit = debug_compile_unit, .debug_enums_fwd_ref = debug_enums_fwd_ref, .debug_globals_fwd_ref = debug_globals_fwd_ref, @@ -669,11 +663,10 @@ pub const Object = struct { self.* = undefined; } - fn genErrorNameTable(o: *Object) Allocator.Error!void { + fn genErrorNameTable(o: *Object, pt: Zcu.PerThread) Allocator.Error!void { // If o.error_name_table is null, then it was not referenced by any instructions. if (o.error_name_table == .none) return; - const pt = o.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -683,8 +676,8 @@ pub const Object = struct { // TODO: Address space const slice_ty = Type.slice_const_u8_sentinel_0; - const llvm_usize_ty = try o.lowerType(Type.usize); - const llvm_slice_ty = try o.lowerType(slice_ty); + const llvm_usize_ty = try o.lowerType(pt, Type.usize); + const llvm_slice_ty = try o.lowerType(pt, slice_ty); const llvm_table_ty = try o.builder.arrayType(1 + error_name_list.len, llvm_slice_ty); llvm_errors[0] = try o.builder.undefConst(llvm_slice_ty); @@ -721,11 +714,11 @@ pub const Object = struct { try o.error_name_table.setInitializer(table_variable_index.toConst(&o.builder), &o.builder); } - fn genCmpLtErrorsLenFunction(o: *Object) !void { + fn genCmpLtErrorsLenFunction(o: *Object, pt: Zcu.PerThread) !void { // If there is no such function in the module, it means the source code does not need it. const name = o.builder.strtabStringIfExists(lt_errors_fn_name) orelse return; const llvm_fn = o.builder.getGlobal(name) orelse return; - const errors_len = o.pt.zcu.intern_pool.global_error_set.getNamesFromMainThread().len; + const errors_len = pt.zcu.intern_pool.global_error_set.getNamesFromMainThread().len; var wip = try Builder.WipFunction.init(&o.builder, .{ .function = llvm_fn.ptrConst(&o.builder).kind.function, @@ -740,17 +733,17 @@ pub const Object = struct { // } const lhs = wip.arg(0); - const rhs = try o.builder.intValue(try o.errorIntType(), errors_len); + const rhs = try o.builder.intValue(try o.errorIntType(pt), errors_len); const is_lt = try wip.icmp(.ule, lhs, rhs, ""); _ = try wip.ret(is_lt); try wip.finish(); } - fn genModuleLevelAssembly(object: *Object) Allocator.Error!void { + fn genModuleLevelAssembly(object: *Object, pt: Zcu.PerThread) Allocator.Error!void { const b = &object.builder; const gpa = b.gpa; b.module_asm.clearRetainingCapacity(); - for (object.pt.zcu.global_assembly.values()) |assembly| { + for (pt.zcu.global_assembly.values()) |assembly| { try b.module_asm.ensureUnusedCapacity(gpa, assembly.len + 1); b.module_asm.appendSliceAssumeCapacity(assembly); b.module_asm.appendAssumeCapacity('\n'); @@ -776,15 +769,15 @@ pub const Object = struct { lto: std.zig.LtoMode, }; - pub fn emit(o: *Object, options: EmitOptions) error{ LinkFailure, OutOfMemory }!void { - const zcu = o.pt.zcu; + pub fn emit(o: *Object, pt: Zcu.PerThread, options: EmitOptions) error{ LinkFailure, OutOfMemory }!void { + const zcu = pt.zcu; const comp = zcu.comp; const diags = &comp.link_diags; { - try o.genErrorNameTable(); - try o.genCmpLtErrorsLenFunction(); - try o.genModuleLevelAssembly(); + try o.genErrorNameTable(pt); + try o.genCmpLtErrorsLenFunction(pt); + try o.genModuleLevelAssembly(pt); if (o.used.items.len > 0) { const array_llvm_ty = try o.builder.arrayType(o.used.items.len, .ptr); @@ -807,7 +800,7 @@ pub const Object = struct { const fwd_ref = o.debug_unresolved_namespace_scopes.values()[i]; const namespace = zcu.namespacePtr(namespace_index); - const debug_type = try o.lowerDebugType(Type.fromInterned(namespace.owner_type)); + const debug_type = try o.lowerDebugType(pt, Type.fromInterned(namespace.owner_type)); o.builder.debugForwardReferenceSetType(fwd_ref, debug_type); } @@ -1140,7 +1133,6 @@ pub const Object = struct { air: *const Air, liveness: *const Air.Liveness, ) !void { - assert(std.meta.eql(pt, o.pt)); const zcu = pt.zcu; const comp = zcu.comp; const ip = &zcu.intern_pool; @@ -1155,10 +1147,11 @@ pub const Object = struct { var ng: NavGen = .{ .object = o, .nav_index = func.owner_nav, + .pt = pt, .err_msg = null, }; - const function_index = try o.resolveLlvmFunction(func.owner_nav); + const function_index = try o.resolveLlvmFunction(pt, func.owner_nav); var attributes = try function_index.ptrConst(&o.builder).attributes.toWip(&o.builder); defer attributes.deinit(&o.builder); @@ -1272,7 +1265,7 @@ pub const Object = struct { defer args.deinit(gpa); { - var it = iterateParamTypes(o, fn_info); + var it = iterateParamTypes(o, pt, fn_info); while (try it.next()) |lowering| { try args.ensureUnusedCapacity(gpa, 1); @@ -1293,13 +1286,13 @@ pub const Object = struct { } else { args.appendAssumeCapacity(param); - try o.addByValParamAttrs(&attributes, param_ty, param_index, fn_info, llvm_arg_i); + try o.addByValParamAttrs(pt, &attributes, param_ty, param_index, fn_info, llvm_arg_i); } llvm_arg_i += 1; }, .byref => { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const param = wip.arg(llvm_arg_i); const alignment = param_ty.abiAlignment(zcu).toLlvm(); @@ -1314,7 +1307,7 @@ pub const Object = struct { }, .byref_mut => { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const param = wip.arg(llvm_arg_i); const alignment = param_ty.abiAlignment(zcu).toLlvm(); @@ -1333,7 +1326,7 @@ pub const Object = struct { const param = wip.arg(llvm_arg_i); llvm_arg_i += 1; - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const alignment = param_ty.abiAlignment(zcu).toLlvm(); const arg_ptr = try buildAllocaInner(&wip, param_llvm_ty, alignment, target); _ = try wip.store(.normal, param, arg_ptr, alignment); @@ -1372,7 +1365,7 @@ pub const Object = struct { const len_param = wip.arg(llvm_arg_i); llvm_arg_i += 1; - const slice_llvm_ty = try o.lowerType(param_ty); + const slice_llvm_ty = try o.lowerType(pt, param_ty); args.appendAssumeCapacity( try wip.buildAggregate(slice_llvm_ty, &.{ ptr_param, len_param }, ""), ); @@ -1381,7 +1374,7 @@ pub const Object = struct { assert(!it.byval_attr); const field_types = it.types_buffer[0..it.types_len]; const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const param_alignment = param_ty.abiAlignment(zcu).toLlvm(); const arg_ptr = try buildAllocaInner(&wip, param_llvm_ty, param_alignment, target); const llvm_ty = try o.builder.structType(.normal, field_types); @@ -1402,7 +1395,7 @@ pub const Object = struct { }, .float_array => { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const param = wip.arg(llvm_arg_i); llvm_arg_i += 1; @@ -1417,7 +1410,7 @@ pub const Object = struct { }, .i32_array, .i64_array => { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const param = wip.arg(llvm_arg_i); llvm_arg_i += 1; @@ -1435,11 +1428,11 @@ pub const Object = struct { } const file, const subprogram = if (!wip.strip) debug_info: { - const file = try o.getDebugFile(file_scope); + const file = try o.getDebugFile(pt, file_scope); const line_number = zcu.navSrcLine(func.owner_nav) + 1; const is_internal_linkage = ip.indexToKey(nav.status.fully_resolved.val) != .@"extern"; - const debug_decl_type = try o.lowerDebugType(fn_ty); + const debug_decl_type = try o.lowerDebugType(pt, fn_ty); const subprogram = try o.builder.debugSubprogram( file, @@ -1569,10 +1562,10 @@ pub const Object = struct { } pub fn updateNav(self: *Object, pt: Zcu.PerThread, nav_index: InternPool.Nav.Index) !void { - assert(std.meta.eql(pt, self.pt)); var ng: NavGen = .{ .object = self, .nav_index = nav_index, + .pt = pt, .err_msg = null, }; ng.genDecl() catch |err| switch (err) { @@ -1590,11 +1583,10 @@ pub const Object = struct { exported: Zcu.Exported, export_indices: []const Zcu.Export.Index, ) link.File.UpdateExportsError!void { - assert(std.meta.eql(pt, self.pt)); const zcu = pt.zcu; const nav_index = switch (exported) { .nav => |nav| nav, - .uav => |uav| return updateExportedValue(self, zcu, uav, export_indices), + .uav => |uav| return updateExportedValue(self, pt, uav, export_indices), }; const ip = &zcu.intern_pool; const global_index = self.nav_map.get(nav_index).?; @@ -1635,10 +1627,11 @@ pub const Object = struct { fn updateExportedValue( o: *Object, - zcu: *Zcu, + pt: Zcu.PerThread, exported_value: InternPool.Index, export_indices: []const Zcu.Export.Index, ) link.File.UpdateExportsError!void { + const zcu = pt.zcu; const gpa = zcu.gpa; const ip = &zcu.intern_pool; const main_exp_name = try o.builder.strtabString(export_indices[0].ptr(zcu).opts.name.toSlice(ip)); @@ -1652,13 +1645,13 @@ pub const Object = struct { const llvm_addr_space = toLlvmAddressSpace(.generic, o.target); const variable_index = try o.builder.addVariable( main_exp_name, - try o.lowerType(Type.fromInterned(ip.typeOf(exported_value))), + try o.lowerType(pt, Type.fromInterned(ip.typeOf(exported_value))), llvm_addr_space, ); const global_index = variable_index.ptrConst(&o.builder).global; gop.value_ptr.* = global_index; // This line invalidates `gop`. - const init_val = o.lowerValue(exported_value) catch |err| switch (err) { + const init_val = o.lowerValue(pt, exported_value) catch |err| switch (err) { error.OutOfMemory => return error.OutOfMemory, error.CodegenFail => return error.AnalysisFail, }; @@ -1761,14 +1754,13 @@ pub const Object = struct { } } - fn getDebugFile(o: *Object, file_index: Zcu.File.Index) Allocator.Error!Builder.Metadata { + fn getDebugFile(o: *Object, pt: Zcu.PerThread, file_index: Zcu.File.Index) Allocator.Error!Builder.Metadata { const gpa = o.gpa; const gop = try o.debug_file_map.getOrPut(gpa, file_index); errdefer assert(o.debug_file_map.remove(file_index)); if (gop.found_existing) return gop.value_ptr.*; - const zcu = o.pt.zcu; - const path = zcu.fileByIndex(file_index).path; - const abs_path = try path.toAbsolute(zcu.comp.dirs, gpa); + const path = pt.zcu.fileByIndex(file_index).path; + const abs_path = try path.toAbsolute(pt.zcu.comp.dirs, gpa); defer gpa.free(abs_path); gop.value_ptr.* = try o.builder.debugFile( @@ -1780,13 +1772,13 @@ pub const Object = struct { pub fn lowerDebugType( o: *Object, + pt: Zcu.PerThread, ty: Type, ) Allocator.Error!Builder.Metadata { assert(!o.builder.strip); const gpa = o.gpa; const target = o.target; - const pt = o.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -1806,7 +1798,7 @@ pub const Object = struct { .int => { const info = ty.intInfo(zcu); assert(info.bits != 0); - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const builder_name = try o.builder.metadataString(name); const debug_bits = ty.abiSize(zcu) * 8; // lldb cannot handle non-byte sized types @@ -1819,7 +1811,7 @@ pub const Object = struct { }, .@"enum" => { if (!ty.hasRuntimeBitsIgnoreComptime(zcu)) { - const debug_enum_type = try o.makeEmptyNamespaceDebugType(ty); + const debug_enum_type = try o.makeEmptyNamespaceDebugType(pt, ty); try o.debug_type_map.put(gpa, ty, debug_enum_type); return debug_enum_type; } @@ -1847,13 +1839,13 @@ pub const Object = struct { ); } - const file = try o.getDebugFile(ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip)); + const file = try o.getDebugFile(pt, ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip)); const scope = if (ty.getParentNamespace(zcu).unwrap()) |parent_namespace| - try o.namespaceToDebugScope(parent_namespace) + try o.namespaceToDebugScope(pt, parent_namespace) else file; - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const debug_enum_type = try o.builder.debugEnumerationType( @@ -1861,7 +1853,7 @@ pub const Object = struct { file, scope, ty.typeDeclSrcLine(zcu).? + 1, // Line - try o.lowerDebugType(int_ty), + try o.lowerDebugType(pt, int_ty), ty.abiSize(zcu) * 8, (ty.abiAlignment(zcu).toByteUnits() orelse 0) * 8, try o.builder.metadataTuple(enumerators), @@ -1873,7 +1865,7 @@ pub const Object = struct { }, .float => { const bits = ty.floatBits(target); - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const debug_float_type = try o.builder.debugFloatType( try o.builder.metadataString(name), @@ -1918,7 +1910,7 @@ pub const Object = struct { }, }, }); - const debug_ptr_type = try o.lowerDebugType(bland_ptr_ty); + const debug_ptr_type = try o.lowerDebugType(pt, bland_ptr_ty); try o.debug_type_map.put(gpa, ty, debug_ptr_type); return debug_ptr_type; } @@ -1932,7 +1924,7 @@ pub const Object = struct { const ptr_ty = ty.slicePtrFieldType(zcu); const len_ty = Type.usize; - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const line = 0; @@ -1948,7 +1940,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(ptr_ty), + try o.lowerDebugType(pt, ptr_ty), ptr_size * 8, (ptr_align.toByteUnits() orelse 0) * 8, 0, // Offset @@ -1959,7 +1951,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(len_ty), + try o.lowerDebugType(pt, len_ty), len_size * 8, (len_align.toByteUnits() orelse 0) * 8, len_offset * 8, @@ -1988,9 +1980,9 @@ pub const Object = struct { return debug_slice_type; } - const debug_elem_ty = try o.lowerDebugType(Type.fromInterned(ptr_info.child)); + const debug_elem_ty = try o.lowerDebugType(pt, Type.fromInterned(ptr_info.child)); - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const debug_ptr_type = try o.builder.debugPointerType( @@ -2022,12 +2014,12 @@ pub const Object = struct { return debug_opaque_type; } - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); - const file = try o.getDebugFile(ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip)); + const file = try o.getDebugFile(pt, ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip)); const scope = if (ty.getParentNamespace(zcu).unwrap()) |parent_namespace| - try o.namespaceToDebugScope(parent_namespace) + try o.namespaceToDebugScope(pt, parent_namespace) else file; @@ -2050,7 +2042,7 @@ pub const Object = struct { .none, // File .none, // Scope 0, // Line - try o.lowerDebugType(ty.childType(zcu)), + try o.lowerDebugType(pt, ty.childType(zcu)), ty.abiSize(zcu) * 8, (ty.abiAlignment(zcu).toByteUnits() orelse 0) * 8, try o.builder.metadataTuple(&.{ @@ -2073,7 +2065,7 @@ pub const Object = struct { .int => blk: { const info = elem_ty.intInfo(zcu); assert(info.bits != 0); - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const builder_name = try o.builder.metadataString(name); break :blk switch (info.signedness) { @@ -2085,7 +2077,7 @@ pub const Object = struct { try o.builder.metadataString("bool"), 1, ), - else => try o.lowerDebugType(ty.childType(zcu)), + else => try o.lowerDebugType(pt, ty.childType(zcu)), }; const debug_vector_type = try o.builder.debugVectorType( @@ -2108,7 +2100,7 @@ pub const Object = struct { return debug_vector_type; }, .optional => { - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const child_ty = ty.optionalChild(zcu); if (!child_ty.hasRuntimeBitsIgnoreComptime(zcu)) { @@ -2126,7 +2118,7 @@ pub const Object = struct { try o.debug_type_map.put(gpa, ty, debug_fwd_ref); if (ty.optionalReprIsPayload(zcu)) { - const debug_optional_type = try o.lowerDebugType(child_ty); + const debug_optional_type = try o.lowerDebugType(pt, child_ty); o.builder.debugForwardReferenceSetType(debug_fwd_ref, debug_optional_type); @@ -2149,7 +2141,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(child_ty), + try o.lowerDebugType(pt, child_ty), payload_size * 8, (payload_align.toByteUnits() orelse 0) * 8, 0, // Offset @@ -2160,7 +2152,7 @@ pub const Object = struct { .none, debug_fwd_ref, 0, - try o.lowerDebugType(non_null_ty), + try o.lowerDebugType(pt, non_null_ty), non_null_size * 8, (non_null_align.toByteUnits() orelse 0) * 8, non_null_offset * 8, @@ -2192,12 +2184,12 @@ pub const Object = struct { const payload_ty = ty.errorUnionPayload(zcu); if (!payload_ty.hasRuntimeBitsIgnoreComptime(zcu)) { // TODO: Maybe remove? - const debug_error_union_type = try o.lowerDebugType(Type.anyerror); + const debug_error_union_type = try o.lowerDebugType(pt, Type.anyerror); try o.debug_type_map.put(gpa, ty, debug_error_union_type); return debug_error_union_type; } - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const error_size = Type.anyerror.abiSize(zcu); @@ -2229,7 +2221,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(Type.anyerror), + try o.lowerDebugType(pt, Type.anyerror), error_size * 8, (error_align.toByteUnits() orelse 0) * 8, error_offset * 8, @@ -2239,7 +2231,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(payload_ty), + try o.lowerDebugType(pt, payload_ty), payload_size * 8, (payload_align.toByteUnits() orelse 0) * 8, payload_offset * 8, @@ -2270,7 +2262,7 @@ pub const Object = struct { return debug_error_set; }, .@"struct" => { - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); if (zcu.typeToPackedStruct(ty)) |struct_type| { @@ -2315,7 +2307,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, - try o.lowerDebugType(Type.fromInterned(field_ty)), + try o.lowerDebugType(pt, Type.fromInterned(field_ty)), field_size * 8, (field_align.toByteUnits() orelse 0) * 8, field_offset * 8, @@ -2347,7 +2339,7 @@ pub const Object = struct { // into. Therefore we can satisfy this by making an empty namespace, // rather than changing the frontend to unnecessarily resolve the // struct field types. - const debug_struct_type = try o.makeEmptyNamespaceDebugType(ty); + const debug_struct_type = try o.makeEmptyNamespaceDebugType(pt, ty); try o.debug_type_map.put(gpa, ty, debug_struct_type); return debug_struct_type; } @@ -2356,7 +2348,7 @@ pub const Object = struct { } if (!ty.hasRuntimeBitsIgnoreComptime(zcu)) { - const debug_struct_type = try o.makeEmptyNamespaceDebugType(ty); + const debug_struct_type = try o.makeEmptyNamespaceDebugType(pt, ty); try o.debug_type_map.put(gpa, ty, debug_struct_type); return debug_struct_type; } @@ -2388,7 +2380,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(field_ty), + try o.lowerDebugType(pt, field_ty), field_size * 8, (field_align.toByteUnits() orelse 0) * 8, field_offset * 8, @@ -2415,7 +2407,7 @@ pub const Object = struct { return debug_struct_type; }, .@"union" => { - const name = try o.allocTypeName(ty); + const name = try o.allocTypeName(pt, ty); defer gpa.free(name); const union_type = ip.loadUnionType(ty.toIntern()); @@ -2423,7 +2415,7 @@ pub const Object = struct { !ty.hasRuntimeBitsIgnoreComptime(zcu) or !union_type.haveLayout(ip)) { - const debug_union_type = try o.makeEmptyNamespaceDebugType(ty); + const debug_union_type = try o.makeEmptyNamespaceDebugType(pt, ty); try o.debug_type_map.put(gpa, ty, debug_union_type); return debug_union_type; } @@ -2445,7 +2437,7 @@ pub const Object = struct { ty.abiSize(zcu) * 8, (ty.abiAlignment(zcu).toByteUnits() orelse 0) * 8, try o.builder.metadataTuple( - &.{try o.lowerDebugType(Type.fromInterned(union_type.enum_tag_ty))}, + &.{try o.lowerDebugType(pt, Type.fromInterned(union_type.enum_tag_ty))}, ), ); @@ -2484,7 +2476,7 @@ pub const Object = struct { .none, // File debug_union_fwd_ref, 0, // Line - try o.lowerDebugType(Type.fromInterned(field_ty)), + try o.lowerDebugType(pt, Type.fromInterned(field_ty)), field_size * 8, (field_align.toByteUnits() orelse 0) * 8, 0, // Offset @@ -2534,7 +2526,7 @@ pub const Object = struct { .none, // File debug_fwd_ref, 0, // Line - try o.lowerDebugType(Type.fromInterned(union_type.enum_tag_ty)), + try o.lowerDebugType(pt, Type.fromInterned(union_type.enum_tag_ty)), layout.tag_size * 8, (layout.tag_align.toByteUnits() orelse 0) * 8, tag_offset * 8, @@ -2588,19 +2580,19 @@ pub const Object = struct { if (Type.fromInterned(fn_info.return_type).hasRuntimeBitsIgnoreComptime(zcu)) { const sret = firstParamSRet(fn_info, zcu, target); const ret_ty = if (sret) Type.void else Type.fromInterned(fn_info.return_type); - debug_param_types.appendAssumeCapacity(try o.lowerDebugType(ret_ty)); + debug_param_types.appendAssumeCapacity(try o.lowerDebugType(pt, ret_ty)); if (sret) { const ptr_ty = try pt.singleMutPtrType(Type.fromInterned(fn_info.return_type)); - debug_param_types.appendAssumeCapacity(try o.lowerDebugType(ptr_ty)); + debug_param_types.appendAssumeCapacity(try o.lowerDebugType(pt, ptr_ty)); } } else { - debug_param_types.appendAssumeCapacity(try o.lowerDebugType(Type.void)); + debug_param_types.appendAssumeCapacity(try o.lowerDebugType(pt, Type.void)); } if (fn_info.cc == .auto and zcu.comp.config.any_error_tracing) { - const ptr_ty = try pt.singleMutPtrType(try o.getStackTraceType()); - debug_param_types.appendAssumeCapacity(try o.lowerDebugType(ptr_ty)); + // Stack trace pointer. + debug_param_types.appendAssumeCapacity(try o.lowerDebugType(pt, .fromInterned(.ptr_usize_type))); } for (0..fn_info.param_types.len) |i| { @@ -2609,9 +2601,9 @@ pub const Object = struct { if (isByRef(param_ty, zcu)) { const ptr_ty = try pt.singleMutPtrType(param_ty); - debug_param_types.appendAssumeCapacity(try o.lowerDebugType(ptr_ty)); + debug_param_types.appendAssumeCapacity(try o.lowerDebugType(pt, ptr_ty)); } else { - debug_param_types.appendAssumeCapacity(try o.lowerDebugType(param_ty)); + debug_param_types.appendAssumeCapacity(try o.lowerDebugType(pt, param_ty)); } } @@ -2634,10 +2626,10 @@ pub const Object = struct { } } - fn namespaceToDebugScope(o: *Object, namespace_index: InternPool.NamespaceIndex) !Builder.Metadata { - const zcu = o.pt.zcu; + fn namespaceToDebugScope(o: *Object, pt: Zcu.PerThread, namespace_index: InternPool.NamespaceIndex) !Builder.Metadata { + const zcu = pt.zcu; const namespace = zcu.namespacePtr(namespace_index); - if (namespace.parent == .none) return try o.getDebugFile(namespace.file_scope); + if (namespace.parent == .none) return try o.getDebugFile(pt, namespace.file_scope); const gop = try o.debug_unresolved_namespace_scopes.getOrPut(o.gpa, namespace_index); @@ -2646,12 +2638,12 @@ pub const Object = struct { return gop.value_ptr.*; } - fn makeEmptyNamespaceDebugType(o: *Object, ty: Type) !Builder.Metadata { - const zcu = o.pt.zcu; + fn makeEmptyNamespaceDebugType(o: *Object, pt: Zcu.PerThread, ty: Type) !Builder.Metadata { + const zcu = pt.zcu; const ip = &zcu.intern_pool; - const file = try o.getDebugFile(ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip)); + const file = try o.getDebugFile(pt, ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip)); const scope = if (ty.getParentNamespace(zcu).unwrap()) |parent_namespace| - try o.namespaceToDebugScope(parent_namespace) + try o.namespaceToDebugScope(pt, parent_namespace) else file; return o.builder.debugStructType( @@ -2666,31 +2658,10 @@ pub const Object = struct { ); } - fn getStackTraceType(o: *Object) Allocator.Error!Type { - const pt = o.pt; - const zcu = pt.zcu; - const ip = &zcu.intern_pool; - - const std_file_index = zcu.module_roots.get(zcu.std_mod).?.unwrap().?; - const builtin_str = try ip.getOrPutString(zcu.gpa, pt.tid, "builtin", .no_embedded_nulls); - const std_file_root_type = Type.fromInterned(zcu.fileRootType(std_file_index)); - const std_namespace = ip.namespacePtr(std_file_root_type.getNamespaceIndex(zcu)); - const builtin_nav = std_namespace.pub_decls.getKeyAdapted(builtin_str, Zcu.Namespace.NameAdapter{ .zcu = zcu }).?; - - const stack_trace_str = try ip.getOrPutString(zcu.gpa, pt.tid, "StackTrace", .no_embedded_nulls); - // buffer is only used for int_type, `builtin` is a struct. - const builtin_ty = zcu.navValue(builtin_nav).toType(); - const builtin_namespace = zcu.namespacePtr(builtin_ty.getNamespaceIndex(zcu)); - const stack_trace_nav = builtin_namespace.pub_decls.getKeyAdapted(stack_trace_str, Zcu.Namespace.NameAdapter{ .zcu = zcu }).?; - - // Sema should have ensured that StackTrace was analyzed. - return zcu.navValue(stack_trace_nav).toType(); - } - - fn allocTypeName(o: *Object, ty: Type) Allocator.Error![:0]const u8 { + fn allocTypeName(o: *Object, pt: Zcu.PerThread, ty: Type) Allocator.Error![:0]const u8 { var aw: std.io.Writer.Allocating = .init(o.gpa); defer aw.deinit(); - ty.print(&aw.writer, o.pt) catch |err| switch (err) { + ty.print(&aw.writer, pt) catch |err| switch (err) { error.WriteFailed => return error.OutOfMemory, }; return aw.toOwnedSliceSentinel(0); @@ -2701,9 +2672,9 @@ pub const Object = struct { /// completed, so if any attributes rely on that, they must be done in updateFunc, not here. fn resolveLlvmFunction( o: *Object, + pt: Zcu.PerThread, nav_index: InternPool.Nav.Index, ) Allocator.Error!Builder.Function.Index { - const pt = o.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const gpa = o.gpa; @@ -2722,7 +2693,7 @@ pub const Object = struct { else .{ false, .none }; const function_index = try o.builder.addFunction( - try o.lowerType(ty), + try o.lowerType(pt, ty), try o.builder.strtabString((if (is_extern) nav.name else nav.fqn).toSlice(ip)), toLlvmAddressSpace(nav.getAddrspace(), target), ); @@ -2755,7 +2726,7 @@ pub const Object = struct { try attributes.addParamAttr(llvm_arg_i, .nonnull, &o.builder); try attributes.addParamAttr(llvm_arg_i, .@"noalias", &o.builder); - const raw_llvm_ret_ty = try o.lowerType(Type.fromInterned(fn_info.return_type)); + const raw_llvm_ret_ty = try o.lowerType(pt, Type.fromInterned(fn_info.return_type)); try attributes.addParamAttr(llvm_arg_i, .{ .sret = raw_llvm_ret_ty }, &o.builder); llvm_arg_i += 1; @@ -2862,19 +2833,19 @@ pub const Object = struct { // Add parameter attributes. We handle only the case of extern functions (no body) // because functions with bodies are handled in `updateFunc`. if (is_extern) { - var it = iterateParamTypes(o, fn_info); + var it = iterateParamTypes(o, pt, fn_info); it.llvm_index = llvm_arg_i; while (try it.next()) |lowering| switch (lowering) { .byval => { const param_index = it.zig_index - 1; const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[param_index]); if (!isByRef(param_ty, zcu)) { - try o.addByValParamAttrs(&attributes, param_ty, param_index, fn_info, it.llvm_index - 1); + try o.addByValParamAttrs(pt, &attributes, param_ty, param_index, fn_info, it.llvm_index - 1); } }, .byref => { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const alignment = param_ty.abiAlignment(zcu); try o.addByRefParamAttrs(&attributes, it.llvm_index - 1, alignment.toLlvm(), it.byval_attr, param_llvm_ty); }, @@ -2969,6 +2940,7 @@ pub const Object = struct { fn resolveGlobalUav( o: *Object, + pt: Zcu.PerThread, uav: InternPool.Index, llvm_addr_space: Builder.AddrSpace, alignment: InternPool.Alignment, @@ -2986,17 +2958,17 @@ pub const Object = struct { } errdefer assert(o.uav_map.remove(uav)); - const zcu = o.pt.zcu; + const zcu = pt.zcu; const decl_ty = zcu.intern_pool.typeOf(uav); const variable_index = try o.builder.addVariable( try o.builder.strtabStringFmt("__anon_{d}", .{@intFromEnum(uav)}), - try o.lowerType(Type.fromInterned(decl_ty)), + try o.lowerType(pt, Type.fromInterned(decl_ty)), llvm_addr_space, ); gop.value_ptr.* = variable_index.ptrConst(&o.builder).global; - try variable_index.setInitializer(try o.lowerValue(uav), &o.builder); + try variable_index.setInitializer(try o.lowerValue(pt, uav), &o.builder); variable_index.setLinkage(.internal, &o.builder); variable_index.setMutability(.constant, &o.builder); variable_index.setUnnamedAddr(.unnamed_addr, &o.builder); @@ -3006,13 +2978,13 @@ pub const Object = struct { fn resolveGlobalNav( o: *Object, + pt: Zcu.PerThread, nav_index: InternPool.Nav.Index, ) Allocator.Error!Builder.Variable.Index { const gop = try o.nav_map.getOrPut(o.gpa, nav_index); if (gop.found_existing) return gop.value_ptr.ptr(&o.builder).kind.variable; errdefer assert(o.nav_map.remove(nav_index)); - const pt = o.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const nav = ip.getNav(nav_index); @@ -3033,7 +3005,7 @@ pub const Object = struct { .strong, .weak => nav.name, .link_once => unreachable, }.toSlice(ip)), - try o.lowerType(Type.fromInterned(nav.typeOf(ip))), + try o.lowerType(pt, Type.fromInterned(nav.typeOf(ip))), toLlvmGlobalAddressSpace(nav.getAddrspace(), zcu.getTarget()), ); gop.value_ptr.* = variable_index.ptrConst(&o.builder).global; @@ -3062,12 +3034,11 @@ pub const Object = struct { return variable_index; } - fn errorIntType(o: *Object) Allocator.Error!Builder.Type { - return o.builder.intType(o.pt.zcu.errorSetBits()); + fn errorIntType(o: *Object, pt: Zcu.PerThread) Allocator.Error!Builder.Type { + return o.builder.intType(pt.zcu.errorSetBits()); } - fn lowerType(o: *Object, t: Type) Allocator.Error!Builder.Type { - const pt = o.pt; + fn lowerType(o: *Object, pt: Zcu.PerThread, t: Type) Allocator.Error!Builder.Type { const zcu = pt.zcu; const target = zcu.getTarget(); const ip = &zcu.intern_pool; @@ -3123,7 +3094,7 @@ pub const Object = struct { .bool_type => .i1, .void_type => .void, .type_type => unreachable, - .anyerror_type => try o.errorIntType(), + .anyerror_type => try o.errorIntType(pt), .comptime_int_type, .comptime_float_type, .noreturn_type, @@ -3141,11 +3112,11 @@ pub const Object = struct { => .ptr, .slice_const_u8_type, .slice_const_u8_sentinel_0_type, - => try o.builder.structType(.normal, &.{ .ptr, try o.lowerType(Type.usize) }), + => try o.builder.structType(.normal, &.{ .ptr, try o.lowerType(pt, Type.usize) }), .optional_noreturn_type => unreachable, .anyerror_void_error_union_type, .adhoc_inferred_error_set_type, - => try o.errorIntType(), + => try o.errorIntType(pt), .generic_poison_type, .empty_tuple_type, => unreachable, @@ -3182,24 +3153,24 @@ pub const Object = struct { .one, .many, .c => ptr_ty, .slice => try o.builder.structType(.normal, &.{ ptr_ty, - try o.lowerType(Type.usize), + try o.lowerType(pt, Type.usize), }), }; }, .array_type => |array_type| o.builder.arrayType( array_type.lenIncludingSentinel(), - try o.lowerType(Type.fromInterned(array_type.child)), + try o.lowerType(pt, Type.fromInterned(array_type.child)), ), .vector_type => |vector_type| o.builder.vectorType( .normal, vector_type.len, - try o.lowerType(Type.fromInterned(vector_type.child)), + try o.lowerType(pt, Type.fromInterned(vector_type.child)), ), .opt_type => |child_ty| { // Must stay in sync with `opt_payload` logic in `lowerPtr`. if (!Type.fromInterned(child_ty).hasRuntimeBitsIgnoreComptime(zcu)) return .i8; - const payload_ty = try o.lowerType(Type.fromInterned(child_ty)); + const payload_ty = try o.lowerType(pt, Type.fromInterned(child_ty)); if (t.optionalReprIsPayload(zcu)) return payload_ty; comptime assert(optional_layout_version == 3); @@ -3218,17 +3189,16 @@ pub const Object = struct { .error_union_type => |error_union_type| { // Must stay in sync with `codegen.errUnionPayloadOffset`. // See logic in `lowerPtr`. - const error_type = try o.errorIntType(); + const error_type = try o.errorIntType(pt); if (!Type.fromInterned(error_union_type.payload_type).hasRuntimeBitsIgnoreComptime(zcu)) return error_type; - const payload_type = try o.lowerType(Type.fromInterned(error_union_type.payload_type)); - const err_int_ty = try o.pt.errorIntType(); + const payload_type = try o.lowerType(pt, Type.fromInterned(error_union_type.payload_type)); const payload_align = Type.fromInterned(error_union_type.payload_type).abiAlignment(zcu); - const error_align = err_int_ty.abiAlignment(zcu); + const error_align: InternPool.Alignment = .fromByteUnits(std.zig.target.intAlignment(target, zcu.errorSetBits())); const payload_size = Type.fromInterned(error_union_type.payload_type).abiSize(zcu); - const error_size = err_int_ty.abiSize(zcu); + const error_size = std.zig.target.intByteSize(target, zcu.errorSetBits()); var fields: [3]Builder.Type = undefined; var fields_len: usize = 2; @@ -3262,7 +3232,7 @@ pub const Object = struct { const struct_type = ip.loadStructType(t.toIntern()); if (struct_type.layout == .@"packed") { - const int_ty = try o.lowerType(Type.fromInterned(struct_type.backingIntTypeUnordered(ip))); + const int_ty = try o.lowerType(pt, Type.fromInterned(struct_type.backingIntTypeUnordered(ip))); try o.type_map.put(o.gpa, t.toIntern(), int_ty); return int_ty; } @@ -3312,7 +3282,7 @@ pub const Object = struct { .struct_ty = t.toIntern(), .field_index = field_index, }, @intCast(llvm_field_types.items.len)); - try llvm_field_types.append(o.gpa, try o.lowerType(field_ty)); + try llvm_field_types.append(o.gpa, try o.lowerType(pt, field_ty)); offset += field_ty.abiSize(zcu); } @@ -3382,7 +3352,7 @@ pub const Object = struct { .struct_ty = t.toIntern(), .field_index = @intCast(field_index), }, @intCast(llvm_field_types.items.len)); - try llvm_field_types.append(o.gpa, try o.lowerType(Type.fromInterned(field_ty))); + try llvm_field_types.append(o.gpa, try o.lowerType(pt, Type.fromInterned(field_ty))); offset += Type.fromInterned(field_ty).abiSize(zcu); } @@ -3410,13 +3380,13 @@ pub const Object = struct { } if (layout.payload_size == 0) { - const enum_tag_ty = try o.lowerType(Type.fromInterned(union_obj.enum_tag_ty)); + const enum_tag_ty = try o.lowerType(pt, Type.fromInterned(union_obj.enum_tag_ty)); try o.type_map.put(o.gpa, t.toIntern(), enum_tag_ty); return enum_tag_ty; } const aligned_field_ty = Type.fromInterned(union_obj.field_types.get(ip)[layout.most_aligned_field]); - const aligned_field_llvm_ty = try o.lowerType(aligned_field_ty); + const aligned_field_llvm_ty = try o.lowerType(pt, aligned_field_ty); const payload_ty = ty: { if (layout.most_aligned_field_size == layout.payload_size) { @@ -3442,7 +3412,7 @@ pub const Object = struct { ); return ty; } - const enum_tag_ty = try o.lowerType(Type.fromInterned(union_obj.enum_tag_ty)); + const enum_tag_ty = try o.lowerType(pt, Type.fromInterned(union_obj.enum_tag_ty)); // Put the tag before or after the payload depending on which one's // alignment is greater. @@ -3477,9 +3447,9 @@ pub const Object = struct { } return gop.value_ptr.*; }, - .enum_type => try o.lowerType(Type.fromInterned(ip.loadEnumType(t.toIntern()).tag_ty)), - .func_type => |func_type| try o.lowerTypeFn(func_type), - .error_set_type, .inferred_error_set_type => try o.errorIntType(), + .enum_type => try o.lowerType(pt, Type.fromInterned(ip.loadEnumType(t.toIntern()).tag_ty)), + .func_type => |func_type| try o.lowerTypeFn(pt, func_type), + .error_set_type, .inferred_error_set_type => try o.errorIntType(pt), // values, not types .undef, .simple_value, @@ -3508,8 +3478,7 @@ pub const Object = struct { /// Use this instead of lowerType when you want to handle correctly the case of elem_ty /// being a zero bit type, but it should still be lowered as an i8 in such case. /// There are other similar cases handled here as well. - fn lowerPtrElemTy(o: *Object, elem_ty: Type) Allocator.Error!Builder.Type { - const pt = o.pt; + fn lowerPtrElemTy(o: *Object, pt: Zcu.PerThread, elem_ty: Type) Allocator.Error!Builder.Type { const zcu = pt.zcu; const lower_elem_ty = switch (elem_ty.zigTypeTag(zcu)) { .@"opaque" => true, @@ -3517,15 +3486,14 @@ pub const Object = struct { .array => elem_ty.childType(zcu).hasRuntimeBitsIgnoreComptime(zcu), else => elem_ty.hasRuntimeBitsIgnoreComptime(zcu), }; - return if (lower_elem_ty) try o.lowerType(elem_ty) else .i8; + return if (lower_elem_ty) try o.lowerType(pt, elem_ty) else .i8; } - fn lowerTypeFn(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { - const pt = o.pt; + fn lowerTypeFn(o: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { const zcu = pt.zcu; const ip = &zcu.intern_pool; const target = zcu.getTarget(); - const ret_ty = try lowerFnRetTy(o, fn_info); + const ret_ty = try lowerFnRetTy(o, pt, fn_info); var llvm_params: std.ArrayListUnmanaged(Builder.Type) = .empty; defer llvm_params.deinit(o.gpa); @@ -3535,16 +3503,17 @@ pub const Object = struct { } if (fn_info.cc == .auto and zcu.comp.config.any_error_tracing) { - const ptr_ty = try pt.singleMutPtrType(try o.getStackTraceType()); - try llvm_params.append(o.gpa, try o.lowerType(ptr_ty)); + const stack_trace_ty = zcu.builtin_decl_values.get(.StackTrace); + const ptr_ty = try pt.ptrType(.{ .child = stack_trace_ty }); + try llvm_params.append(o.gpa, try o.lowerType(pt, ptr_ty)); } - var it = iterateParamTypes(o, fn_info); + var it = iterateParamTypes(o, pt, fn_info); while (try it.next()) |lowering| switch (lowering) { .no_bits => continue, .byval => { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - try llvm_params.append(o.gpa, try o.lowerType(param_ty)); + try llvm_params.append(o.gpa, try o.lowerType(pt, param_ty)); }, .byref, .byref_mut => { try llvm_params.append(o.gpa, .ptr); @@ -3559,7 +3528,7 @@ pub const Object = struct { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); try llvm_params.appendSlice(o.gpa, &.{ try o.builder.ptrType(toLlvmAddressSpace(param_ty.ptrAddressSpace(zcu), target)), - try o.lowerType(Type.usize), + try o.lowerType(pt, Type.usize), }); }, .multiple_llvm_types => { @@ -3567,7 +3536,7 @@ pub const Object = struct { }, .float_array => |count| { const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[it.zig_index - 1]); - const float_ty = try o.lowerType(aarch64_c_abi.getFloatArrayType(param_ty, zcu).?); + const float_ty = try o.lowerType(pt, aarch64_c_abi.getFloatArrayType(param_ty, zcu).?); try llvm_params.append(o.gpa, try o.builder.arrayType(count, float_ty)); }, .i32_array, .i64_array => |arr_len| { @@ -3586,8 +3555,7 @@ pub const Object = struct { ); } - fn lowerValueToInt(o: *Object, llvm_int_ty: Builder.Type, arg_val: InternPool.Index) Error!Builder.Constant { - const pt = o.pt; + fn lowerValueToInt(o: *Object, pt: Zcu.PerThread, llvm_int_ty: Builder.Type, arg_val: InternPool.Index) Error!Builder.Constant { const zcu = pt.zcu; const ip = &zcu.intern_pool; const target = zcu.getTarget(); @@ -3600,23 +3568,23 @@ pub const Object = struct { const ty = Type.fromInterned(val_key.typeOf()); switch (val_key) { .@"extern" => |@"extern"| { - const function_index = try o.resolveLlvmFunction(@"extern".owner_nav); + const function_index = try o.resolveLlvmFunction(pt, @"extern".owner_nav); const ptr = function_index.ptrConst(&o.builder).global.toConst(); return o.builder.convConst(ptr, llvm_int_ty); }, .func => |func| { - const function_index = try o.resolveLlvmFunction(func.owner_nav); + const function_index = try o.resolveLlvmFunction(pt, func.owner_nav); const ptr = function_index.ptrConst(&o.builder).global.toConst(); return o.builder.convConst(ptr, llvm_int_ty); }, - .ptr => return o.builder.convConst(try o.lowerPtr(arg_val, 0), llvm_int_ty), + .ptr => return o.builder.convConst(try o.lowerPtr(pt, arg_val, 0), llvm_int_ty), .aggregate => switch (ip.indexToKey(ty.toIntern())) { .struct_type, .vector_type => {}, else => unreachable, }, .un => |un| { const layout = ty.unionGetLayout(zcu); - if (layout.payload_size == 0) return o.lowerValue(un.tag); + if (layout.payload_size == 0) return o.lowerValue(pt, un.tag); const union_obj = zcu.typeToUnion(ty).?; const container_layout = union_obj.flagsUnordered(ip).layout; @@ -3626,7 +3594,7 @@ pub const Object = struct { var need_unnamed = false; if (un.tag == .none) { assert(layout.tag_size == 0); - const union_val = try o.lowerValueToInt(llvm_int_ty, un.val); + const union_val = try o.lowerValueToInt(pt, llvm_int_ty, un.val); need_unnamed = true; return union_val; @@ -3634,7 +3602,7 @@ pub const Object = struct { const field_index = zcu.unionTagFieldIndex(union_obj, Value.fromInterned(un.tag)).?; const field_ty = Type.fromInterned(union_obj.field_types.get(ip)[field_index]); if (!field_ty.hasRuntimeBits(zcu)) return o.builder.intConst(llvm_int_ty, 0); - return o.lowerValueToInt(llvm_int_ty, un.val); + return o.lowerValueToInt(pt, llvm_int_ty, un.val); }, .simple_value => |simple_value| switch (simple_value) { .false, .true => {}, @@ -3678,8 +3646,7 @@ pub const Object = struct { }); } - fn lowerValue(o: *Object, arg_val: InternPool.Index) Error!Builder.Constant { - const pt = o.pt; + fn lowerValue(o: *Object, pt: Zcu.PerThread, arg_val: InternPool.Index) Error!Builder.Constant { const zcu = pt.zcu; const ip = &zcu.intern_pool; const target = zcu.getTarget(); @@ -3688,7 +3655,7 @@ pub const Object = struct { const val_key = ip.indexToKey(val.toIntern()); if (val.isUndefDeep(zcu)) { - return o.builder.undefConst(try o.lowerType(Type.fromInterned(val_key.typeOf()))); + return o.builder.undefConst(try o.lowerType(pt, Type.fromInterned(val_key.typeOf()))); } const ty = Type.fromInterned(val_key.typeOf()); @@ -3727,21 +3694,21 @@ pub const Object = struct { .empty_enum_value, => unreachable, // non-runtime values .@"extern" => |@"extern"| { - const function_index = try o.resolveLlvmFunction(@"extern".owner_nav); + const function_index = try o.resolveLlvmFunction(pt, @"extern".owner_nav); return function_index.ptrConst(&o.builder).global.toConst(); }, .func => |func| { - const function_index = try o.resolveLlvmFunction(func.owner_nav); + const function_index = try o.resolveLlvmFunction(pt, func.owner_nav); return function_index.ptrConst(&o.builder).global.toConst(); }, .int => { var bigint_space: Value.BigIntSpace = undefined; const bigint = val.toBigInt(&bigint_space, zcu); - return lowerBigInt(o, ty, bigint); + return lowerBigInt(o, pt, ty, bigint); }, .err => |err| { const int = try pt.getErrorValue(err.name); - const llvm_int = try o.builder.intConst(try o.errorIntType(), int); + const llvm_int = try o.builder.intConst(try o.errorIntType(pt), int); return llvm_int; }, .error_union => |error_union| { @@ -3756,13 +3723,13 @@ pub const Object = struct { const payload_type = ty.errorUnionPayload(zcu); if (!payload_type.hasRuntimeBitsIgnoreComptime(zcu)) { // We use the error type directly as the type. - return o.lowerValue(err_val); + return o.lowerValue(pt, err_val); } const payload_align = payload_type.abiAlignment(zcu); const error_align = err_int_ty.abiAlignment(zcu); - const llvm_error_value = try o.lowerValue(err_val); - const llvm_payload_value = try o.lowerValue(switch (error_union.val) { + const llvm_error_value = try o.lowerValue(pt, err_val); + const llvm_payload_value = try o.lowerValue(pt, switch (error_union.val) { .err_name => try pt.intern(.{ .undef = payload_type.toIntern() }), .payload => |payload| payload, }); @@ -3779,7 +3746,7 @@ pub const Object = struct { fields[0] = vals[0].typeOf(&o.builder); fields[1] = vals[1].typeOf(&o.builder); - const llvm_ty = try o.lowerType(ty); + const llvm_ty = try o.lowerType(pt, ty); const llvm_ty_fields = llvm_ty.structFields(&o.builder); if (llvm_ty_fields.len > 2) { assert(llvm_ty_fields.len == 3); @@ -3791,7 +3758,7 @@ pub const Object = struct { fields[0..llvm_ty_fields.len], ), vals[0..llvm_ty_fields.len]); }, - .enum_tag => |enum_tag| o.lowerValue(enum_tag.int), + .enum_tag => |enum_tag| o.lowerValue(pt, enum_tag.int), .float => switch (ty.floatBits(target)) { 16 => if (backendSupportsF16(target)) try o.builder.halfConst(val.toFloat(f16, zcu)) @@ -3806,10 +3773,10 @@ pub const Object = struct { 128 => try o.builder.fp128Const(val.toFloat(f128, zcu)), else => unreachable, }, - .ptr => try o.lowerPtr(arg_val, 0), - .slice => |slice| return o.builder.structConst(try o.lowerType(ty), &.{ - try o.lowerValue(slice.ptr), - try o.lowerValue(slice.len), + .ptr => try o.lowerPtr(pt, arg_val, 0), + .slice => |slice| return o.builder.structConst(try o.lowerType(pt, ty), &.{ + try o.lowerValue(pt, slice.ptr), + try o.lowerValue(pt, slice.len), }), .opt => |opt| { comptime assert(optional_layout_version == 3); @@ -3819,7 +3786,7 @@ pub const Object = struct { if (!payload_ty.hasRuntimeBitsIgnoreComptime(zcu)) { return non_null_bit; } - const llvm_ty = try o.lowerType(ty); + const llvm_ty = try o.lowerType(pt, ty); if (ty.optionalReprIsPayload(zcu)) return switch (opt.val) { .none => switch (llvm_ty.tag(&o.builder)) { .integer => try o.builder.intConst(llvm_ty, 0), @@ -3827,13 +3794,13 @@ pub const Object = struct { .structure => try o.builder.zeroInitConst(llvm_ty), else => unreachable, }, - else => |payload| try o.lowerValue(payload), + else => |payload| try o.lowerValue(pt, payload), }; assert(payload_ty.zigTypeTag(zcu) != .@"fn"); var fields: [3]Builder.Type = undefined; var vals: [3]Builder.Constant = undefined; - vals[0] = try o.lowerValue(switch (opt.val) { + vals[0] = try o.lowerValue(pt, switch (opt.val) { .none => try pt.intern(.{ .undef = payload_ty.toIntern() }), else => |payload| payload, }); @@ -3858,7 +3825,7 @@ pub const Object = struct { bytes.toSlice(array_type.lenIncludingSentinel(), ip), )), .elems => |elems| { - const array_ty = try o.lowerType(ty); + const array_ty = try o.lowerType(pt, ty); const elem_ty = array_ty.childType(&o.builder); assert(elems.len == array_ty.aggregateLen(&o.builder)); @@ -3878,7 +3845,7 @@ pub const Object = struct { var need_unnamed = false; for (vals, fields, elems) |*result_val, *result_field, elem| { - result_val.* = try o.lowerValue(elem); + result_val.* = try o.lowerValue(pt, elem); result_field.* = result_val.typeOf(&o.builder); if (result_field.* != elem_ty) need_unnamed = true; } @@ -3890,7 +3857,7 @@ pub const Object = struct { .repeated_elem => |elem| { const len: usize = @intCast(array_type.len); const len_including_sentinel: usize = @intCast(array_type.lenIncludingSentinel()); - const array_ty = try o.lowerType(ty); + const array_ty = try o.lowerType(pt, ty); const elem_ty = array_ty.childType(&o.builder); const ExpectedContents = extern struct { @@ -3908,12 +3875,12 @@ pub const Object = struct { defer allocator.free(fields); var need_unnamed = false; - @memset(vals[0..len], try o.lowerValue(elem)); + @memset(vals[0..len], try o.lowerValue(pt, elem)); @memset(fields[0..len], vals[0].typeOf(&o.builder)); if (fields[0] != elem_ty) need_unnamed = true; if (array_type.sentinel != .none) { - vals[len] = try o.lowerValue(array_type.sentinel); + vals[len] = try o.lowerValue(pt, array_type.sentinel); fields[len] = vals[len].typeOf(&o.builder); if (fields[len] != elem_ty) need_unnamed = true; } @@ -3925,7 +3892,7 @@ pub const Object = struct { }, }, .vector_type => |vector_type| { - const vector_ty = try o.lowerType(ty); + const vector_ty = try o.lowerType(pt, ty); switch (aggregate.storage) { .bytes, .elems => { const ExpectedContents = [Builder.expected_fields_len]Builder.Constant; @@ -3942,7 +3909,7 @@ pub const Object = struct { result_val.* = try o.builder.intConst(.i8, byte); }, .elems => |elems| for (vals, elems) |*result_val, elem| { - result_val.* = try o.lowerValue(elem); + result_val.* = try o.lowerValue(pt, elem); }, .repeated_elem => unreachable, } @@ -3950,12 +3917,12 @@ pub const Object = struct { }, .repeated_elem => |elem| return o.builder.splatConst( vector_ty, - try o.lowerValue(elem), + try o.lowerValue(pt, elem), ), } }, .tuple_type => |tuple| { - const struct_ty = try o.lowerType(ty); + const struct_ty = try o.lowerType(pt, ty); const llvm_len = struct_ty.aggregateLen(&o.builder); const ExpectedContents = extern struct { @@ -4001,7 +3968,7 @@ pub const Object = struct { } vals[llvm_index] = - try o.lowerValue((try val.fieldValue(pt, field_index)).toIntern()); + try o.lowerValue(pt, (try val.fieldValue(pt, field_index)).toIntern()); fields[llvm_index] = vals[llvm_index].typeOf(&o.builder); if (fields[llvm_index] != struct_ty.structFields(&o.builder)[llvm_index]) need_unnamed = true; @@ -4030,14 +3997,14 @@ pub const Object = struct { .struct_type => { const struct_type = ip.loadStructType(ty.toIntern()); assert(struct_type.haveLayout(ip)); - const struct_ty = try o.lowerType(ty); + const struct_ty = try o.lowerType(pt, ty); if (struct_type.layout == .@"packed") { comptime assert(Type.packed_struct_layout_version == 2); const bits = ty.bitSize(zcu); const llvm_int_ty = try o.builder.intType(@intCast(bits)); - return o.lowerValueToInt(llvm_int_ty, arg_val); + return o.lowerValueToInt(pt, llvm_int_ty, arg_val); } const llvm_len = struct_ty.aggregateLen(&o.builder); @@ -4085,6 +4052,7 @@ pub const Object = struct { } vals[llvm_index] = try o.lowerValue( + pt, (try val.fieldValue(pt, field_index)).toIntern(), ); fields[llvm_index] = vals[llvm_index].typeOf(&o.builder); @@ -4115,9 +4083,9 @@ pub const Object = struct { else => unreachable, }, .un => |un| { - const union_ty = try o.lowerType(ty); + const union_ty = try o.lowerType(pt, ty); const layout = ty.unionGetLayout(zcu); - if (layout.payload_size == 0) return o.lowerValue(un.tag); + if (layout.payload_size == 0) return o.lowerValue(pt, un.tag); const union_obj = zcu.typeToUnion(ty).?; const container_layout = union_obj.flagsUnordered(ip).layout; @@ -4131,7 +4099,7 @@ pub const Object = struct { const bits = ty.bitSize(zcu); const llvm_int_ty = try o.builder.intType(@intCast(bits)); - return o.lowerValueToInt(llvm_int_ty, arg_val); + return o.lowerValueToInt(pt, llvm_int_ty, arg_val); } // Sometimes we must make an unnamed struct because LLVM does @@ -4144,7 +4112,7 @@ pub const Object = struct { const padding_len = layout.payload_size; break :p try o.builder.undefConst(try o.builder.arrayType(padding_len, .i8)); } - const payload = try o.lowerValue(un.val); + const payload = try o.lowerValue(pt, un.val); const payload_ty = payload.typeOf(&o.builder); if (payload_ty != union_ty.structFields(&o.builder)[ @intFromBool(layout.tag_align.compare(.gte, layout.payload_align)) @@ -4163,10 +4131,10 @@ pub const Object = struct { const bits = ty.bitSize(zcu); const llvm_int_ty = try o.builder.intType(@intCast(bits)); - return o.lowerValueToInt(llvm_int_ty, arg_val); + return o.lowerValueToInt(pt, llvm_int_ty, arg_val); } - const union_val = try o.lowerValue(un.val); + const union_val = try o.lowerValue(pt, un.val); need_unnamed = true; break :p union_val; }; @@ -4176,7 +4144,7 @@ pub const Object = struct { try o.builder.structType(union_ty.structKind(&o.builder), &.{payload_ty}) else union_ty, &.{payload}); - const tag = try o.lowerValue(un.tag); + const tag = try o.lowerValue(pt, un.tag); const tag_ty = tag.typeOf(&o.builder); var fields: [3]Builder.Type = undefined; var vals: [3]Builder.Constant = undefined; @@ -4204,48 +4172,50 @@ pub const Object = struct { fn lowerBigInt( o: *Object, + pt: Zcu.PerThread, ty: Type, bigint: std.math.big.int.Const, ) Allocator.Error!Builder.Constant { - const zcu = o.pt.zcu; + const zcu = pt.zcu; return o.builder.bigIntConst(try o.builder.intType(ty.intInfo(zcu).bits), bigint); } fn lowerPtr( o: *Object, + pt: Zcu.PerThread, ptr_val: InternPool.Index, prev_offset: u64, ) Error!Builder.Constant { - const pt = o.pt; const zcu = pt.zcu; const ptr = zcu.intern_pool.indexToKey(ptr_val).ptr; const offset: u64 = prev_offset + ptr.byte_offset; return switch (ptr.base_addr) { .nav => |nav| { - const base_ptr = try o.lowerNavRefValue(nav); + const base_ptr = try o.lowerNavRefValue(pt, nav); return o.builder.gepConst(.inbounds, .i8, base_ptr, null, &.{ try o.builder.intConst(.i64, offset), }); }, .uav => |uav| { - const base_ptr = try o.lowerUavRef(uav); + const base_ptr = try o.lowerUavRef(pt, uav); return o.builder.gepConst(.inbounds, .i8, base_ptr, null, &.{ try o.builder.intConst(.i64, offset), }); }, .int => try o.builder.castConst( .inttoptr, - try o.builder.intConst(try o.lowerType(Type.usize), offset), - try o.lowerType(Type.fromInterned(ptr.ty)), + try o.builder.intConst(try o.lowerType(pt, Type.usize), offset), + try o.lowerType(pt, Type.fromInterned(ptr.ty)), ), .eu_payload => |eu_ptr| try o.lowerPtr( + pt, eu_ptr, offset + @import("../codegen.zig").errUnionPayloadOffset( Value.fromInterned(eu_ptr).typeOf(zcu).childType(zcu), zcu, ), ), - .opt_payload => |opt_ptr| try o.lowerPtr(opt_ptr, offset), + .opt_payload => |opt_ptr| try o.lowerPtr(pt, opt_ptr, offset), .field => |field| { const agg_ty = Value.fromInterned(field.base).typeOf(zcu).childType(zcu); const field_off: u64 = switch (agg_ty.zigTypeTag(zcu)) { @@ -4263,7 +4233,7 @@ pub const Object = struct { }, else => unreachable, }; - return o.lowerPtr(field.base, offset + field_off); + return o.lowerPtr(pt, field.base, offset + field_off); }, .arr_elem, .comptime_field, .comptime_alloc => unreachable, }; @@ -4273,9 +4243,9 @@ pub const Object = struct { /// Maybe the logic could be unified. fn lowerUavRef( o: *Object, + pt: Zcu.PerThread, uav: InternPool.Key.Ptr.BaseAddr.Uav, ) Error!Builder.Constant { - const pt = o.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const uav_val = uav.val; @@ -4292,25 +4262,24 @@ pub const Object = struct { const is_fn_body = uav_ty.zigTypeTag(zcu) == .@"fn"; if ((!is_fn_body and !uav_ty.hasRuntimeBits(zcu)) or - (is_fn_body and zcu.typeToFunc(uav_ty).?.is_generic)) return o.lowerPtrToVoid(ptr_ty); + (is_fn_body and zcu.typeToFunc(uav_ty).?.is_generic)) return o.lowerPtrToVoid(pt, ptr_ty); if (is_fn_body) @panic("TODO"); const llvm_addr_space = toLlvmAddressSpace(ptr_ty.ptrAddressSpace(zcu), target); const alignment = ptr_ty.ptrAlignment(zcu); - const llvm_global = (try o.resolveGlobalUav(uav.val, llvm_addr_space, alignment)).ptrConst(&o.builder).global; + const llvm_global = (try o.resolveGlobalUav(pt, uav.val, llvm_addr_space, alignment)).ptrConst(&o.builder).global; const llvm_val = try o.builder.convConst( llvm_global.toConst(), try o.builder.ptrType(llvm_addr_space), ); - return o.builder.convConst(llvm_val, try o.lowerType(ptr_ty)); + return o.builder.convConst(llvm_val, try o.lowerType(pt, ptr_ty)); } - fn lowerNavRefValue(o: *Object, nav_index: InternPool.Nav.Index) Allocator.Error!Builder.Constant { - const pt = o.pt; + fn lowerNavRefValue(o: *Object, pt: Zcu.PerThread, nav_index: InternPool.Nav.Index) Allocator.Error!Builder.Constant { const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -4323,24 +4292,24 @@ pub const Object = struct { if ((!is_fn_body and !nav_ty.hasRuntimeBits(zcu)) or (is_fn_body and zcu.typeToFunc(nav_ty).?.is_generic)) { - return o.lowerPtrToVoid(ptr_ty); + return o.lowerPtrToVoid(pt, ptr_ty); } const llvm_global = if (is_fn_body) - (try o.resolveLlvmFunction(nav_index)).ptrConst(&o.builder).global + (try o.resolveLlvmFunction(pt, nav_index)).ptrConst(&o.builder).global else - (try o.resolveGlobalNav(nav_index)).ptrConst(&o.builder).global; + (try o.resolveGlobalNav(pt, nav_index)).ptrConst(&o.builder).global; const llvm_val = try o.builder.convConst( llvm_global.toConst(), try o.builder.ptrType(toLlvmAddressSpace(nav.getAddrspace(), zcu.getTarget())), ); - return o.builder.convConst(llvm_val, try o.lowerType(ptr_ty)); + return o.builder.convConst(llvm_val, try o.lowerType(pt, ptr_ty)); } - fn lowerPtrToVoid(o: *Object, ptr_ty: Type) Allocator.Error!Builder.Constant { - const zcu = o.pt.zcu; + fn lowerPtrToVoid(o: *Object, pt: Zcu.PerThread, ptr_ty: Type) Allocator.Error!Builder.Constant { + const zcu = pt.zcu; // Even though we are pointing at something which has zero bits (e.g. `void`), // Pointers are defined to have bits. So we must return something here. // The value cannot be undefined, because we use the `nonnull` annotation @@ -4358,8 +4327,8 @@ pub const Object = struct { 64 => 0xaaaaaaaa_aaaaaaaa, else => unreachable, }; - const llvm_usize = try o.lowerType(Type.usize); - const llvm_ptr_ty = try o.lowerType(ptr_ty); + const llvm_usize = try o.lowerType(pt, Type.usize); + const llvm_ptr_ty = try o.lowerType(pt, ptr_ty); return o.builder.castConst(.inttoptr, try o.builder.intConst(llvm_usize, int), llvm_ptr_ty); } @@ -4367,8 +4336,7 @@ pub const Object = struct { /// widen it before using it and then truncate the result. /// RMW exchange of floating-point values is bitcasted to same-sized integer /// types to work around a LLVM deficiency when targeting ARM/AArch64. - fn getAtomicAbiType(o: *Object, ty: Type, is_rmw_xchg: bool) Allocator.Error!Builder.Type { - const pt = o.pt; + fn getAtomicAbiType(o: *Object, pt: Zcu.PerThread, ty: Type, is_rmw_xchg: bool) Allocator.Error!Builder.Type { const zcu = pt.zcu; const int_ty = switch (ty.zigTypeTag(zcu)) { .int => ty, @@ -4390,13 +4358,13 @@ pub const Object = struct { fn addByValParamAttrs( o: *Object, + pt: Zcu.PerThread, attributes: *Builder.FunctionAttributes.Wip, param_ty: Type, param_index: u32, fn_info: InternPool.Key.FuncType, llvm_arg_i: u32, ) Allocator.Error!void { - const pt = o.pt; const zcu = pt.zcu; if (param_ty.isPtrAtRuntime(zcu)) { const ptr_info = param_ty.ptrInfo(zcu); @@ -4416,7 +4384,7 @@ pub const Object = struct { .x86_64_interrupt, .x86_interrupt, => { - const child_type = try lowerType(o, Type.fromInterned(ptr_info.child)); + const child_type = try lowerType(o, pt, Type.fromInterned(ptr_info.child)); try attributes.addParamAttr(llvm_arg_i, .{ .byval = child_type }, &o.builder); }, } @@ -4455,14 +4423,14 @@ pub const Object = struct { }); } - fn getCmpLtErrorsLenFunction(o: *Object) !Builder.Function.Index { + fn getCmpLtErrorsLenFunction(o: *Object, pt: Zcu.PerThread) !Builder.Function.Index { const name = try o.builder.strtabString(lt_errors_fn_name); if (o.builder.getGlobal(name)) |llvm_fn| return llvm_fn.ptrConst(&o.builder).kind.function; - const zcu = o.pt.zcu; + const zcu = pt.zcu; const target = &zcu.root_mod.resolved_target.result; const function_index = try o.builder.addFunction( - try o.builder.fnType(.i1, &.{try o.errorIntType()}, .normal), + try o.builder.fnType(.i1, &.{try o.errorIntType(pt)}, .normal), name, toLlvmAddressSpace(.generic, target), ); @@ -4477,8 +4445,7 @@ pub const Object = struct { return function_index; } - fn getEnumTagNameFunction(o: *Object, enum_ty: Type) !Builder.Function.Index { - const pt = o.pt; + fn getEnumTagNameFunction(o: *Object, pt: Zcu.PerThread, enum_ty: Type) !Builder.Function.Index { const zcu = pt.zcu; const ip = &zcu.intern_pool; const enum_type = ip.loadEnumType(enum_ty.toIntern()); @@ -4487,11 +4454,11 @@ pub const Object = struct { if (gop.found_existing) return gop.value_ptr.ptrConst(&o.builder).kind.function; errdefer assert(o.enum_tag_name_map.remove(enum_ty.toIntern())); - const usize_ty = try o.lowerType(Type.usize); - const ret_ty = try o.lowerType(Type.slice_const_u8_sentinel_0); + const usize_ty = try o.lowerType(pt, Type.usize); + const ret_ty = try o.lowerType(pt, Type.slice_const_u8_sentinel_0); const target = &zcu.root_mod.resolved_target.result; const function_index = try o.builder.addFunction( - try o.builder.fnType(ret_ty, &.{try o.lowerType(Type.fromInterned(enum_type.tag_ty))}, .normal), + try o.builder.fnType(ret_ty, &.{try o.lowerType(pt, Type.fromInterned(enum_type.tag_ty))}, .normal), try o.builder.strtabStringFmt("__zig_tag_name_{f}", .{enum_type.name.fmt(ip)}), toLlvmAddressSpace(.generic, target), ); @@ -4536,6 +4503,7 @@ pub const Object = struct { const return_block = try wip.block(1, "Name"); const this_tag_int_value = try o.lowerValue( + pt, (try pt.enumValueFieldIndex(enum_ty, @intCast(field_index))).toIntern(), ); try wip_switch.addCase(this_tag_int_value, return_block, &wip); @@ -4555,10 +4523,11 @@ pub const Object = struct { pub const NavGen = struct { object: *Object, nav_index: InternPool.Nav.Index, + pt: Zcu.PerThread, err_msg: ?*Zcu.ErrorMsg, fn ownerModule(ng: NavGen) *Package.Module { - return ng.object.pt.zcu.navFileScope(ng.nav_index).mod.?; + return ng.pt.zcu.navFileScope(ng.nav_index).mod.?; } fn todo(ng: *NavGen, comptime format: []const u8, args: anytype) Error { @@ -4566,14 +4535,14 @@ pub const NavGen = struct { assert(ng.err_msg == null); const o = ng.object; const gpa = o.gpa; - const src_loc = o.pt.zcu.navSrcLoc(ng.nav_index); + const src_loc = ng.pt.zcu.navSrcLoc(ng.nav_index); ng.err_msg = try Zcu.ErrorMsg.create(gpa, src_loc, "TODO (LLVM): " ++ format, args); return error.CodegenFail; } fn genDecl(ng: *NavGen) !void { const o = ng.object; - const pt = o.pt; + const pt = ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const nav_index = ng.nav_index; @@ -4588,16 +4557,16 @@ pub const NavGen = struct { const ty = Type.fromInterned(nav.typeOf(ip)); if (linkage != .internal and ip.isFunctionType(ty.toIntern())) { - _ = try o.resolveLlvmFunction(owner_nav); + _ = try o.resolveLlvmFunction(pt, owner_nav); } else { - const variable_index = try o.resolveGlobalNav(nav_index); + const variable_index = try o.resolveGlobalNav(pt, nav_index); variable_index.setAlignment(pt.navAlignment(nav_index).toLlvm(), &o.builder); if (resolved.@"linksection".toSlice(ip)) |section| variable_index.setSection(try o.builder.string(section), &o.builder); if (is_const) variable_index.setMutability(.constant, &o.builder); try variable_index.setInitializer(switch (init_val) { .none => .no_init, - else => try o.lowerValue(init_val), + else => try o.lowerValue(pt, init_val), }, &o.builder); variable_index.setVisibility(visibility, &o.builder); @@ -4609,7 +4578,7 @@ pub const NavGen = struct { const line_number = zcu.navSrcLine(nav_index) + 1; if (!mod.strip) { - const debug_file = try o.getDebugFile(file_scope); + const debug_file = try o.getDebugFile(pt, file_scope); const debug_global_var = try o.builder.debugGlobalVar( try o.builder.metadataString(nav.name.toSlice(ip)), // Name @@ -4617,7 +4586,7 @@ pub const NavGen = struct { debug_file, // File debug_file, // Scope line_number, - try o.lowerDebugType(ty), + try o.lowerDebugType(pt, ty), variable_index, .{ .local = linkage == .internal }, ); @@ -4814,16 +4783,17 @@ pub const FuncGen = struct { const gop = try self.func_inst_table.getOrPut(gpa, inst); if (gop.found_existing) return gop.value_ptr.*; - const llvm_val = try self.resolveValue((try self.air.value(inst, self.ng.object.pt)).?); + const llvm_val = try self.resolveValue((try self.air.value(inst, self.ng.pt)).?); gop.value_ptr.* = llvm_val.toValue(); return llvm_val.toValue(); } fn resolveValue(self: *FuncGen, val: Value) Error!Builder.Constant { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty = val.typeOf(zcu); - const llvm_val = try o.lowerValue(val.toIntern()); + const llvm_val = try o.lowerValue(pt, val.toIntern()); if (!isByRef(ty, zcu)) return llvm_val; // We have an LLVM value but we need to create a global constant and @@ -4847,7 +4817,7 @@ pub const FuncGen = struct { fn genBody(self: *FuncGen, body: []const Air.Inst.Index, coverage_point: Air.CoveragePoint) Error!void { const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const ip = &zcu.intern_pool; const air_tags = self.air.instructions.items(.tag); switch (coverage_point) { @@ -5173,7 +5143,7 @@ pub const FuncGen = struct { if (maybe_inline_func) |inline_func| { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -5182,7 +5152,7 @@ pub const FuncGen = struct { const file_scope = zcu.navFileScopeIndex(func.owner_nav); const mod = zcu.fileByIndex(file_scope).mod.?; - self.file = try o.getDebugFile(file_scope); + self.file = try o.getDebugFile(pt, file_scope); const line_number = zcu.navSrcLine(func.owner_nav) + 1; self.inlined = self.wip.debug_location; @@ -5198,7 +5168,7 @@ pub const FuncGen = struct { try o.builder.metadataString(nav.fqn.toSlice(&zcu.intern_pool)), line_number, line_number + func.lbrace_line, - try o.lowerDebugType(fn_ty), + try o.lowerDebugType(pt, fn_ty), .{ .di_flags = .{ .StaticMember = true }, .sp_flags = .{ @@ -5255,7 +5225,7 @@ pub const FuncGen = struct { const extra = self.air.extraData(Air.Call, pl_op.payload); const args: []const Air.Inst.Ref = @ptrCast(self.air.extra.items[extra.end..][0..extra.data.args_len]); const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const callee_ty = self.typeOf(pl_op.operand); @@ -5287,7 +5257,7 @@ pub const FuncGen = struct { } const ret_ptr = if (!sret) null else blk: { - const llvm_ret_ty = try o.lowerType(return_type); + const llvm_ret_ty = try o.lowerType(pt, return_type); try attributes.addParamAttr(0, .{ .sret = llvm_ret_ty }, &o.builder); const alignment = return_type.abiAlignment(zcu).toLlvm(); @@ -5302,14 +5272,14 @@ pub const FuncGen = struct { try llvm_args.append(self.err_ret_trace); } - var it = iterateParamTypes(o, fn_info); + var it = iterateParamTypes(o, pt, fn_info); while (try it.nextCall(self, args)) |lowering| switch (lowering) { .no_bits => continue, .byval => { const arg = args[it.zig_index - 1]; const param_ty = self.typeOf(arg); const llvm_arg = try self.resolveInst(arg); - const llvm_param_ty = try o.lowerType(param_ty); + const llvm_param_ty = try o.lowerType(pt, param_ty); if (isByRef(param_ty, zcu)) { const alignment = param_ty.abiAlignment(zcu).toLlvm(); const loaded = try self.wip.load(.normal, llvm_param_ty, llvm_arg, alignment, ""); @@ -5338,7 +5308,7 @@ pub const FuncGen = struct { const llvm_arg = try self.resolveInst(arg); const alignment = param_ty.abiAlignment(zcu).toLlvm(); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const arg_ptr = try self.buildAlloca(param_llvm_ty, alignment); if (isByRef(param_ty, zcu)) { const loaded = try self.wip.load(.normal, param_llvm_ty, llvm_arg, alignment, ""); @@ -5409,7 +5379,7 @@ pub const FuncGen = struct { llvm_arg = ptr; } - const float_ty = try o.lowerType(aarch64_c_abi.getFloatArrayType(arg_ty, zcu).?); + const float_ty = try o.lowerType(pt, aarch64_c_abi.getFloatArrayType(arg_ty, zcu).?); const array_ty = try o.builder.arrayType(count, float_ty); const loaded = try self.wip.load(.normal, array_ty, llvm_arg, alignment, ""); @@ -5436,7 +5406,7 @@ pub const FuncGen = struct { { // Add argument attributes. - it = iterateParamTypes(o, fn_info); + it = iterateParamTypes(o, pt, fn_info); it.llvm_index += @intFromBool(sret); it.llvm_index += @intFromBool(err_return_tracing); while (try it.next()) |lowering| switch (lowering) { @@ -5444,13 +5414,13 @@ pub const FuncGen = struct { const param_index = it.zig_index - 1; const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[param_index]); if (!isByRef(param_ty, zcu)) { - try o.addByValParamAttrs(&attributes, param_ty, param_index, fn_info, it.llvm_index - 1); + try o.addByValParamAttrs(pt, &attributes, param_ty, param_index, fn_info, it.llvm_index - 1); } }, .byref => { const param_index = it.zig_index - 1; const param_ty = Type.fromInterned(fn_info.param_types.get(ip)[param_index]); - const param_llvm_ty = try o.lowerType(param_ty); + const param_llvm_ty = try o.lowerType(pt, param_ty); const alignment = param_ty.abiAlignment(zcu).toLlvm(); try o.addByRefParamAttrs(&attributes, it.llvm_index - 1, alignment, it.byval_attr, param_llvm_ty); }, @@ -5502,7 +5472,7 @@ pub const FuncGen = struct { }, toLlvmCallConvTag(fn_info.cc, target).?, try attributes.finish(&o.builder), - try o.lowerType(zig_fn_ty), + try o.lowerType(pt, zig_fn_ty), llvm_fn, llvm_args.items, "", @@ -5516,7 +5486,7 @@ pub const FuncGen = struct { return .none; } - const llvm_ret_ty = try o.lowerType(return_type); + const llvm_ret_ty = try o.lowerType(pt, return_type); if (ret_ptr) |rp| { if (isByRef(return_type, zcu)) { return rp; @@ -5527,7 +5497,7 @@ pub const FuncGen = struct { } } - const abi_ret_ty = try lowerFnRetTy(o, fn_info); + const abi_ret_ty = try lowerFnRetTy(o, pt, fn_info); if (abi_ret_ty != llvm_ret_ty) { // In this case the function return type is honoring the calling convention by having @@ -5556,11 +5526,12 @@ pub const FuncGen = struct { fn buildSimplePanic(fg: *FuncGen, panic_id: Zcu.SimplePanicId) !void { const o = fg.ng.object; - const zcu = o.pt.zcu; + const pt = fg.ng.pt; + const zcu = pt.zcu; const target = zcu.getTarget(); const panic_func = zcu.funcInfo(zcu.builtin_decl_values.get(panic_id.toBuiltin())); const fn_info = zcu.typeToFunc(.fromInterned(panic_func.ty)).?; - const panic_global = try o.resolveLlvmFunction(panic_func.owner_nav); + const panic_global = try o.resolveLlvmFunction(pt, panic_func.owner_nav); const has_err_trace = zcu.comp.config.any_error_tracing and fn_info.cc == .auto; if (has_err_trace) assert(fg.err_ret_trace != .none); @@ -5579,7 +5550,7 @@ pub const FuncGen = struct { fn airRet(self: *FuncGen, inst: Air.Inst.Index, safety: bool) !void { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; @@ -5599,7 +5570,7 @@ pub const FuncGen = struct { // https://github.com/ziglang/zig/issues/15337 break :undef; } - const len = try o.builder.intValue(try o.lowerType(Type.usize), ret_ty.abiSize(zcu)); + const len = try o.builder.intValue(try o.lowerType(pt, Type.usize), ret_ty.abiSize(zcu)); _ = try self.wip.callMemSet( self.ret_ptr, ptr_ty.ptrAlignment(zcu).toLlvm(), @@ -5635,14 +5606,14 @@ pub const FuncGen = struct { // Functions with an empty error set are emitted with an error code // return type and return zero so they can be function pointers coerced // to functions that return anyerror. - _ = try self.wip.ret(try o.builder.intValue(try o.errorIntType(), 0)); + _ = try self.wip.ret(try o.builder.intValue(try o.errorIntType(pt), 0)); } else { _ = try self.wip.retVoid(); } return; } - const abi_ret_ty = try lowerFnRetTy(o, fn_info); + const abi_ret_ty = try lowerFnRetTy(o, pt, fn_info); const operand = try self.resolveInst(un_op); const val_is_undef = if (try self.air.value(un_op, pt)) |val| val.isUndefDeep(zcu) else false; const alignment = ret_ty.abiAlignment(zcu).toLlvm(); @@ -5650,7 +5621,7 @@ pub const FuncGen = struct { if (val_is_undef and safety) { const llvm_ret_ty = operand.typeOfWip(&self.wip); const rp = try self.buildAlloca(llvm_ret_ty, alignment); - const len = try o.builder.intValue(try o.lowerType(Type.usize), ret_ty.abiSize(zcu)); + const len = try o.builder.intValue(try o.lowerType(pt, Type.usize), ret_ty.abiSize(zcu)); _ = try self.wip.callMemSet( rp, alignment, @@ -5688,7 +5659,7 @@ pub const FuncGen = struct { fn airRetLoad(self: *FuncGen, inst: Air.Inst.Index) !void { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; @@ -5700,7 +5671,7 @@ pub const FuncGen = struct { // Functions with an empty error set are emitted with an error code // return type and return zero so they can be function pointers coerced // to functions that return anyerror. - _ = try self.wip.ret(try o.builder.intValue(try o.errorIntType(), 0)); + _ = try self.wip.ret(try o.builder.intValue(try o.errorIntType(pt), 0)); } else { _ = try self.wip.retVoid(); } @@ -5711,7 +5682,7 @@ pub const FuncGen = struct { return; } const ptr = try self.resolveInst(un_op); - const abi_ret_ty = try lowerFnRetTy(o, fn_info); + const abi_ret_ty = try lowerFnRetTy(o, pt, fn_info); const alignment = ret_ty.abiAlignment(zcu).toLlvm(); _ = try self.wip.ret(try self.wip.load(.normal, abi_ret_ty, ptr, alignment, "")); return; @@ -5719,22 +5690,23 @@ pub const FuncGen = struct { fn airCVaArg(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const list = try self.resolveInst(ty_op.operand); const arg_ty = ty_op.ty.toType(); - const llvm_arg_ty = try o.lowerType(arg_ty); + const llvm_arg_ty = try o.lowerType(pt, arg_ty); return self.wip.vaArg(list, llvm_arg_ty, ""); } fn airCVaCopy(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const src_list = try self.resolveInst(ty_op.operand); const va_list_ty = ty_op.ty.toType(); - const llvm_va_list_ty = try o.lowerType(va_list_ty); + const llvm_va_list_ty = try o.lowerType(pt, va_list_ty); const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm(); const dest_list = try self.buildAlloca(llvm_va_list_ty, result_alignment); @@ -5756,10 +5728,10 @@ pub const FuncGen = struct { fn airCVaStart(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const va_list_ty = self.typeOfIndex(inst); - const llvm_va_list_ty = try o.lowerType(va_list_ty); + const llvm_va_list_ty = try o.lowerType(pt, va_list_ty); const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm(); const dest_list = try self.buildAlloca(llvm_va_list_ty, result_alignment); @@ -5799,9 +5771,10 @@ pub const FuncGen = struct { fn airCmpLtErrorsLen(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand = try self.resolveInst(un_op); - const llvm_fn = try o.getCmpLtErrorsLenFunction(); + const llvm_fn = try o.getCmpLtErrorsLenFunction(pt); return self.wip.call( .normal, .fastcc, @@ -5822,7 +5795,7 @@ pub const FuncGen = struct { rhs: Builder.Value, ) Allocator.Error!Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const scalar_ty = operand_ty.scalarType(zcu); @@ -5839,7 +5812,7 @@ pub const FuncGen = struct { // We need to emit instructions to check for equality/inequality // of optionals that are not pointers. const is_by_ref = isByRef(scalar_ty, zcu); - const opt_llvm_ty = try o.lowerType(scalar_ty); + const opt_llvm_ty = try o.lowerType(pt, scalar_ty); const lhs_non_null = try self.optCmpNull(.ne, opt_llvm_ty, lhs, is_by_ref, .normal); const rhs_non_null = try self.optCmpNull(.ne, opt_llvm_ty, rhs, is_by_ref, .normal); const llvm_i2 = try o.builder.intType(2); @@ -5936,7 +5909,7 @@ pub const FuncGen = struct { body: []const Air.Inst.Index, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst_ty = self.typeOfIndex(inst); @@ -5963,7 +5936,7 @@ pub const FuncGen = struct { // Create a phi node only if the block returns a value. if (have_block_result) { - const raw_llvm_ty = try o.lowerType(inst_ty); + const raw_llvm_ty = try o.lowerType(pt, inst_ty); const llvm_ty: Builder.Type = ty: { // If the zig tag type is a function, this represents an actual function body; not // a pointer to it. LLVM IR allows the call instruction to use function bodies instead @@ -5986,8 +5959,7 @@ pub const FuncGen = struct { } fn airBr(self: *FuncGen, inst: Air.Inst.Index) !void { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const branch = self.air.instructions.items(.data)[@intFromEnum(inst)].br; const block = self.blocks.get(branch.block_inst).?; @@ -6017,7 +5989,7 @@ pub const FuncGen = struct { dispatch_info: SwitchDispatchInfo, ) !void { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const cond_ty = self.typeOf(cond_ref); const switch_br = self.air.unwrapSwitch(switch_inst); @@ -6081,7 +6053,7 @@ pub const FuncGen = struct { const table_index = try self.wip.cast( .zext, try self.wip.bin(.@"sub nuw", cond, jmp_table.min.toValue(), ""), - try o.lowerType(Type.usize), + try o.lowerType(pt, Type.usize), "", ); const target_ptr_ptr = try self.wip.gep( @@ -6108,7 +6080,7 @@ pub const FuncGen = struct { // The switch prongs will correspond to our scalar cases. Ranges will // be handled by conditional branches in the `else` prong. - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); const cond_int = if (cond.typeOfWip(&self.wip).isPointer(&o.builder)) try self.wip.cast(.ptrtoint, cond, llvm_usize, "") else @@ -6268,8 +6240,7 @@ pub const FuncGen = struct { } fn airTry(self: *FuncGen, body_tail: []const Air.Inst.Index, err_cold: bool) !Builder.Value { - const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; @@ -6284,8 +6255,7 @@ pub const FuncGen = struct { } fn airTryPtr(self: *FuncGen, inst: Air.Inst.Index, err_cold: bool) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.TryPtr, ty_pl.payload); const err_union_ptr = try self.resolveInst(extra.data.ptr); @@ -6309,12 +6279,12 @@ pub const FuncGen = struct { err_cold: bool, ) !Builder.Value { const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; const payload_ty = err_union_ty.errorUnionPayload(zcu); const payload_has_bits = payload_ty.hasRuntimeBitsIgnoreComptime(zcu); - const err_union_llvm_ty = try o.lowerType(err_union_ty); - const error_type = try o.errorIntType(); + const err_union_llvm_ty = try o.lowerType(pt, err_union_ty); + const error_type = try o.errorIntType(pt); if (!err_union_ty.errorUnionSet(zcu).errorSetIsEmpty(zcu)) { const loaded = loaded: { @@ -6378,7 +6348,8 @@ pub const FuncGen = struct { fn airSwitchBr(self: *FuncGen, inst: Air.Inst.Index, is_dispatch_loop: bool) !void { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const switch_br = self.air.unwrapSwitch(inst); @@ -6483,8 +6454,8 @@ pub const FuncGen = struct { const table_includes_else = item_count != table_len; break :jmp_table .{ - .min = try o.lowerValue(min.toIntern()), - .max = try o.lowerValue(max.toIntern()), + .min = try o.lowerValue(pt, min.toIntern()), + .max = try o.lowerValue(pt, max.toIntern()), .in_bounds_hint = if (table_includes_else) .none else switch (switch_br.getElseHint()) { .none, .cold => .none, .unpredictable => .unpredictable, @@ -6591,7 +6562,7 @@ pub const FuncGen = struct { } fn switchCaseItemRange(self: *FuncGen, switch_br: Air.UnwrappedSwitch) [2]Value { - const zcu = self.ng.object.pt.zcu; + const zcu = self.ng.pt.zcu; var it = switch_br.iterateCases(); var min: ?Value = null; var max: ?Value = null; @@ -6633,18 +6604,18 @@ pub const FuncGen = struct { fn airArrayToSlice(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_ty = self.typeOf(ty_op.operand); const array_ty = operand_ty.childType(zcu); - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); const len = try o.builder.intValue(llvm_usize, array_ty.arrayLen(zcu)); - const slice_llvm_ty = try o.lowerType(self.typeOfIndex(inst)); + const slice_llvm_ty = try o.lowerType(pt, self.typeOfIndex(inst)); const operand = try self.resolveInst(ty_op.operand); if (!array_ty.hasRuntimeBitsIgnoreComptime(zcu)) return self.wip.buildAggregate(slice_llvm_ty, &.{ operand, len }, ""); - const ptr = try self.wip.gep(.inbounds, try o.lowerType(array_ty), operand, &.{ + const ptr = try self.wip.gep(.inbounds, try o.lowerType(pt, array_ty), operand, &.{ try o.builder.intValue(llvm_usize, 0), try o.builder.intValue(llvm_usize, 0), }, ""); return self.wip.buildAggregate(slice_llvm_ty, &.{ ptr, len }, ""); @@ -6652,7 +6623,7 @@ pub const FuncGen = struct { fn airFloatFromInt(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -6663,7 +6634,7 @@ pub const FuncGen = struct { const dest_ty = self.typeOfIndex(inst); const dest_scalar_ty = dest_ty.scalarType(zcu); - const dest_llvm_ty = try o.lowerType(dest_ty); + const dest_llvm_ty = try o.lowerType(pt, dest_ty); const target = zcu.getTarget(); if (intrinsicsAllowed(dest_scalar_ty, target)) return self.wip.conv( @@ -6719,7 +6690,7 @@ pub const FuncGen = struct { _ = fast; const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const target = zcu.getTarget(); const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -6730,7 +6701,7 @@ pub const FuncGen = struct { const dest_ty = self.typeOfIndex(inst); const dest_scalar_ty = dest_ty.scalarType(zcu); - const dest_llvm_ty = try o.lowerType(dest_ty); + const dest_llvm_ty = try o.lowerType(pt, dest_ty); if (intrinsicsAllowed(operand_scalar_ty, target)) { // TODO set fast math flag @@ -6762,7 +6733,7 @@ pub const FuncGen = struct { compiler_rt_dest_abbrev, }); - const operand_llvm_ty = try o.lowerType(operand_ty); + const operand_llvm_ty = try o.lowerType(pt, operand_ty); const libc_fn = try self.getLibcFunction(fn_name, &.{operand_llvm_ty}, libc_ret_ty); var result = try self.wip.call( .normal, @@ -6780,16 +6751,15 @@ pub const FuncGen = struct { } fn sliceOrArrayPtr(fg: *FuncGen, ptr: Builder.Value, ty: Type) Allocator.Error!Builder.Value { - const o = fg.ng.object; - const zcu = o.pt.zcu; + const zcu = fg.ng.pt.zcu; return if (ty.isSlice(zcu)) fg.wip.extractValue(ptr, &.{0}, "") else ptr; } fn sliceOrArrayLenInBytes(fg: *FuncGen, ptr: Builder.Value, ty: Type) Allocator.Error!Builder.Value { const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); switch (ty.ptrSize(zcu)) { .slice => { const len = try fg.wip.extractValue(ptr, &.{1}, ""); @@ -6817,18 +6787,19 @@ pub const FuncGen = struct { fn airPtrSliceFieldPtr(self: *FuncGen, inst: Air.Inst.Index, index: c_uint) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const slice_ptr = try self.resolveInst(ty_op.operand); const slice_ptr_ty = self.typeOf(ty_op.operand); - const slice_llvm_ty = try o.lowerPtrElemTy(slice_ptr_ty.childType(zcu)); + const slice_llvm_ty = try o.lowerPtrElemTy(pt, slice_ptr_ty.childType(zcu)); return self.wip.gepStruct(slice_llvm_ty, slice_ptr, index, ""); } fn airSliceElemVal(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; @@ -6836,7 +6807,7 @@ pub const FuncGen = struct { const slice = try self.resolveInst(bin_op.lhs); const index = try self.resolveInst(bin_op.rhs); const elem_ty = slice_ty.childType(zcu); - const llvm_elem_ty = try o.lowerPtrElemTy(elem_ty); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, elem_ty); const base_ptr = try self.wip.extractValue(slice, &.{0}, ""); const ptr = try self.wip.gep(.inbounds, llvm_elem_ty, base_ptr, &.{index}, ""); if (isByRef(elem_ty, zcu)) { @@ -6856,21 +6827,22 @@ pub const FuncGen = struct { fn airSliceElemPtr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const slice_ty = self.typeOf(bin_op.lhs); const slice = try self.resolveInst(bin_op.lhs); const index = try self.resolveInst(bin_op.rhs); - const llvm_elem_ty = try o.lowerPtrElemTy(slice_ty.childType(zcu)); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, slice_ty.childType(zcu)); const base_ptr = try self.wip.extractValue(slice, &.{0}, ""); return self.wip.gep(.inbounds, llvm_elem_ty, base_ptr, &.{index}, ""); } fn airArrayElemVal(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; @@ -6878,11 +6850,11 @@ pub const FuncGen = struct { const array_ty = self.typeOf(bin_op.lhs); const array_llvm_val = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); - const array_llvm_ty = try o.lowerType(array_ty); + const array_llvm_ty = try o.lowerType(pt, array_ty); const elem_ty = array_ty.childType(zcu); if (isByRef(array_ty, zcu)) { const indices: [2]Builder.Value = .{ - try o.builder.intValue(try o.lowerType(Type.usize), 0), rhs, + try o.builder.intValue(try o.lowerType(pt, Type.usize), 0), rhs, }; if (isByRef(elem_ty, zcu)) { const elem_ptr = @@ -6903,19 +6875,19 @@ pub const FuncGen = struct { fn airPtrElemVal(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const ptr_ty = self.typeOf(bin_op.lhs); const elem_ty = ptr_ty.childType(zcu); - const llvm_elem_ty = try o.lowerPtrElemTy(elem_ty); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, elem_ty); const base_ptr = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); // TODO: when we go fully opaque pointers in LLVM 16 we can remove this branch const ptr = try self.wip.gep(.inbounds, llvm_elem_ty, base_ptr, if (ptr_ty.isSinglePointer(zcu)) // If this is a single-item pointer to an array, we need another index in the GEP. - &.{ try o.builder.intValue(try o.lowerType(Type.usize), 0), rhs } + &.{ try o.builder.intValue(try o.lowerType(pt, Type.usize), 0), rhs } else &.{rhs}, ""); if (isByRef(elem_ty, zcu)) { @@ -6934,7 +6906,7 @@ pub const FuncGen = struct { fn airPtrElemPtr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; @@ -6948,10 +6920,10 @@ pub const FuncGen = struct { const elem_ptr = ty_pl.ty.toType(); if (elem_ptr.ptrInfo(zcu).flags.vector_index != .none) return base_ptr; - const llvm_elem_ty = try o.lowerPtrElemTy(elem_ty); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, elem_ty); return self.wip.gep(.inbounds, llvm_elem_ty, base_ptr, if (ptr_ty.isSinglePointer(zcu)) // If this is a single-item pointer to an array, we need another index in the GEP. - &.{ try o.builder.intValue(try o.lowerType(Type.usize), 0), rhs } + &.{ try o.builder.intValue(try o.lowerType(pt, Type.usize), 0), rhs } else &.{rhs}, ""); } @@ -6977,7 +6949,7 @@ pub const FuncGen = struct { fn airStructFieldVal(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; @@ -6999,7 +6971,7 @@ pub const FuncGen = struct { const shift_amt = try o.builder.intValue(containing_int.typeOfWip(&self.wip), bit_offset); const shifted_value = try self.wip.bin(.lshr, containing_int, shift_amt, ""); - const elem_llvm_ty = try o.lowerType(field_ty); + const elem_llvm_ty = try o.lowerType(pt, field_ty); if (field_ty.zigTypeTag(zcu) == .float or field_ty.zigTypeTag(zcu) == .vector) { const same_size_int = try o.builder.intType(@intCast(field_ty.bitSize(zcu))); const truncated_int = @@ -7021,7 +6993,7 @@ pub const FuncGen = struct { .@"union" => { assert(struct_ty.containerLayout(zcu) == .@"packed"); const containing_int = struct_llvm_val; - const elem_llvm_ty = try o.lowerType(field_ty); + const elem_llvm_ty = try o.lowerType(pt, field_ty); if (field_ty.zigTypeTag(zcu) == .float or field_ty.zigTypeTag(zcu) == .vector) { const same_size_int = try o.builder.intType(@intCast(field_ty.bitSize(zcu))); const truncated_int = @@ -7043,7 +7015,7 @@ pub const FuncGen = struct { .@"struct" => { const layout = struct_ty.containerLayout(zcu); assert(layout != .@"packed"); - const struct_llvm_ty = try o.lowerType(struct_ty); + const struct_llvm_ty = try o.lowerType(pt, struct_ty); const llvm_field_index = o.llvmFieldIndex(struct_ty, field_index).?; const field_ptr = try self.wip.gepStruct(struct_llvm_ty, struct_llvm_val, llvm_field_index, ""); @@ -7064,7 +7036,7 @@ pub const FuncGen = struct { } }, .@"union" => { - const union_llvm_ty = try o.lowerType(struct_ty); + const union_llvm_ty = try o.lowerType(pt, struct_ty); const layout = struct_ty.unionGetLayout(zcu); const payload_index = @intFromBool(layout.tag_align.compare(.gte, layout.payload_align)); const field_ptr = @@ -7083,7 +7055,7 @@ pub const FuncGen = struct { fn airFieldParentPtr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.FieldParentPtr, ty_pl.payload).data; @@ -7094,8 +7066,8 @@ pub const FuncGen = struct { const field_offset = parent_ty.structFieldOffset(extra.field_index, zcu); if (field_offset == 0) return field_ptr; - const res_ty = try o.lowerType(ty_pl.ty.toType()); - const llvm_usize = try o.lowerType(Type.usize); + const res_ty = try o.lowerType(pt, ty_pl.ty.toType()); + const llvm_usize = try o.lowerType(pt, Type.usize); const field_ptr_int = try self.wip.cast(.ptrtoint, field_ptr, llvm_usize, ""); const base_ptr_int = try self.wip.bin( @@ -7151,7 +7123,8 @@ pub const FuncGen = struct { fn airDbgVarPtr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const operand = try self.resolveInst(pl_op.operand); const name: Air.NullTerminatedString = @enumFromInt(pl_op.payload); @@ -7162,7 +7135,7 @@ pub const FuncGen = struct { self.file, self.scope, self.prev_dbg_line, - try o.lowerDebugType(ptr_ty.childType(zcu)), + try o.lowerDebugType(pt, ptr_ty.childType(zcu)), ); _ = try self.wip.callIntrinsic( @@ -7183,6 +7156,7 @@ pub const FuncGen = struct { fn airDbgVarVal(self: *FuncGen, inst: Air.Inst.Index, is_arg: bool) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const operand = try self.resolveInst(pl_op.operand); const operand_ty = self.typeOf(pl_op.operand); @@ -7193,7 +7167,7 @@ pub const FuncGen = struct { self.file, self.scope, self.prev_dbg_line, - try o.lowerDebugType(operand_ty), + try o.lowerDebugType(pt, operand_ty), arg_no: { self.arg_inline_index += 1; break :arg_no self.arg_inline_index; @@ -7203,10 +7177,10 @@ pub const FuncGen = struct { self.file, self.scope, self.prev_dbg_line, - try o.lowerDebugType(operand_ty), + try o.lowerDebugType(pt, operand_ty), ); - const zcu = o.pt.zcu; + const zcu = pt.zcu; const owner_mod = self.ng.ownerModule(); if (isByRef(operand_ty, zcu)) { _ = try self.wip.callIntrinsic( @@ -7296,7 +7270,7 @@ pub const FuncGen = struct { // This stores whether we need to add an elementtype attribute and // if so, the element type itself. const llvm_param_attrs = try arena.alloc(Builder.Type, max_param_count); - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const target = zcu.getTarget(); @@ -7326,7 +7300,7 @@ pub const FuncGen = struct { const output_inst = try self.resolveInst(output); const output_ty = self.typeOf(output); assert(output_ty.zigTypeTag(zcu) == .pointer); - const elem_llvm_ty = try o.lowerPtrElemTy(output_ty.childType(zcu)); + const elem_llvm_ty = try o.lowerPtrElemTy(pt, output_ty.childType(zcu)); switch (constraint[0]) { '=' => {}, @@ -7364,7 +7338,7 @@ pub const FuncGen = struct { is_indirect.* = false; const ret_ty = self.typeOfIndex(inst); - llvm_ret_types[llvm_ret_i] = try o.lowerType(ret_ty); + llvm_ret_types[llvm_ret_i] = try o.lowerType(pt, ret_ty); llvm_ret_i += 1; } @@ -7406,7 +7380,7 @@ pub const FuncGen = struct { llvm_param_types[llvm_param_i] = arg_llvm_value.typeOfWip(&self.wip); } else { const alignment = arg_ty.abiAlignment(zcu).toLlvm(); - const arg_llvm_ty = try o.lowerType(arg_ty); + const arg_llvm_ty = try o.lowerType(pt, arg_ty); const load_inst = try self.wip.load(.normal, arg_llvm_ty, arg_llvm_value, alignment, ""); llvm_param_values[llvm_param_i] = load_inst; @@ -7447,7 +7421,7 @@ pub const FuncGen = struct { llvm_param_attrs[llvm_param_i] = if (constraint[0] == '*') blk: { if (!is_by_ref) self.maybeMarkAllowZeroAccess(arg_ty.ptrInfo(zcu)); - break :blk try o.lowerPtrElemTy(if (is_by_ref) arg_ty else arg_ty.childType(zcu)); + break :blk try o.lowerPtrElemTy(pt, if (is_by_ref) arg_ty else arg_ty.childType(zcu)); } else .none; llvm_param_i += 1; @@ -7465,7 +7439,7 @@ pub const FuncGen = struct { if (constraint[0] != '+') continue; const rw_ty = self.typeOf(output); - const llvm_elem_ty = try o.lowerPtrElemTy(rw_ty.childType(zcu)); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, rw_ty.childType(zcu)); if (is_indirect) { llvm_param_values[llvm_param_i] = llvm_rw_val; llvm_param_types[llvm_param_i] = llvm_rw_val.typeOfWip(&self.wip); @@ -7663,13 +7637,13 @@ pub const FuncGen = struct { cond: Builder.IntegerCondition, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand = try self.resolveInst(un_op); const operand_ty = self.typeOf(un_op); const optional_ty = if (operand_is_ptr) operand_ty.childType(zcu) else operand_ty; - const optional_llvm_ty = try o.lowerType(optional_ty); + const optional_llvm_ty = try o.lowerType(pt, optional_ty); const payload_ty = optional_ty.optionalChild(zcu); const access_kind: Builder.MemoryAccessKind = @@ -7714,14 +7688,14 @@ pub const FuncGen = struct { operand_is_ptr: bool, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand = try self.resolveInst(un_op); const operand_ty = self.typeOf(un_op); const err_union_ty = if (operand_is_ptr) operand_ty.childType(zcu) else operand_ty; const payload_ty = err_union_ty.errorUnionPayload(zcu); - const error_type = try o.errorIntType(); + const error_type = try o.errorIntType(pt); const zero = try o.builder.intValue(error_type, 0); const access_kind: Builder.MemoryAccessKind = @@ -7740,7 +7714,7 @@ pub const FuncGen = struct { if (!payload_ty.hasRuntimeBitsIgnoreComptime(zcu)) { const loaded = if (operand_is_ptr) - try self.wip.load(access_kind, try o.lowerType(err_union_ty), operand, .default, "") + try self.wip.load(access_kind, try o.lowerType(pt, err_union_ty), operand, .default, "") else operand; return self.wip.icmp(cond, loaded, zero, ""); @@ -7749,7 +7723,7 @@ pub const FuncGen = struct { const err_field_index = try errUnionErrorOffset(payload_ty, pt); const loaded = if (operand_is_ptr or isByRef(err_union_ty, zcu)) loaded: { - const err_union_llvm_ty = try o.lowerType(err_union_ty); + const err_union_llvm_ty = try o.lowerType(pt, err_union_ty); const err_field_ptr = try self.wip.gepStruct(err_union_llvm_ty, operand, err_field_index, ""); break :loaded try self.wip.load(access_kind, error_type, err_field_ptr, .default, ""); @@ -7759,7 +7733,7 @@ pub const FuncGen = struct { fn airOptionalPayloadPtr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); @@ -7774,14 +7748,14 @@ pub const FuncGen = struct { // The payload and the optional are the same value. return operand; } - return self.wip.gepStruct(try o.lowerType(optional_ty), operand, 0, ""); + return self.wip.gepStruct(try o.lowerType(pt, optional_ty), operand, 0, ""); } fn airOptionalPayloadPtrSet(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { comptime assert(optional_layout_version == 3); const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); @@ -7807,7 +7781,7 @@ pub const FuncGen = struct { } // First set the non-null bit. - const optional_llvm_ty = try o.lowerType(optional_ty); + const optional_llvm_ty = try o.lowerType(pt, optional_ty); const non_null_ptr = try self.wip.gepStruct(optional_llvm_ty, operand, 1, ""); self.maybeMarkAllowZeroAccess(optional_ptr_ty.ptrInfo(zcu)); @@ -7823,7 +7797,7 @@ pub const FuncGen = struct { fn airOptionalPayload(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -7837,7 +7811,7 @@ pub const FuncGen = struct { return operand; } - const opt_llvm_ty = try o.lowerType(optional_ty); + const opt_llvm_ty = try o.lowerType(pt, optional_ty); const can_elide_load = if (isByRef(payload_ty, zcu)) self.canElideLoad(body_tail) else false; return self.optPayloadHandle(opt_llvm_ty, operand, optional_ty, can_elide_load); } @@ -7848,7 +7822,7 @@ pub const FuncGen = struct { operand_is_ptr: bool, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -7862,7 +7836,7 @@ pub const FuncGen = struct { return if (operand_is_ptr) operand else .none; } const offset = try errUnionPayloadOffset(payload_ty, pt); - const err_union_llvm_ty = try o.lowerType(err_union_ty); + const err_union_llvm_ty = try o.lowerType(pt, err_union_ty); if (operand_is_ptr) { return self.wip.gepStruct(err_union_llvm_ty, operand, offset, ""); } else if (isByRef(err_union_ty, zcu)) { @@ -7884,12 +7858,12 @@ pub const FuncGen = struct { operand_is_ptr: bool, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); const operand_ty = self.typeOf(ty_op.operand); - const error_type = try o.errorIntType(); + const error_type = try o.errorIntType(pt); const err_union_ty = if (operand_is_ptr) operand_ty.childType(zcu) else operand_ty; if (err_union_ty.errorUnionSet(zcu).errorSetIsEmpty(zcu)) { if (operand_is_ptr) { @@ -7916,7 +7890,7 @@ pub const FuncGen = struct { if (operand_is_ptr or isByRef(err_union_ty, zcu)) { if (operand_is_ptr) self.maybeMarkAllowZeroAccess(operand_ty.ptrInfo(zcu)); - const err_union_llvm_ty = try o.lowerType(err_union_ty); + const err_union_llvm_ty = try o.lowerType(pt, err_union_ty); const err_field_ptr = try self.wip.gepStruct(err_union_llvm_ty, operand, offset, ""); return self.wip.load(access_kind, error_type, err_field_ptr, .default, ""); } @@ -7926,7 +7900,7 @@ pub const FuncGen = struct { fn airErrUnionPayloadPtrSet(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); @@ -7934,7 +7908,7 @@ pub const FuncGen = struct { const err_union_ty = err_union_ptr_ty.childType(zcu); const payload_ty = err_union_ty.errorUnionPayload(zcu); - const non_error_val = try o.builder.intValue(try o.errorIntType(), 0); + const non_error_val = try o.builder.intValue(try o.errorIntType(pt), 0); const access_kind: Builder.MemoryAccessKind = if (err_union_ptr_ty.isVolatilePtr(zcu)) .@"volatile" else .normal; @@ -7945,7 +7919,7 @@ pub const FuncGen = struct { _ = try self.wip.store(access_kind, non_error_val, operand, .default); return operand; } - const err_union_llvm_ty = try o.lowerType(err_union_ty); + const err_union_llvm_ty = try o.lowerType(pt, err_union_ty); { self.maybeMarkAllowZeroAccess(err_union_ptr_ty.ptrInfo(zcu)); @@ -7976,14 +7950,14 @@ pub const FuncGen = struct { fn airSaveErrReturnTraceIndex(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const struct_ty = ty_pl.ty.toType(); const field_index = ty_pl.payload; - const struct_llvm_ty = try o.lowerType(struct_ty); + const struct_llvm_ty = try o.lowerType(pt, struct_ty); const llvm_field_index = o.llvmFieldIndex(struct_ty, field_index).?; assert(self.err_ret_trace != .none); const field_ptr = @@ -8022,7 +7996,7 @@ pub const FuncGen = struct { fn airWrapOptional(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -8033,7 +8007,7 @@ pub const FuncGen = struct { const operand = try self.resolveInst(ty_op.operand); const optional_ty = self.typeOfIndex(inst); if (optional_ty.optionalReprIsPayload(zcu)) return operand; - const llvm_optional_ty = try o.lowerType(optional_ty); + const llvm_optional_ty = try o.lowerType(pt, optional_ty); if (isByRef(optional_ty, zcu)) { const directReturn = self.isNextRet(body_tail); const optional_ptr = if (directReturn) @@ -8056,7 +8030,7 @@ pub const FuncGen = struct { fn airWrapErrUnionPayload(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -8066,8 +8040,8 @@ pub const FuncGen = struct { if (!payload_ty.hasRuntimeBitsIgnoreComptime(zcu)) { return operand; } - const ok_err_code = try o.builder.intValue(try o.errorIntType(), 0); - const err_un_llvm_ty = try o.lowerType(err_un_ty); + const ok_err_code = try o.builder.intValue(try o.errorIntType(pt), 0); + const err_un_llvm_ty = try o.lowerType(pt, err_un_ty); const payload_offset = try errUnionPayloadOffset(payload_ty, pt); const error_offset = try errUnionErrorOffset(payload_ty, pt); @@ -8098,7 +8072,7 @@ pub const FuncGen = struct { fn airWrapErrUnionErr(self: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -8106,7 +8080,7 @@ pub const FuncGen = struct { const payload_ty = err_un_ty.errorUnionPayload(zcu); const operand = try self.resolveInst(ty_op.operand); if (!payload_ty.hasRuntimeBitsIgnoreComptime(zcu)) return operand; - const err_un_llvm_ty = try o.lowerType(err_un_ty); + const err_un_llvm_ty = try o.lowerType(pt, err_un_ty); const payload_offset = try errUnionPayloadOffset(payload_ty, pt); const error_offset = try errUnionErrorOffset(payload_ty, pt); @@ -8139,9 +8113,10 @@ pub const FuncGen = struct { fn airWasmMemorySize(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const index = pl_op.payload; - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); return self.wip.callIntrinsic(.normal, .none, .@"wasm.memory.size", &.{llvm_usize}, &.{ try o.builder.intValue(.i32, index), }, ""); @@ -8149,9 +8124,10 @@ pub const FuncGen = struct { fn airWasmMemoryGrow(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const index = pl_op.payload; - const llvm_isize = try o.lowerType(Type.isize); + const llvm_isize = try o.lowerType(pt, Type.isize); return self.wip.callIntrinsic(.normal, .none, .@"wasm.memory.grow", &.{llvm_isize}, &.{ try o.builder.intValue(.i32, index), try self.resolveInst(pl_op.operand), }, ""); @@ -8159,7 +8135,7 @@ pub const FuncGen = struct { fn airVectorStoreElem(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const data = self.air.instructions.items(.data)[@intFromEnum(inst)].vector_store_elem; const extra = self.air.extraData(Air.Bin, data.payload).data; @@ -8175,7 +8151,7 @@ pub const FuncGen = struct { // https://github.com/ziglang/zig/issues/18652#issuecomment-2452844908 const access_kind: Builder.MemoryAccessKind = if (vector_ptr_ty.isVolatilePtr(zcu)) .@"volatile" else .normal; - const elem_llvm_ty = try o.lowerType(vector_ptr_ty.childType(zcu)); + const elem_llvm_ty = try o.lowerType(pt, vector_ptr_ty.childType(zcu)); const alignment = vector_ptr_ty.ptrAlignment(zcu).toLlvm(); const loaded = try self.wip.load(access_kind, elem_llvm_ty, vector_ptr, alignment, ""); @@ -8186,14 +8162,16 @@ pub const FuncGen = struct { fn airRuntimeNavPtr(fg: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = fg.ng.object; + const pt = fg.ng.pt; const ty_nav = fg.air.instructions.items(.data)[@intFromEnum(inst)].ty_nav; - const llvm_ptr_const = try o.lowerNavRefValue(ty_nav.nav); + const llvm_ptr_const = try o.lowerNavRefValue(pt, ty_nav.nav); return llvm_ptr_const.toValue(); } fn airMin(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8205,7 +8183,7 @@ pub const FuncGen = struct { .normal, .none, if (scalar_ty.isSignedInt(zcu)) .smin else .umin, - &.{try o.lowerType(inst_ty)}, + &.{try o.lowerType(pt, inst_ty)}, &.{ lhs, rhs }, "", ); @@ -8213,7 +8191,8 @@ pub const FuncGen = struct { fn airMax(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8225,7 +8204,7 @@ pub const FuncGen = struct { .normal, .none, if (scalar_ty.isSignedInt(zcu)) .smax else .umax, - &.{try o.lowerType(inst_ty)}, + &.{try o.lowerType(pt, inst_ty)}, &.{ lhs, rhs }, "", ); @@ -8233,17 +8212,17 @@ pub const FuncGen = struct { fn airSlice(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const ptr = try self.resolveInst(bin_op.lhs); const len = try self.resolveInst(bin_op.rhs); const inst_ty = self.typeOfIndex(inst); - return self.wip.buildAggregate(try o.lowerType(inst_ty), &.{ ptr, len }, ""); + return self.wip.buildAggregate(try o.lowerType(pt, inst_ty), &.{ ptr, len }, ""); } fn airAdd(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8261,7 +8240,8 @@ pub const FuncGen = struct { unsigned_intrinsic: Builder.Intrinsic, ) !Builder.Value { const o = fg.ng.object; - const zcu = o.pt.zcu; + const pt = fg.ng.pt; + const zcu = pt.zcu; const bin_op = fg.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try fg.resolveInst(bin_op.lhs); @@ -8270,7 +8250,7 @@ pub const FuncGen = struct { const scalar_ty = inst_ty.scalarType(zcu); const intrinsic = if (scalar_ty.isSignedInt(zcu)) signed_intrinsic else unsigned_intrinsic; - const llvm_inst_ty = try o.lowerType(inst_ty); + const llvm_inst_ty = try o.lowerType(pt, inst_ty); const results = try fg.wip.callIntrinsic(.normal, .none, intrinsic, &.{llvm_inst_ty}, &.{ lhs, rhs }, ""); @@ -8309,7 +8289,8 @@ pub const FuncGen = struct { fn airAddSat(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8321,15 +8302,14 @@ pub const FuncGen = struct { .normal, .none, if (scalar_ty.isSignedInt(zcu)) .@"sadd.sat" else .@"uadd.sat", - &.{try o.lowerType(inst_ty)}, + &.{try o.lowerType(pt, inst_ty)}, &.{ lhs, rhs }, "", ); } fn airSub(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8350,7 +8330,8 @@ pub const FuncGen = struct { fn airSubSat(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8362,15 +8343,14 @@ pub const FuncGen = struct { .normal, .none, if (scalar_ty.isSignedInt(zcu)) .@"ssub.sat" else .@"usub.sat", - &.{try o.lowerType(inst_ty)}, + &.{try o.lowerType(pt, inst_ty)}, &.{ lhs, rhs }, "", ); } fn airMul(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8391,7 +8371,8 @@ pub const FuncGen = struct { fn airMulSat(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8403,7 +8384,7 @@ pub const FuncGen = struct { .normal, .none, if (scalar_ty.isSignedInt(zcu)) .@"smul.fix.sat" else .@"umul.fix.sat", - &.{try o.lowerType(inst_ty)}, + &.{try o.lowerType(pt, inst_ty)}, &.{ lhs, rhs, .@"0" }, "", ); @@ -8419,8 +8400,7 @@ pub const FuncGen = struct { } fn airDivTrunc(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8436,7 +8416,8 @@ pub const FuncGen = struct { fn airDivFloor(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8448,7 +8429,7 @@ pub const FuncGen = struct { return self.buildFloatOp(.floor, fast, inst_ty, 1, .{result}); } if (scalar_ty.isSignedInt(zcu)) { - const inst_llvm_ty = try o.lowerType(inst_ty); + const inst_llvm_ty = try o.lowerType(pt, inst_ty); const ExpectedContents = [std.math.big.int.calcTwosCompLimbCount(256)]std.math.big.Limb; var stack align(@max( @@ -8485,8 +8466,7 @@ pub const FuncGen = struct { } fn airDivExact(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8503,8 +8483,7 @@ pub const FuncGen = struct { } fn airRem(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { - const o = self.ng.object; - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); @@ -8521,12 +8500,13 @@ pub const FuncGen = struct { fn airMod(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); const rhs = try self.resolveInst(bin_op.rhs); const inst_ty = self.typeOfIndex(inst); - const inst_llvm_ty = try o.lowerType(inst_ty); + const inst_llvm_ty = try o.lowerType(pt, inst_ty); const scalar_ty = inst_ty.scalarType(zcu); if (scalar_ty.isRuntimeFloat()) { @@ -8574,17 +8554,18 @@ pub const FuncGen = struct { fn airPtrAdd(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const ptr = try self.resolveInst(bin_op.lhs); const offset = try self.resolveInst(bin_op.rhs); const ptr_ty = self.typeOf(bin_op.lhs); - const llvm_elem_ty = try o.lowerPtrElemTy(ptr_ty.childType(zcu)); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, ptr_ty.childType(zcu)); switch (ptr_ty.ptrSize(zcu)) { // It's a pointer to an array, so according to LLVM we need an extra GEP index. .one => return self.wip.gep(.inbounds, llvm_elem_ty, ptr, &.{ - try o.builder.intValue(try o.lowerType(Type.usize), 0), offset, + try o.builder.intValue(try o.lowerType(pt, Type.usize), 0), offset, }, ""), .c, .many => return self.wip.gep(.inbounds, llvm_elem_ty, ptr, &.{offset}, ""), .slice => { @@ -8596,18 +8577,19 @@ pub const FuncGen = struct { fn airPtrSub(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const ptr = try self.resolveInst(bin_op.lhs); const offset = try self.resolveInst(bin_op.rhs); const negative_offset = try self.wip.neg(offset, ""); const ptr_ty = self.typeOf(bin_op.lhs); - const llvm_elem_ty = try o.lowerPtrElemTy(ptr_ty.childType(zcu)); + const llvm_elem_ty = try o.lowerPtrElemTy(pt, ptr_ty.childType(zcu)); switch (ptr_ty.ptrSize(zcu)) { // It's a pointer to an array, so according to LLVM we need an extra GEP index. .one => return self.wip.gep(.inbounds, llvm_elem_ty, ptr, &.{ - try o.builder.intValue(try o.lowerType(Type.usize), 0), negative_offset, + try o.builder.intValue(try o.lowerType(pt, Type.usize), 0), negative_offset, }, ""), .c, .many => return self.wip.gep(.inbounds, llvm_elem_ty, ptr, &.{negative_offset}, ""), .slice => { @@ -8624,7 +8606,7 @@ pub const FuncGen = struct { unsigned_intrinsic: Builder.Intrinsic, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.Bin, ty_pl.payload).data; @@ -8637,8 +8619,8 @@ pub const FuncGen = struct { const inst_ty = self.typeOfIndex(inst); const intrinsic = if (scalar_ty.isSignedInt(zcu)) signed_intrinsic else unsigned_intrinsic; - const llvm_inst_ty = try o.lowerType(inst_ty); - const llvm_lhs_ty = try o.lowerType(lhs_ty); + const llvm_inst_ty = try o.lowerType(pt, inst_ty); + const llvm_lhs_ty = try o.lowerType(pt, lhs_ty); const results = try self.wip.callIntrinsic(.normal, .none, intrinsic, &.{llvm_lhs_ty}, &.{ lhs, rhs }, ""); @@ -8718,7 +8700,7 @@ pub const FuncGen = struct { return o.builder.addFunction( try o.builder.fnType(return_type, param_types, .normal), fn_name, - toLlvmAddressSpace(.generic, o.pt.zcu.getTarget()), + toLlvmAddressSpace(.generic, self.ng.pt.zcu.getTarget()), ); } @@ -8732,10 +8714,11 @@ pub const FuncGen = struct { params: [2]Builder.Value, ) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const target = zcu.getTarget(); const scalar_ty = ty.scalarType(zcu); - const scalar_llvm_ty = try o.lowerType(scalar_ty); + const scalar_llvm_ty = try o.lowerType(pt, scalar_ty); if (intrinsicsAllowed(scalar_ty, target)) { const cond: Builder.FloatCondition = switch (pred) { @@ -8838,10 +8821,11 @@ pub const FuncGen = struct { params: [params_len]Builder.Value, ) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const target = zcu.getTarget(); const scalar_ty = ty.scalarType(zcu); - const llvm_ty = try o.lowerType(ty); + const llvm_ty = try o.lowerType(pt, ty); if (op != .tan and intrinsicsAllowed(scalar_ty, target)) switch (op) { // Some operations are dedicated LLVM instructions, not available as intrinsics @@ -8979,7 +8963,7 @@ pub const FuncGen = struct { fn airShlWithOverflow(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.Bin, ty_pl.payload).data; @@ -8993,9 +8977,9 @@ pub const FuncGen = struct { const lhs_scalar_ty = lhs_ty.scalarType(zcu); const dest_ty = self.typeOfIndex(inst); - const llvm_dest_ty = try o.lowerType(dest_ty); + const llvm_dest_ty = try o.lowerType(pt, dest_ty); - const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(lhs_ty), ""); + const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(pt, lhs_ty), ""); const result = try self.wip.bin(.shl, lhs, casted_rhs, ""); const reconstructed = try self.wip.bin(if (lhs_scalar_ty.isSignedInt(zcu)) @@ -9052,7 +9036,8 @@ pub const FuncGen = struct { fn airShlExact(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); @@ -9063,7 +9048,7 @@ pub const FuncGen = struct { return self.ng.todo("implement vector shifts with scalar rhs", .{}); const lhs_scalar_ty = lhs_ty.scalarType(zcu); - const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(lhs_ty), ""); + const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(pt, lhs_ty), ""); return self.wip.bin(if (lhs_scalar_ty.isSignedInt(zcu)) .@"shl nsw" else @@ -9072,7 +9057,8 @@ pub const FuncGen = struct { fn airShl(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); @@ -9082,13 +9068,13 @@ pub const FuncGen = struct { if (lhs_ty.isVector(zcu) and !self.typeOf(bin_op.rhs).isVector(zcu)) return self.ng.todo("implement vector shifts with scalar rhs", .{}); - const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(lhs_ty), ""); + const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(pt, lhs_ty), ""); return self.wip.bin(.shl, lhs, casted_rhs, ""); } fn airShlSat(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; @@ -9097,7 +9083,7 @@ pub const FuncGen = struct { const lhs_ty = self.typeOf(bin_op.lhs); const lhs_info = lhs_ty.intInfo(zcu); - const llvm_lhs_ty = try o.lowerType(lhs_ty); + const llvm_lhs_ty = try o.lowerType(pt, lhs_ty); const llvm_lhs_scalar_ty = llvm_lhs_ty.scalarType(&o.builder); const rhs_ty = self.typeOf(bin_op.rhs); @@ -9105,7 +9091,7 @@ pub const FuncGen = struct { return self.ng.todo("implement vector shifts with scalar rhs", .{}); const rhs_info = rhs_ty.intInfo(zcu); assert(rhs_info.signedness == .unsigned); - const llvm_rhs_ty = try o.lowerType(rhs_ty); + const llvm_rhs_ty = try o.lowerType(pt, rhs_ty); const llvm_rhs_scalar_ty = llvm_rhs_ty.scalarType(&o.builder); const result = try self.wip.callIntrinsic( @@ -9168,7 +9154,8 @@ pub const FuncGen = struct { fn airShr(self: *FuncGen, inst: Air.Inst.Index, is_exact: bool) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.resolveInst(bin_op.lhs); @@ -9179,7 +9166,7 @@ pub const FuncGen = struct { return self.ng.todo("implement vector shifts with scalar rhs", .{}); const lhs_scalar_ty = lhs_ty.scalarType(zcu); - const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(lhs_ty), ""); + const casted_rhs = try self.wip.conv(.unsigned, rhs, try o.lowerType(pt, lhs_ty), ""); const is_signed_int = lhs_scalar_ty.isSignedInt(zcu); return self.wip.bin(if (is_exact) @@ -9189,7 +9176,8 @@ pub const FuncGen = struct { fn airAbs(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); const operand_ty = self.typeOf(ty_op.operand); @@ -9200,7 +9188,7 @@ pub const FuncGen = struct { .normal, .none, .abs, - &.{try o.lowerType(operand_ty)}, + &.{try o.lowerType(pt, operand_ty)}, &.{ operand, try o.builder.intValue(.i1, 0) }, "", ), @@ -9211,10 +9199,11 @@ pub const FuncGen = struct { fn airIntCast(fg: *FuncGen, inst: Air.Inst.Index, safety: bool) !Builder.Value { const o = fg.ng.object; - const zcu = o.pt.zcu; + const pt = fg.ng.pt; + const zcu = pt.zcu; const ty_op = fg.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const dest_ty = fg.typeOfIndex(inst); - const dest_llvm_ty = try o.lowerType(dest_ty); + const dest_llvm_ty = try o.lowerType(pt, dest_ty); const operand = try fg.resolveInst(ty_op.operand); const operand_ty = fg.typeOf(ty_op.operand); const operand_info = operand_ty.intInfo(zcu); @@ -9243,8 +9232,8 @@ pub const FuncGen = struct { if (!have_min_check and !have_max_check) break :safety; - const operand_llvm_ty = try o.lowerType(operand_ty); - const operand_scalar_llvm_ty = try o.lowerType(operand_scalar); + const operand_llvm_ty = try o.lowerType(pt, operand_ty); + const operand_scalar_llvm_ty = try o.lowerType(pt, operand_scalar); const is_vector = operand_ty.zigTypeTag(zcu) == .vector; assert(is_vector == (dest_ty.zigTypeTag(zcu) == .vector)); @@ -9313,15 +9302,17 @@ pub const FuncGen = struct { fn airTrunc(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); - const dest_llvm_ty = try o.lowerType(self.typeOfIndex(inst)); + const dest_llvm_ty = try o.lowerType(pt, self.typeOfIndex(inst)); return self.wip.cast(.trunc, operand, dest_llvm_ty, ""); } fn airFptrunc(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); const operand_ty = self.typeOf(ty_op.operand); @@ -9329,10 +9320,10 @@ pub const FuncGen = struct { const target = zcu.getTarget(); if (intrinsicsAllowed(dest_ty, target) and intrinsicsAllowed(operand_ty, target)) { - return self.wip.cast(.fptrunc, operand, try o.lowerType(dest_ty), ""); + return self.wip.cast(.fptrunc, operand, try o.lowerType(pt, dest_ty), ""); } else { - const operand_llvm_ty = try o.lowerType(operand_ty); - const dest_llvm_ty = try o.lowerType(dest_ty); + const operand_llvm_ty = try o.lowerType(pt, operand_ty); + const dest_llvm_ty = try o.lowerType(pt, dest_ty); const dest_bits = dest_ty.floatBits(target); const src_bits = operand_ty.floatBits(target); @@ -9355,7 +9346,8 @@ pub const FuncGen = struct { fn airFpext(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); const operand_ty = self.typeOf(ty_op.operand); @@ -9363,10 +9355,10 @@ pub const FuncGen = struct { const target = zcu.getTarget(); if (intrinsicsAllowed(dest_ty, target) and intrinsicsAllowed(operand_ty, target)) { - return self.wip.cast(.fpext, operand, try o.lowerType(dest_ty), ""); + return self.wip.cast(.fpext, operand, try o.lowerType(pt, dest_ty), ""); } else { - const operand_llvm_ty = try o.lowerType(operand_ty); - const dest_llvm_ty = try o.lowerType(dest_ty); + const operand_llvm_ty = try o.lowerType(pt, operand_ty); + const dest_llvm_ty = try o.lowerType(pt, dest_ty); const dest_bits = dest_ty.scalarType(zcu).floatBits(target); const src_bits = operand_ty.scalarType(zcu).floatBits(target); @@ -9403,11 +9395,11 @@ pub const FuncGen = struct { fn bitCast(self: *FuncGen, operand: Builder.Value, operand_ty: Type, inst_ty: Type) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const operand_is_ref = isByRef(operand_ty, zcu); const result_is_ref = isByRef(inst_ty, zcu); - const llvm_dest_ty = try o.lowerType(inst_ty); + const llvm_dest_ty = try o.lowerType(pt, inst_ty); if (operand_is_ref and result_is_ref) { // They are both pointers, so just return the same opaque pointer :) @@ -9442,7 +9434,7 @@ pub const FuncGen = struct { } else { // If the ABI size of the element type is not evenly divisible by size in bits; // a simple bitcast will not work, and we fall back to extractelement. - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); const usize_zero = try o.builder.intValue(llvm_usize, 0); const vector_len = operand_ty.arrayLen(zcu); var i: u64 = 0; @@ -9458,7 +9450,7 @@ pub const FuncGen = struct { return array_ptr; } else if (operand_ty.zigTypeTag(zcu) == .array and inst_ty.zigTypeTag(zcu) == .vector) { const elem_ty = operand_ty.childType(zcu); - const llvm_vector_ty = try o.lowerType(inst_ty); + const llvm_vector_ty = try o.lowerType(pt, inst_ty); if (!operand_is_ref) return self.ng.todo("implement bitcast non-ref array to vector", .{}); const bitcast_ok = elem_ty.bitSize(zcu) == elem_ty.abiSize(zcu) * 8; @@ -9470,9 +9462,9 @@ pub const FuncGen = struct { } else { // If the ABI size of the element type is not evenly divisible by size in bits; // a simple bitcast will not work, and we fall back to extractelement. - const array_llvm_ty = try o.lowerType(operand_ty); - const elem_llvm_ty = try o.lowerType(elem_ty); - const llvm_usize = try o.lowerType(Type.usize); + const array_llvm_ty = try o.lowerType(pt, operand_ty); + const elem_llvm_ty = try o.lowerType(pt, elem_ty); + const llvm_usize = try o.lowerType(pt, Type.usize); const usize_zero = try o.builder.intValue(llvm_usize, 0); const vector_len = operand_ty.arrayLen(zcu); var vector = try o.builder.poisonValue(llvm_vector_ty); @@ -9519,7 +9511,7 @@ pub const FuncGen = struct { fn airArg(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const arg_val = self.args[self.arg_index]; self.arg_index += 1; @@ -9547,7 +9539,7 @@ pub const FuncGen = struct { self.file, self.scope, lbrace_line, - try o.lowerDebugType(inst_ty), + try o.lowerDebugType(pt, inst_ty), self.arg_index, ); @@ -9611,28 +9603,28 @@ pub const FuncGen = struct { fn airAlloc(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ptr_ty = self.typeOfIndex(inst); const pointee_type = ptr_ty.childType(zcu); if (!pointee_type.isFnOrHasRuntimeBitsIgnoreComptime(zcu)) - return (try o.lowerPtrToVoid(ptr_ty)).toValue(); + return (try o.lowerPtrToVoid(pt, ptr_ty)).toValue(); - const pointee_llvm_ty = try o.lowerType(pointee_type); + const pointee_llvm_ty = try o.lowerType(pt, pointee_type); const alignment = ptr_ty.ptrAlignment(zcu).toLlvm(); return self.buildAlloca(pointee_llvm_ty, alignment); } fn airRetPtr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ptr_ty = self.typeOfIndex(inst); const ret_ty = ptr_ty.childType(zcu); if (!ret_ty.isFnOrHasRuntimeBitsIgnoreComptime(zcu)) - return (try o.lowerPtrToVoid(ptr_ty)).toValue(); + return (try o.lowerPtrToVoid(pt, ptr_ty)).toValue(); if (self.ret_ptr != .none) return self.ret_ptr; - const ret_llvm_ty = try o.lowerType(ret_ty); + const ret_llvm_ty = try o.lowerType(pt, ret_ty); const alignment = ptr_ty.ptrAlignment(zcu).toLlvm(); return self.buildAlloca(ret_llvm_ty, alignment); } @@ -9644,13 +9636,13 @@ pub const FuncGen = struct { llvm_ty: Builder.Type, alignment: Builder.Alignment, ) Allocator.Error!Builder.Value { - const target = self.ng.object.pt.zcu.getTarget(); + const target = self.ng.pt.zcu.getTarget(); return buildAllocaInner(&self.wip, llvm_ty, alignment, target); } fn airStore(self: *FuncGen, inst: Air.Inst.Index, safety: bool) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const dest_ptr = try self.resolveInst(bin_op.lhs); @@ -9685,7 +9677,7 @@ pub const FuncGen = struct { self.maybeMarkAllowZeroAccess(ptr_info); - const len = try o.builder.intValue(try o.lowerType(Type.usize), operand_ty.abiSize(zcu)); + const len = try o.builder.intValue(try o.lowerType(pt, Type.usize), operand_ty.abiSize(zcu)); _ = try self.wip.callMemSet( dest_ptr, ptr_ty.ptrAlignment(zcu).toLlvm(), @@ -9714,8 +9706,7 @@ pub const FuncGen = struct { /// /// The first instruction of `body_tail` is the one whose copy we want to elide. fn canElideLoad(fg: *FuncGen, body_tail: []const Air.Inst.Index) bool { - const o = fg.ng.object; - const zcu = o.pt.zcu; + const zcu = fg.ng.pt.zcu; const ip = &zcu.intern_pool; for (body_tail[1..]) |body_inst| { switch (fg.liveness.categorizeOperand(fg.air, zcu, body_inst, body_tail[0], ip)) { @@ -9730,8 +9721,7 @@ pub const FuncGen = struct { } fn airLoad(fg: *FuncGen, body_tail: []const Air.Inst.Index) !Builder.Value { - const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; const inst = body_tail[0]; const ty_op = fg.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -9765,8 +9755,9 @@ pub const FuncGen = struct { fn airRetAddr(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { _ = inst; const o = self.ng.object; - const llvm_usize = try o.lowerType(Type.usize); - if (!target_util.supportsReturnAddress(o.pt.zcu.getTarget(), self.ng.ownerModule().optimize_mode)) { + const pt = self.ng.pt; + const llvm_usize = try o.lowerType(pt, Type.usize); + if (!target_util.supportsReturnAddress(self.ng.pt.zcu.getTarget(), self.ng.ownerModule().optimize_mode)) { // https://github.com/ziglang/zig/issues/11946 return o.builder.intValue(llvm_usize, 0); } @@ -9777,8 +9768,9 @@ pub const FuncGen = struct { fn airFrameAddress(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { _ = inst; const o = self.ng.object; + const pt = self.ng.pt; const result = try self.wip.callIntrinsic(.normal, .none, .frameaddress, &.{.ptr}, &.{.@"0"}, ""); - return self.wip.cast(.ptrtoint, result, try o.lowerType(Type.usize), ""); + return self.wip.cast(.ptrtoint, result, try o.lowerType(pt, Type.usize), ""); } fn airCmpxchg( @@ -9787,7 +9779,7 @@ pub const FuncGen = struct { kind: Builder.Function.Instruction.CmpXchg.Kind, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.Cmpxchg, ty_pl.payload).data; @@ -9796,8 +9788,8 @@ pub const FuncGen = struct { var expected_value = try self.resolveInst(extra.expected_value); var new_value = try self.resolveInst(extra.new_value); const operand_ty = ptr_ty.childType(zcu); - const llvm_operand_ty = try o.lowerType(operand_ty); - const llvm_abi_ty = try o.getAtomicAbiType(operand_ty, false); + const llvm_operand_ty = try o.lowerType(pt, operand_ty); + const llvm_abi_ty = try o.getAtomicAbiType(pt, operand_ty, false); if (llvm_abi_ty != .none) { // operand needs widening and truncating const signedness: Builder.Function.Instruction.Cast.Signedness = @@ -9840,7 +9832,7 @@ pub const FuncGen = struct { fn airAtomicRmw(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const extra = self.air.extraData(Air.AtomicRmw, pl_op.payload).data; @@ -9852,8 +9844,8 @@ pub const FuncGen = struct { const is_float = operand_ty.isRuntimeFloat(); const op = toLlvmAtomicRmwBinOp(extra.op(), is_signed_int, is_float); const ordering = toLlvmAtomicOrdering(extra.ordering()); - const llvm_abi_ty = try o.getAtomicAbiType(operand_ty, op == .xchg); - const llvm_operand_ty = try o.lowerType(operand_ty); + const llvm_abi_ty = try o.getAtomicAbiType(pt, operand_ty, op == .xchg); + const llvm_operand_ty = try o.lowerType(pt, operand_ty); const access_kind: Builder.MemoryAccessKind = if (ptr_ty.isVolatilePtr(zcu)) .@"volatile" else .normal; @@ -9896,7 +9888,7 @@ pub const FuncGen = struct { access_kind, op, ptr, - try self.wip.cast(.ptrtoint, operand, try o.lowerType(Type.usize), ""), + try self.wip.cast(.ptrtoint, operand, try o.lowerType(pt, Type.usize), ""), self.sync_scope, ordering, ptr_alignment, @@ -9906,7 +9898,7 @@ pub const FuncGen = struct { fn airAtomicLoad(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const atomic_load = self.air.instructions.items(.data)[@intFromEnum(inst)].atomic_load; const ptr = try self.resolveInst(atomic_load.ptr); @@ -9915,14 +9907,14 @@ pub const FuncGen = struct { const elem_ty = Type.fromInterned(info.child); if (!elem_ty.hasRuntimeBitsIgnoreComptime(zcu)) return .none; const ordering = toLlvmAtomicOrdering(atomic_load.order); - const llvm_abi_ty = try o.getAtomicAbiType(elem_ty, false); + const llvm_abi_ty = try o.getAtomicAbiType(pt, elem_ty, false); const ptr_alignment = (if (info.flags.alignment != .none) @as(InternPool.Alignment, info.flags.alignment) else Type.fromInterned(info.child).abiAlignment(zcu)).toLlvm(); const access_kind: Builder.MemoryAccessKind = if (info.flags.is_volatile) .@"volatile" else .normal; - const elem_llvm_ty = try o.lowerType(elem_ty); + const elem_llvm_ty = try o.lowerType(pt, elem_ty); self.maybeMarkAllowZeroAccess(info); @@ -9956,7 +9948,7 @@ pub const FuncGen = struct { ordering: Builder.AtomicOrdering, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const ptr_ty = self.typeOf(bin_op.lhs); @@ -9964,7 +9956,7 @@ pub const FuncGen = struct { if (!operand_ty.isFnOrHasRuntimeBitsIgnoreComptime(zcu)) return .none; const ptr = try self.resolveInst(bin_op.lhs); var element = try self.resolveInst(bin_op.rhs); - const llvm_abi_ty = try o.getAtomicAbiType(operand_ty, false); + const llvm_abi_ty = try o.getAtomicAbiType(pt, operand_ty, false); if (llvm_abi_ty != .none) { // operand needs widening @@ -9984,7 +9976,7 @@ pub const FuncGen = struct { fn airMemset(self: *FuncGen, inst: Air.Inst.Index, safety: bool) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const dest_slice = try self.resolveInst(bin_op.lhs); @@ -10081,13 +10073,13 @@ pub const FuncGen = struct { const body_block = try self.wip.block(1, "InlineMemsetBody"); const end_block = try self.wip.block(1, "InlineMemsetEnd"); - const llvm_usize_ty = try o.lowerType(Type.usize); + const llvm_usize_ty = try o.lowerType(pt, Type.usize); const len = switch (ptr_ty.ptrSize(zcu)) { .slice => try self.wip.extractValue(dest_slice, &.{1}, ""), .one => try o.builder.intValue(llvm_usize_ty, ptr_ty.childType(zcu).arrayLen(zcu)), .many, .c => unreachable, }; - const elem_llvm_ty = try o.lowerType(elem_ty); + const elem_llvm_ty = try o.lowerType(pt, elem_ty); const end_ptr = try self.wip.gep(.inbounds, elem_llvm_ty, dest_ptr, &.{len}, ""); _ = try self.wip.br(loop_block); @@ -10121,8 +10113,7 @@ pub const FuncGen = struct { } fn airMemcpy(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { - const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const dest_slice = try self.resolveInst(bin_op.lhs); @@ -10151,8 +10142,7 @@ pub const FuncGen = struct { } fn airMemmove(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { - const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const dest_slice = try self.resolveInst(bin_op.lhs); @@ -10178,7 +10168,7 @@ pub const FuncGen = struct { fn airSetUnionTag(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const un_ptr_ty = self.typeOf(bin_op.lhs); @@ -10199,7 +10189,7 @@ pub const FuncGen = struct { return .none; } const tag_index = @intFromBool(layout.tag_align.compare(.lt, layout.payload_align)); - const tag_field_ptr = try self.wip.gepStruct(try o.lowerType(un_ty), union_ptr, tag_index, ""); + const tag_field_ptr = try self.wip.gepStruct(try o.lowerType(pt, un_ty), union_ptr, tag_index, ""); // TODO alignment on this store _ = try self.wip.store(access_kind, new_tag, tag_field_ptr, .default); return .none; @@ -10207,7 +10197,7 @@ pub const FuncGen = struct { fn airGetUnionTag(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const un_ty = self.typeOf(ty_op.operand); @@ -10215,7 +10205,7 @@ pub const FuncGen = struct { if (layout.tag_size == 0) return .none; const union_handle = try self.resolveInst(ty_op.operand); if (isByRef(un_ty, zcu)) { - const llvm_un_ty = try o.lowerType(un_ty); + const llvm_un_ty = try o.lowerType(pt, un_ty); if (layout.payload_size == 0) return self.wip.load(.normal, llvm_un_ty, union_handle, .default, ""); const tag_index = @intFromBool(layout.tag_align.compare(.lt, layout.payload_align)); @@ -10247,6 +10237,7 @@ pub const FuncGen = struct { fn airClzCtz(self: *FuncGen, inst: Air.Inst.Index, intrinsic: Builder.Intrinsic) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const inst_ty = self.typeOfIndex(inst); const operand_ty = self.typeOf(ty_op.operand); @@ -10256,15 +10247,16 @@ pub const FuncGen = struct { .normal, .none, intrinsic, - &.{try o.lowerType(operand_ty)}, + &.{try o.lowerType(pt, operand_ty)}, &.{ operand, .false }, "", ); - return self.wip.conv(.unsigned, result, try o.lowerType(inst_ty), ""); + return self.wip.conv(.unsigned, result, try o.lowerType(pt, inst_ty), ""); } fn airBitOp(self: *FuncGen, inst: Air.Inst.Index, intrinsic: Builder.Intrinsic) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const inst_ty = self.typeOfIndex(inst); const operand_ty = self.typeOf(ty_op.operand); @@ -10274,16 +10266,17 @@ pub const FuncGen = struct { .normal, .none, intrinsic, - &.{try o.lowerType(operand_ty)}, + &.{try o.lowerType(pt, operand_ty)}, &.{operand}, "", ); - return self.wip.conv(.unsigned, result, try o.lowerType(inst_ty), ""); + return self.wip.conv(.unsigned, result, try o.lowerType(pt, inst_ty), ""); } fn airByteSwap(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_ty = self.typeOf(ty_op.operand); var bits = operand_ty.intInfo(zcu).bits; @@ -10291,7 +10284,7 @@ pub const FuncGen = struct { const inst_ty = self.typeOfIndex(inst); var operand = try self.resolveInst(ty_op.operand); - var llvm_operand_ty = try o.lowerType(operand_ty); + var llvm_operand_ty = try o.lowerType(pt, operand_ty); if (bits % 16 == 8) { // If not an even byte-multiple, we need zero-extend + shift-left 1 byte @@ -10312,12 +10305,13 @@ pub const FuncGen = struct { const result = try self.wip.callIntrinsic(.normal, .none, .bswap, &.{llvm_operand_ty}, &.{operand}, ""); - return self.wip.conv(.unsigned, result, try o.lowerType(inst_ty), ""); + return self.wip.conv(.unsigned, result, try o.lowerType(pt, inst_ty), ""); } fn airErrorSetHasValue(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const ip = &zcu.intern_pool; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.resolveInst(ty_op.operand); @@ -10332,7 +10326,7 @@ pub const FuncGen = struct { for (0..names.len) |name_index| { const err_int = ip.getErrorValueIfExists(names.get(ip)[name_index]).?; - const this_tag_int_value = try o.builder.intConst(try o.errorIntType(), err_int); + const this_tag_int_value = try o.builder.intConst(try o.errorIntType(pt), err_int); try wip_switch.addCase(this_tag_int_value, valid_block, &self.wip); } self.wip.cursor = .{ .block = valid_block }; @@ -10367,7 +10361,7 @@ pub const FuncGen = struct { fn getIsNamedEnumValueFunction(self: *FuncGen, enum_ty: Type) !Builder.Function.Index { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const enum_type = ip.loadEnumType(enum_ty.toIntern()); @@ -10379,7 +10373,7 @@ pub const FuncGen = struct { const target = &zcu.root_mod.resolved_target.result; const function_index = try o.builder.addFunction( - try o.builder.fnType(.i1, &.{try o.lowerType(Type.fromInterned(enum_type.tag_ty))}, .normal), + try o.builder.fnType(.i1, &.{try o.lowerType(pt, Type.fromInterned(enum_type.tag_ty))}, .normal), try o.builder.strtabStringFmt("__zig_is_named_enum_value_{f}", .{enum_type.name.fmt(ip)}), toLlvmAddressSpace(.generic, target), ); @@ -10408,6 +10402,7 @@ pub const FuncGen = struct { for (0..enum_type.names.len) |field_index| { const this_tag_int_value = try o.lowerValue( + pt, (try pt.enumValueFieldIndex(enum_ty, @intCast(field_index))).toIntern(), ); try wip_switch.addCase(this_tag_int_value, named_block, &wip); @@ -10424,11 +10419,12 @@ pub const FuncGen = struct { fn airTagName(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand = try self.resolveInst(un_op); const enum_ty = self.typeOf(un_op); - const llvm_fn = try o.getEnumTagNameFunction(enum_ty); + const llvm_fn = try o.getEnumTagNameFunction(pt, enum_ty); return self.wip.call( .normal, .fastcc, @@ -10442,10 +10438,11 @@ pub const FuncGen = struct { fn airErrorName(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand = try self.resolveInst(un_op); const slice_ty = self.typeOfIndex(inst); - const slice_llvm_ty = try o.lowerType(slice_ty); + const slice_llvm_ty = try o.lowerType(pt, slice_ty); const error_name_table_ptr = try self.getErrorNameTable(); const error_name_table = @@ -10457,10 +10454,11 @@ pub const FuncGen = struct { fn airSplat(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const scalar = try self.resolveInst(ty_op.operand); const vector_ty = self.typeOfIndex(inst); - return self.wip.splatVector(try o.lowerType(vector_ty), scalar, ""); + return self.wip.splatVector(try o.lowerType(pt, vector_ty), scalar, ""); } fn airSelect(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { @@ -10475,7 +10473,7 @@ pub const FuncGen = struct { fn airShuffleOne(fg: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; const gpa = zcu.gpa; @@ -10484,9 +10482,9 @@ pub const FuncGen = struct { const operand = try fg.resolveInst(unwrapped.operand); const mask = unwrapped.mask; const operand_ty = fg.typeOf(unwrapped.operand); - const llvm_operand_ty = try o.lowerType(operand_ty); - const llvm_result_ty = try o.lowerType(unwrapped.result_ty); - const llvm_elem_ty = try o.lowerType(unwrapped.result_ty.childType(zcu)); + const llvm_operand_ty = try o.lowerType(pt, operand_ty); + const llvm_result_ty = try o.lowerType(pt, unwrapped.result_ty); + const llvm_elem_ty = try o.lowerType(pt, unwrapped.result_ty.childType(zcu)); const llvm_poison_elem = try o.builder.poisonConst(llvm_elem_ty); const llvm_poison_mask_elem = try o.builder.poisonConst(.i32); const llvm_mask_ty = try o.builder.vectorType(.normal, @intCast(mask.len), .i32); @@ -10516,7 +10514,7 @@ pub const FuncGen = struct { .elem => llvm_poison_elem, .value => |val| if (!Value.fromInterned(val).isUndef(zcu)) elem: { any_defined_comptime_value = true; - break :elem try o.lowerValue(val); + break :elem try o.lowerValue(pt, val); } else llvm_poison_elem, }; } @@ -10582,14 +10580,14 @@ pub const FuncGen = struct { fn airShuffleTwo(fg: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; const gpa = zcu.gpa; const unwrapped = fg.air.unwrapShuffleTwo(zcu, inst); const mask = unwrapped.mask; - const llvm_elem_ty = try o.lowerType(unwrapped.result_ty.childType(zcu)); + const llvm_elem_ty = try o.lowerType(pt, unwrapped.result_ty.childType(zcu)); const llvm_mask_ty = try o.builder.vectorType(.normal, @intCast(mask.len), .i32); const llvm_poison_mask_elem = try o.builder.poisonConst(.i32); @@ -10681,7 +10679,8 @@ pub const FuncGen = struct { accum_init: Builder.Value, ) !Builder.Value { const o = self.ng.object; - const usize_ty = try o.lowerType(Type.usize); + const pt = self.ng.pt; + const usize_ty = try o.lowerType(pt, Type.usize); const llvm_vector_len = try o.builder.intValue(usize_ty, vector_len); const llvm_result_ty = accum_init.typeOfWip(&self.wip); @@ -10735,15 +10734,16 @@ pub const FuncGen = struct { fn airReduce(self: *FuncGen, inst: Air.Inst.Index, fast: Builder.FastMathKind) !Builder.Value { const o = self.ng.object; - const zcu = o.pt.zcu; + const pt = self.ng.pt; + const zcu = pt.zcu; const target = zcu.getTarget(); const reduce = self.air.instructions.items(.data)[@intFromEnum(inst)].reduce; const operand = try self.resolveInst(reduce.operand); const operand_ty = self.typeOf(reduce.operand); - const llvm_operand_ty = try o.lowerType(operand_ty); + const llvm_operand_ty = try o.lowerType(pt, operand_ty); const scalar_ty = self.typeOfIndex(inst); - const llvm_scalar_ty = try o.lowerType(scalar_ty); + const llvm_scalar_ty = try o.lowerType(pt, scalar_ty); switch (reduce.operation) { .And, .Or, .Xor => return self.wip.callIntrinsic(.normal, .none, switch (reduce.operation) { @@ -10845,14 +10845,14 @@ pub const FuncGen = struct { fn airAggregateInit(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const result_ty = self.typeOfIndex(inst); const len: usize = @intCast(result_ty.arrayLen(zcu)); const elements: []const Air.Inst.Ref = @ptrCast(self.air.extra.items[ty_pl.payload..][0..len]); - const llvm_result_ty = try o.lowerType(result_ty); + const llvm_result_ty = try o.lowerType(pt, result_ty); switch (result_ty.zigTypeTag(zcu)) { .vector => { @@ -10933,7 +10933,7 @@ pub const FuncGen = struct { .array => { assert(isByRef(result_ty, zcu)); - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); const usize_zero = try o.builder.intValue(llvm_usize, 0); const alignment = result_ty.abiAlignment(zcu).toLlvm(); const alloca_inst = try self.buildAlloca(llvm_result_ty, alignment); @@ -10966,13 +10966,13 @@ pub const FuncGen = struct { fn airUnionInit(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.UnionInit, ty_pl.payload).data; const union_ty = self.typeOfIndex(inst); - const union_llvm_ty = try o.lowerType(union_ty); + const union_llvm_ty = try o.lowerType(pt, union_ty); const layout = union_ty.unionGetLayout(zcu); const union_obj = zcu.typeToUnion(union_ty).?; @@ -11014,10 +11014,10 @@ pub const FuncGen = struct { const result_ptr = try self.buildAlloca(union_llvm_ty, alignment); const llvm_payload = try self.resolveInst(extra.init); const field_ty = Type.fromInterned(union_obj.field_types.get(ip)[extra.field_index]); - const field_llvm_ty = try o.lowerType(field_ty); + const field_llvm_ty = try o.lowerType(pt, field_ty); const field_size = field_ty.abiSize(zcu); const field_align = union_ty.fieldAlignment(extra.field_index, zcu); - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); const usize_zero = try o.builder.intValue(llvm_usize, 0); const llvm_union_ty = t: { @@ -11035,7 +11035,7 @@ pub const FuncGen = struct { }); }; if (layout.tag_size == 0) break :t try o.builder.structType(.normal, &.{payload_ty}); - const tag_ty = try o.lowerType(Type.fromInterned(union_obj.enum_tag_ty)); + const tag_ty = try o.lowerType(pt, Type.fromInterned(union_obj.enum_tag_ty)); var fields: [3]Builder.Type = undefined; var fields_len: usize = 2; if (layout.tag_align.compare(.gte, layout.payload_align)) { @@ -11076,7 +11076,7 @@ pub const FuncGen = struct { const tag_index = @intFromBool(layout.tag_align.compare(.lt, layout.payload_align)); const indices: [2]Builder.Value = .{ usize_zero, try o.builder.intValue(.i32, tag_index) }; const field_ptr = try self.wip.gep(.inbounds, llvm_union_ty, result_ptr, &indices, ""); - const tag_ty = try o.lowerType(Type.fromInterned(union_obj.enum_tag_ty)); + const tag_ty = try o.lowerType(pt, Type.fromInterned(union_obj.enum_tag_ty)); var big_int_space: Value.BigIntSpace = undefined; const tag_big_int = tag_int_val.toBigInt(&big_int_space, zcu); const llvm_tag = try o.builder.bigIntValue(tag_ty, tag_big_int); @@ -11106,7 +11106,7 @@ pub const FuncGen = struct { // by the target. // To work around this, don't emit llvm.prefetch in this case. // See https://bugs.llvm.org/show_bug.cgi?id=21037 - const zcu = o.pt.zcu; + const zcu = self.ng.pt.zcu; const target = zcu.getTarget(); switch (prefetch.cache) { .instruction => switch (target.cpu.arch) { @@ -11139,11 +11139,12 @@ pub const FuncGen = struct { fn airAddrSpaceCast(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; + const pt = self.ng.pt; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const inst_ty = self.typeOfIndex(inst); const operand = try self.resolveInst(ty_op.operand); - return self.wip.cast(.addrspacecast, operand, try o.lowerType(inst_ty), ""); + return self.wip.cast(.addrspacecast, operand, try o.lowerType(pt, inst_ty), ""); } fn workIntrinsic( @@ -11161,8 +11162,7 @@ pub const FuncGen = struct { } fn airWorkItemId(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { - const o = self.ng.object; - const target = o.pt.zcu.getTarget(); + const target = self.ng.pt.zcu.getTarget(); const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const dimension = pl_op.payload; @@ -11176,7 +11176,8 @@ pub const FuncGen = struct { fn airWorkGroupSize(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { const o = self.ng.object; - const target = o.pt.zcu.getTarget(); + const pt = self.ng.pt; + const target = pt.zcu.getTarget(); const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const dimension = pl_op.payload; @@ -11193,7 +11194,7 @@ pub const FuncGen = struct { // Load the work_group_* member from the struct as u16. // Just treat the dispatch pointer as an array of u16 to keep things simple. const workgroup_size_ptr = try self.wip.gep(.inbounds, .i16, dispatch_ptr, &.{ - try o.builder.intValue(try o.lowerType(Type.usize), 2 + dimension), + try o.builder.intValue(try o.lowerType(pt, Type.usize), 2 + dimension), }, ""); const workgroup_size_alignment = comptime Builder.Alignment.fromByteUnits(2); return self.wip.load(.normal, .i16, workgroup_size_ptr, workgroup_size_alignment, ""); @@ -11206,8 +11207,7 @@ pub const FuncGen = struct { } fn airWorkGroupId(self: *FuncGen, inst: Air.Inst.Index) !Builder.Value { - const o = self.ng.object; - const target = o.pt.zcu.getTarget(); + const target = self.ng.pt.zcu.getTarget(); const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const dimension = pl_op.payload; @@ -11221,7 +11221,7 @@ pub const FuncGen = struct { fn getErrorNameTable(self: *FuncGen) Allocator.Error!Builder.Variable.Index { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const table = o.error_name_table; if (table != .none) return table; @@ -11271,8 +11271,7 @@ pub const FuncGen = struct { opt_ty: Type, can_elide_load: bool, ) !Builder.Value { - const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; const payload_ty = opt_ty.optionalChild(zcu); @@ -11301,9 +11300,9 @@ pub const FuncGen = struct { non_null_bit: Builder.Value, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; - const optional_llvm_ty = try o.lowerType(optional_ty); + const optional_llvm_ty = try o.lowerType(pt, optional_ty); const non_null_field = try self.wip.cast(.zext, non_null_bit, .i8, ""); if (isByRef(optional_ty, zcu)) { @@ -11334,7 +11333,7 @@ pub const FuncGen = struct { field_index: u32, ) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const struct_ty = struct_ptr_ty.childType(zcu); switch (struct_ty.zigTypeTag(zcu)) { @@ -11357,12 +11356,12 @@ pub const FuncGen = struct { // Offset our operand pointer by the correct number of bytes. const byte_offset = @divExact(pt.structPackedFieldBitOffset(struct_type, field_index) + struct_ptr_ty_info.packed_offset.bit_offset, 8); if (byte_offset == 0) return struct_ptr; - const usize_ty = try o.lowerType(Type.usize); + const usize_ty = try o.lowerType(pt, Type.usize); const llvm_index = try o.builder.intValue(usize_ty, byte_offset); return self.wip.gep(.inbounds, .i8, struct_ptr, &.{llvm_index}, ""); }, else => { - const struct_llvm_ty = try o.lowerPtrElemTy(struct_ty); + const struct_llvm_ty = try o.lowerPtrElemTy(pt, struct_ty); if (o.llvmFieldIndex(struct_ty, field_index)) |llvm_field_index| { return self.wip.gepStruct(struct_llvm_ty, struct_ptr, llvm_field_index, ""); @@ -11372,7 +11371,7 @@ pub const FuncGen = struct { // the index to the element at index `1` to get a pointer to the end of // the struct. const llvm_index = try o.builder.intValue( - try o.lowerType(Type.usize), + try o.lowerType(pt, Type.usize), @intFromBool(struct_ty.hasRuntimeBitsIgnoreComptime(zcu)), ); return self.wip.gep(.inbounds, struct_llvm_ty, struct_ptr, &.{llvm_index}, ""); @@ -11383,7 +11382,7 @@ pub const FuncGen = struct { const layout = struct_ty.unionGetLayout(zcu); if (layout.payload_size == 0 or struct_ty.containerLayout(zcu) == .@"packed") return struct_ptr; const payload_index = @intFromBool(layout.tag_align.compare(.gte, layout.payload_align)); - const union_llvm_ty = try o.lowerType(struct_ty); + const union_llvm_ty = try o.lowerType(pt, struct_ty); return self.wip.gepStruct(union_llvm_ty, struct_ptr, payload_index, ""); }, else => unreachable, @@ -11403,9 +11402,9 @@ pub const FuncGen = struct { // => so load the byte aligned value and trunc the unwanted bits. const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; - const payload_llvm_ty = try o.lowerType(payload_ty); + const payload_llvm_ty = try o.lowerType(pt, payload_ty); const abi_size = payload_ty.abiSize(zcu); // llvm bug workarounds: @@ -11450,8 +11449,8 @@ pub const FuncGen = struct { access_kind: Builder.MemoryAccessKind, ) !Builder.Value { const o = fg.ng.object; - const pt = o.pt; - const pointee_llvm_ty = try o.lowerType(pointee_type); + const pt = fg.ng.pt; + const pointee_llvm_ty = try o.lowerType(pt, pointee_type); const result_align = InternPool.Alignment.fromLlvm(ptr_alignment) .max(pointee_type.abiAlignment(pt.zcu)).toLlvm(); const result_ptr = try fg.buildAlloca(pointee_llvm_ty, result_align); @@ -11461,7 +11460,7 @@ pub const FuncGen = struct { result_align, ptr, ptr_alignment, - try o.builder.intValue(try o.lowerType(Type.usize), size_bytes), + try o.builder.intValue(try o.lowerType(pt, Type.usize), size_bytes), access_kind, fg.disable_intrinsics, ); @@ -11473,7 +11472,7 @@ pub const FuncGen = struct { /// For isByRef=false types, it creates a load instruction and returns it. fn load(self: *FuncGen, ptr: Builder.Value, ptr_ty: Type) !Builder.Value { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const info = ptr_ty.ptrInfo(zcu); const elem_ty = Type.fromInterned(info.child); @@ -11490,7 +11489,7 @@ pub const FuncGen = struct { assert(info.flags.vector_index != .runtime); if (info.flags.vector_index != .none) { const index_u32 = try o.builder.intValue(.i32, info.flags.vector_index); - const vec_elem_ty = try o.lowerType(elem_ty); + const vec_elem_ty = try o.lowerType(pt, elem_ty); const vec_ty = try o.builder.vectorType(.normal, info.packed_offset.host_size, vec_elem_ty); const loaded_vector = try self.wip.load(access_kind, vec_ty, ptr, ptr_alignment, ""); @@ -11511,7 +11510,7 @@ pub const FuncGen = struct { const elem_bits = ptr_ty.childType(zcu).bitSize(zcu); const shift_amt = try o.builder.intValue(containing_int_ty, info.packed_offset.bit_offset); const shifted_value = try self.wip.bin(.lshr, containing_int, shift_amt, ""); - const elem_llvm_ty = try o.lowerType(elem_ty); + const elem_llvm_ty = try o.lowerType(pt, elem_ty); if (isByRef(elem_ty, zcu)) { const result_align = elem_ty.abiAlignment(zcu).toLlvm(); @@ -11546,7 +11545,7 @@ pub const FuncGen = struct { ordering: Builder.AtomicOrdering, ) !void { const o = self.ng.object; - const pt = o.pt; + const pt = self.ng.pt; const zcu = pt.zcu; const info = ptr_ty.ptrInfo(zcu); const elem_ty = Type.fromInterned(info.child); @@ -11560,7 +11559,7 @@ pub const FuncGen = struct { assert(info.flags.vector_index != .runtime); if (info.flags.vector_index != .none) { const index_u32 = try o.builder.intValue(.i32, info.flags.vector_index); - const vec_elem_ty = try o.lowerType(elem_ty); + const vec_elem_ty = try o.lowerType(pt, elem_ty); const vec_ty = try o.builder.vectorType(.normal, info.packed_offset.host_size, vec_elem_ty); const loaded_vector = try self.wip.load(.normal, vec_ty, ptr, ptr_alignment, ""); @@ -11629,7 +11628,7 @@ pub const FuncGen = struct { ptr_alignment, elem, elem_ty.abiAlignment(zcu).toLlvm(), - try o.builder.intValue(try o.lowerType(Type.usize), elem_ty.abiSize(zcu)), + try o.builder.intValue(try o.lowerType(pt, Type.usize), elem_ty.abiSize(zcu)), access_kind, self.disable_intrinsics, ); @@ -11638,7 +11637,8 @@ pub const FuncGen = struct { fn valgrindMarkUndef(fg: *FuncGen, ptr: Builder.Value, len: Builder.Value) Allocator.Error!void { const VG_USERREQ__MAKE_MEM_UNDEFINED = 1296236545; const o = fg.ng.object; - const usize_ty = try o.lowerType(Type.usize); + const pt = fg.ng.pt; + const usize_ty = try o.lowerType(pt, Type.usize); const zero = try o.builder.intValue(usize_ty, 0); const req = try o.builder.intValue(usize_ty, VG_USERREQ__MAKE_MEM_UNDEFINED); const ptr_as_usize = try fg.wip.cast(.ptrtoint, ptr, usize_ty, ""); @@ -11656,12 +11656,12 @@ pub const FuncGen = struct { a5: Builder.Value, ) Allocator.Error!Builder.Value { const o = fg.ng.object; - const pt = o.pt; + const pt = fg.ng.pt; const zcu = pt.zcu; const target = zcu.getTarget(); if (!target_util.hasValgrindSupport(target, .stage2_llvm)) return default_value; - const llvm_usize = try o.lowerType(Type.usize); + const llvm_usize = try o.lowerType(pt, Type.usize); const usize_alignment = Type.usize.abiAlignment(zcu).toLlvm(); const array_llvm_ty = try o.builder.arrayType(6, llvm_usize); @@ -11787,14 +11787,12 @@ pub const FuncGen = struct { } fn typeOf(fg: *FuncGen, inst: Air.Inst.Ref) Type { - const o = fg.ng.object; - const zcu = o.pt.zcu; + const zcu = fg.ng.pt.zcu; return fg.air.typeOf(inst, &zcu.intern_pool); } fn typeOfIndex(fg: *FuncGen, inst: Air.Inst.Index) Type { - const o = fg.ng.object; - const zcu = o.pt.zcu; + const zcu = fg.ng.pt.zcu; return fg.air.typeOfIndex(inst, &zcu.intern_pool); } }; @@ -12152,40 +12150,39 @@ fn firstParamSRetSystemV(ty: Type, zcu: *Zcu, target: *const std.Target) bool { /// In order to support the C calling convention, some return types need to be lowered /// completely differently in the function prototype to honor the C ABI, and then /// be effectively bitcasted to the actual return type. -fn lowerFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { - const pt = o.pt; +fn lowerFnRetTy(o: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { const zcu = pt.zcu; const return_type = Type.fromInterned(fn_info.return_type); if (!return_type.hasRuntimeBitsIgnoreComptime(zcu)) { // If the return type is an error set or an error union, then we make this // anyerror return type instead, so that it can be coerced into a function // pointer type which has anyerror as the return type. - return if (return_type.isError(zcu)) try o.errorIntType() else .void; + return if (return_type.isError(zcu)) try o.errorIntType(pt) else .void; } const target = zcu.getTarget(); switch (fn_info.cc) { .@"inline" => unreachable, - .auto => return if (returnTypeByRef(zcu, target, return_type)) .void else o.lowerType(return_type), + .auto => return if (returnTypeByRef(zcu, target, return_type)) .void else o.lowerType(pt, return_type), - .x86_64_sysv => return lowerSystemVFnRetTy(o, fn_info), - .x86_64_win => return lowerWin64FnRetTy(o, fn_info), - .x86_stdcall => return if (isScalar(zcu, return_type)) o.lowerType(return_type) else .void, - .x86_sysv, .x86_win => return if (isByRef(return_type, zcu)) .void else o.lowerType(return_type), + .x86_64_sysv => return lowerSystemVFnRetTy(o, pt, fn_info), + .x86_64_win => return lowerWin64FnRetTy(o, pt, fn_info), + .x86_stdcall => return if (isScalar(zcu, return_type)) o.lowerType(pt, return_type) else .void, + .x86_sysv, .x86_win => return if (isByRef(return_type, zcu)) .void else o.lowerType(pt, return_type), .aarch64_aapcs, .aarch64_aapcs_darwin, .aarch64_aapcs_win => switch (aarch64_c_abi.classifyType(return_type, zcu)) { .memory => return .void, - .float_array => return o.lowerType(return_type), - .byval => return o.lowerType(return_type), + .float_array => return o.lowerType(pt, return_type), + .byval => return o.lowerType(pt, return_type), .integer => return o.builder.intType(@intCast(return_type.bitSize(zcu))), .double_integer => return o.builder.arrayType(2, .i64), }, .arm_aapcs, .arm_aapcs_vfp => switch (arm_c_abi.classifyType(return_type, zcu, .ret)) { .memory, .i64_array => return .void, .i32_array => |len| return if (len == 1) .i32 else .void, - .byval => return o.lowerType(return_type), + .byval => return o.lowerType(pt, return_type), }, .mips_o32 => switch (mips_c_abi.classifyType(return_type, zcu, .ret)) { .memory, .i32_array => return .void, - .byval => return o.lowerType(return_type), + .byval => return o.lowerType(pt, return_type), }, .riscv64_lp64, .riscv32_ilp32 => switch (riscv_c_abi.classifyType(return_type, zcu)) { .memory => return .void, @@ -12195,53 +12192,52 @@ fn lowerFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Bu .double_integer => { return o.builder.structType(.normal, &.{ .i64, .i64 }); }, - .byval => return o.lowerType(return_type), + .byval => return o.lowerType(pt, return_type), .fields => { var types_len: usize = 0; var types: [8]Builder.Type = undefined; for (0..return_type.structFieldCount(zcu)) |field_index| { const field_ty = return_type.fieldType(field_index, zcu); if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue; - types[types_len] = try o.lowerType(field_ty); + types[types_len] = try o.lowerType(pt, field_ty); types_len += 1; } return o.builder.structType(.normal, types[0..types_len]); }, }, .wasm_mvp => switch (wasm_c_abi.classifyType(return_type, zcu)) { - .direct => |scalar_ty| return o.lowerType(scalar_ty), + .direct => |scalar_ty| return o.lowerType(pt, scalar_ty), .indirect => return .void, }, // TODO investigate other callconvs - else => return o.lowerType(return_type), + else => return o.lowerType(pt, return_type), } } -fn lowerWin64FnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { - const zcu = o.pt.zcu; +fn lowerWin64FnRetTy(o: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { + const zcu = pt.zcu; const return_type = Type.fromInterned(fn_info.return_type); switch (x86_64_abi.classifyWindows(return_type, zcu, zcu.getTarget())) { .integer => { if (isScalar(zcu, return_type)) { - return o.lowerType(return_type); + return o.lowerType(pt, return_type); } else { return o.builder.intType(@intCast(return_type.abiSize(zcu) * 8)); } }, .win_i128 => return o.builder.vectorType(.normal, 2, .i64), .memory => return .void, - .sse => return o.lowerType(return_type), + .sse => return o.lowerType(pt, return_type), else => unreachable, } } -fn lowerSystemVFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { - const pt = o.pt; +fn lowerSystemVFnRetTy(o: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType) Allocator.Error!Builder.Type { const zcu = pt.zcu; const ip = &zcu.intern_pool; const return_type = Type.fromInterned(fn_info.return_type); if (isScalar(zcu, return_type)) { - return o.lowerType(return_type); + return o.lowerType(pt, return_type); } const classes = x86_64_abi.classifySystemV(return_type, zcu, zcu.getTarget(), .ret); var types_index: u32 = 0; @@ -12305,6 +12301,7 @@ fn lowerSystemVFnRetTy(o: *Object, fn_info: InternPool.Key.FuncType) Allocator.E const ParamTypeIterator = struct { object: *Object, + pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType, zig_index: u32, llvm_index: u32, @@ -12327,7 +12324,7 @@ const ParamTypeIterator = struct { pub fn next(it: *ParamTypeIterator) Allocator.Error!?Lowering { if (it.zig_index >= it.fn_info.param_types.len) return null; - const ip = &it.object.pt.zcu.intern_pool; + const ip = &it.pt.zcu.intern_pool; const ty = it.fn_info.param_types.get(ip)[it.zig_index]; it.byval_attr = false; return nextInner(it, Type.fromInterned(ty)); @@ -12335,7 +12332,8 @@ const ParamTypeIterator = struct { /// `airCall` uses this instead of `next` so that it can take into account variadic functions. pub fn nextCall(it: *ParamTypeIterator, fg: *FuncGen, args: []const Air.Inst.Ref) Allocator.Error!?Lowering { - const ip = &it.object.pt.zcu.intern_pool; + assert(std.meta.eql(it.pt, fg.ng.pt)); + const ip = &it.pt.zcu.intern_pool; if (it.zig_index >= it.fn_info.param_types.len) { if (it.zig_index >= args.len) { return null; @@ -12348,7 +12346,7 @@ const ParamTypeIterator = struct { } fn nextInner(it: *ParamTypeIterator, ty: Type) Allocator.Error!?Lowering { - const pt = it.object.pt; + const pt = it.pt; const zcu = pt.zcu; const target = zcu.getTarget(); @@ -12448,7 +12446,7 @@ const ParamTypeIterator = struct { for (0..ty.structFieldCount(zcu)) |field_index| { const field_ty = ty.fieldType(field_index, zcu); if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue; - it.types_buffer[it.types_len] = try it.object.lowerType(field_ty); + it.types_buffer[it.types_len] = try it.object.lowerType(pt, field_ty); it.types_len += 1; } it.llvm_index += it.types_len - 1; @@ -12464,7 +12462,7 @@ const ParamTypeIterator = struct { return .byval; } else { var types_buffer: [8]Builder.Type = undefined; - types_buffer[0] = try it.object.lowerType(scalar_ty); + types_buffer[0] = try it.object.lowerType(pt, scalar_ty); it.types_buffer = types_buffer; it.types_len = 1; it.llvm_index += 1; @@ -12489,7 +12487,7 @@ const ParamTypeIterator = struct { } fn nextWin64(it: *ParamTypeIterator, ty: Type) ?Lowering { - const zcu = it.object.pt.zcu; + const zcu = it.pt.zcu; switch (x86_64_abi.classifyWindows(ty, zcu, zcu.getTarget())) { .integer => { if (isScalar(zcu, ty)) { @@ -12522,7 +12520,7 @@ const ParamTypeIterator = struct { } fn nextSystemV(it: *ParamTypeIterator, ty: Type) Allocator.Error!?Lowering { - const zcu = it.object.pt.zcu; + const zcu = it.pt.zcu; const ip = &zcu.intern_pool; const classes = x86_64_abi.classifySystemV(ty, zcu, zcu.getTarget(), .arg); if (classes[0] == .memory) { @@ -12615,9 +12613,10 @@ const ParamTypeIterator = struct { } }; -fn iterateParamTypes(object: *Object, fn_info: InternPool.Key.FuncType) ParamTypeIterator { +fn iterateParamTypes(object: *Object, pt: Zcu.PerThread, fn_info: InternPool.Key.FuncType) ParamTypeIterator { return .{ .object = object, + .pt = pt, .fn_info = fn_info, .zig_index = 0, .llvm_index = 0, diff --git a/src/codegen/spirv.zig b/src/codegen/spirv.zig index f263e567e8..255e957c8b 100644 --- a/src/codegen/spirv.zig +++ b/src/codegen/spirv.zig @@ -15,9 +15,7 @@ const InternPool = @import("../InternPool.zig"); const spec = @import("spirv/spec.zig"); const Opcode = spec.Opcode; const Word = spec.Word; -const IdRef = spec.IdRef; -const IdResult = spec.IdResult; -const IdResultType = spec.IdResultType; +const Id = spec.Id; const StorageClass = spec.StorageClass; const SpvModule = @import("spirv/Module.zig"); @@ -26,7 +24,7 @@ const IdRange = SpvModule.IdRange; const SpvSection = @import("spirv/Section.zig"); const SpvAssembler = @import("spirv/Assembler.zig"); -const InstMap = std.AutoHashMapUnmanaged(Air.Inst.Index, IdRef); +const InstMap = std.AutoHashMapUnmanaged(Air.Inst.Index, Id); pub fn legalizeFeatures(_: *const std.Target) *const Air.Legalize.Features { return comptime &.initMany(&.{ @@ -42,10 +40,10 @@ pub fn legalizeFeatures(_: *const std.Target) *const Air.Legalize.Features { pub const zig_call_abi_ver = 3; pub const big_int_bits = 32; -const InternMap = std.AutoHashMapUnmanaged(struct { InternPool.Index, NavGen.Repr }, IdResult); +const InternMap = std.AutoHashMapUnmanaged(struct { InternPool.Index, NavGen.Repr }, Id); const PtrTypeMap = std.AutoHashMapUnmanaged( struct { InternPool.Index, StorageClass, NavGen.Repr }, - struct { ty_id: IdRef, fwd_emitted: bool }, + struct { ty_id: Id, fwd_emitted: bool }, ); const ControlFlow = union(enum) { @@ -55,10 +53,10 @@ const ControlFlow = union(enum) { /// inside the block must reach the outside. const Block = union(enum) { const Incoming = struct { - src_label: IdRef, + src_label: Id, /// Instruction that returns an u32 value of the /// `Air.Inst.Index` that control flow should jump to. - next_block: IdRef, + next_block: Id, }; const SelectionMerge = struct { @@ -69,7 +67,7 @@ const ControlFlow = union(enum) { /// The label id of the cond_br's merge block. /// For the top-most element in the stack, this /// value is undefined. - merge_block: IdRef, + merge_block: Id, }; /// For a `selection` type block, we cannot use early exits, and we @@ -100,7 +98,7 @@ const ControlFlow = union(enum) { /// of conditions that jump to the loop exit. merges: std.ArrayListUnmanaged(Incoming) = .empty, /// The label id of the loop's merge block. - merge_block: IdRef, + merge_block: Id, }, fn deinit(self: *Structured.Block, a: Allocator) void { @@ -116,17 +114,17 @@ const ControlFlow = union(enum) { block_stack: std.ArrayListUnmanaged(*Structured.Block) = .empty, /// Maps `block` inst indices to the variable that the block's result /// value must be written to. - block_results: std.AutoHashMapUnmanaged(Air.Inst.Index, IdRef) = .empty, + block_results: std.AutoHashMapUnmanaged(Air.Inst.Index, Id) = .empty, }; const Unstructured = struct { const Incoming = struct { - src_label: IdRef, - break_value_id: IdRef, + src_label: Id, + break_value_id: Id, }; const Block = struct { - label: ?IdRef = null, + label: ?Id = null, incoming_blocks: std.ArrayListUnmanaged(Incoming) = .empty, }; @@ -318,7 +316,7 @@ const NavGen = struct { /// An array of function argument result-ids. Each index corresponds with the /// function argument of the same index. - args: std.ArrayListUnmanaged(IdRef) = .empty, + args: std.ArrayListUnmanaged(Id) = .empty, /// A counter to keep track of how many `arg` instructions we've seen yet. next_arg_index: u32 = 0, @@ -337,7 +335,7 @@ const NavGen = struct { control_flow: ControlFlow, /// The label of the SPIR-V block we are currently generating. - current_block_label: IdRef, + current_block_label: Id, /// The code (prologue and body) for the function we are currently generating code for. func: SpvModule.Fn = .{}, @@ -436,17 +434,17 @@ const NavGen = struct { /// This imports the "default" extended instruction set for the target /// For OpenCL, OpenCL.std.100. For Vulkan and OpenGL, GLSL.std.450. - fn importExtendedSet(self: *NavGen) !IdResult { + fn importExtendedSet(self: *NavGen) !Id { const target = self.spv.target; return switch (target.os.tag) { - .opencl, .amdhsa => try self.spv.importInstructionSet(.@"OpenCL.std"), - .vulkan, .opengl => try self.spv.importInstructionSet(.@"GLSL.std.450"), + .opencl, .amdhsa => try self.spv.importInstructionSet(.open_cl_std), + .vulkan, .opengl => try self.spv.importInstructionSet(.glsl_std_450), else => unreachable, }; } /// Fetch the result-id for a previously generated instruction or constant. - fn resolve(self: *NavGen, inst: Air.Inst.Ref) !IdRef { + fn resolve(self: *NavGen, inst: Air.Inst.Ref) !Id { const pt = self.pt; const zcu = pt.zcu; if (try self.air.value(inst, pt)) |val| { @@ -468,7 +466,7 @@ const NavGen = struct { return self.inst_results.get(index).?; // Assertion means instruction does not dominate usage. } - fn resolveUav(self: *NavGen, val: InternPool.Index) !IdRef { + fn resolveUav(self: *NavGen, val: InternPool.Index) !Id { // TODO: This cannot be a function at this point, but it should probably be handled anyway. const zcu = self.pt.zcu; @@ -476,16 +474,16 @@ const NavGen = struct { const decl_ptr_ty_id = try self.ptrType(ty, self.spvStorageClass(.generic), .indirect); const spv_decl_index = blk: { - const entry = try self.object.uav_link.getOrPut(self.object.gpa, .{ val, .Function }); + const entry = try self.object.uav_link.getOrPut(self.object.gpa, .{ val, .function }); if (entry.found_existing) { - try self.addFunctionDep(entry.value_ptr.*, .Function); + try self.addFunctionDep(entry.value_ptr.*, .function); const result_id = self.spv.declPtr(entry.value_ptr.*).result_id; return try self.castToGeneric(decl_ptr_ty_id, result_id); } const spv_decl_index = try self.spv.allocDecl(.invocation_global); - try self.addFunctionDep(spv_decl_index, .Function); + try self.addFunctionDep(spv_decl_index, .function); entry.value_ptr.* = spv_decl_index; break :blk spv_decl_index; }; @@ -536,7 +534,7 @@ const NavGen = struct { try self.spv.debugNameFmt(initializer_id, "initializer of __anon_{d}", .{@intFromEnum(val)}); - const fn_decl_ptr_ty_id = try self.ptrType(ty, .Function, .indirect); + const fn_decl_ptr_ty_id = try self.ptrType(ty, .function, .indirect); try self.spv.sections.types_globals_constants.emit(self.spv.gpa, .OpExtInst, .{ .id_result_type = fn_decl_ptr_ty_id, .id_result = result_id, @@ -552,7 +550,7 @@ const NavGen = struct { fn addFunctionDep(self: *NavGen, decl_index: SpvModule.Decl.Index, storage_class: StorageClass) !void { if (self.spv.version.minor < 4) { // Before version 1.4, the interface’s storage classes are limited to the Input and Output - if (storage_class == .Input or storage_class == .Output) { + if (storage_class == .input or storage_class == .output) { try self.func.decl_deps.put(self.spv.gpa, decl_index, {}); } } else { @@ -560,7 +558,7 @@ const NavGen = struct { } } - fn castToGeneric(self: *NavGen, type_id: IdRef, ptr_id: IdRef) !IdRef { + fn castToGeneric(self: *NavGen, type_id: Id, ptr_id: Id) !Id { if (self.spv.hasFeature(.generic_pointer)) { const result_id = self.spv.allocId(); try self.func.body.emit(self.spv.gpa, .OpPtrCastToGeneric, .{ @@ -578,7 +576,7 @@ const NavGen = struct { /// block we are currently generating. /// Note that there is no such thing as nested blocks like in ZIR or AIR, so we don't need to /// keep track of the previous block. - fn beginSpvBlock(self: *NavGen, label: IdResult) !void { + fn beginSpvBlock(self: *NavGen, label: Id) !void { try self.func.body.emit(self.spv.gpa, .OpLabel, .{ .id_result = label }); self.current_block_label = label; } @@ -705,7 +703,7 @@ const NavGen = struct { } /// Emits a bool constant in a particular representation. - fn constBool(self: *NavGen, value: bool, repr: Repr) !IdRef { + fn constBool(self: *NavGen, value: bool, repr: Repr) !Id { return switch (repr) { .indirect => self.constInt(Type.u1, @intFromBool(value)), .direct => self.spv.constBool(value), @@ -715,7 +713,7 @@ const NavGen = struct { /// Emits an integer constant. /// This function, unlike SpvModule.constInt, takes care to bitcast /// the value to an unsigned int first for Kernels. - fn constInt(self: *NavGen, ty: Type, value: anytype) !IdRef { + fn constInt(self: *NavGen, ty: Type, value: anytype) !Id { const zcu = self.pt.zcu; const scalar_ty = ty.scalarType(zcu); const int_info = scalar_ty.intInfo(zcu); @@ -773,7 +771,7 @@ const NavGen = struct { return self.constructCompositeSplat(ty, result_id); } - pub fn constructComposite(self: *NavGen, result_ty_id: IdRef, constituents: []const IdRef) !IdRef { + pub fn constructComposite(self: *NavGen, result_ty_id: Id, constituents: []const Id) !Id { const result_id = self.spv.allocId(); try self.func.body.emit(self.gpa, .OpCompositeConstruct, .{ .id_result_type = result_ty_id, @@ -785,11 +783,11 @@ const NavGen = struct { /// Construct a composite at runtime with all lanes set to the same value. /// ty must be an aggregate type. - fn constructCompositeSplat(self: *NavGen, ty: Type, constituent: IdRef) !IdRef { + fn constructCompositeSplat(self: *NavGen, ty: Type, constituent: Id) !Id { const zcu = self.pt.zcu; const n: usize = @intCast(ty.arrayLen(zcu)); - const constituents = try self.gpa.alloc(IdRef, n); + const constituents = try self.gpa.alloc(Id, n); defer self.gpa.free(constituents); @memset(constituents, constituent); @@ -803,7 +801,7 @@ const NavGen = struct { /// is done by emitting a sequence of instructions that initialize the value. // /// This function should only be called during function code generation. - fn constant(self: *NavGen, ty: Type, val: Value, repr: Repr) !IdRef { + fn constant(self: *NavGen, ty: Type, val: Value, repr: Repr) !Id { // Note: Using intern_map can only be used with constants that DO NOT generate any runtime code!! // Ideally that should be all constants in the future, or it should be cleaned up somehow. For // now, only use the intern_map on case-by-case basis by breaking to :cache. @@ -909,7 +907,7 @@ const NavGen = struct { .payload => |payload| payload, }); - var constituents: [2]IdRef = undefined; + var constituents: [2]Id = undefined; var types: [2]Type = undefined; if (eu_layout.error_first) { constituents[0] = try self.constant(err_ty, err_val, .indirect); @@ -967,7 +965,7 @@ const NavGen = struct { inline .array_type, .vector_type => |array_type, tag| { const elem_ty = Type.fromInterned(array_type.child); - const constituents = try self.gpa.alloc(IdRef, @intCast(ty.arrayLenIncludingSentinel(zcu))); + const constituents = try self.gpa.alloc(Id, @intCast(ty.arrayLenIncludingSentinel(zcu))); defer self.gpa.free(constituents); const child_repr: Repr = switch (tag) { @@ -1015,7 +1013,7 @@ const NavGen = struct { var types = std.ArrayList(Type).init(self.gpa); defer types.deinit(); - var constituents = std.ArrayList(IdRef).init(self.gpa); + var constituents = std.ArrayList(Id).init(self.gpa); defer constituents.deinit(); var it = struct_type.iterateRuntimeOrder(ip); @@ -1064,7 +1062,7 @@ const NavGen = struct { return cacheable_id; } - fn constantPtr(self: *NavGen, ptr_val: Value) Error!IdRef { + fn constantPtr(self: *NavGen, ptr_val: Value) Error!Id { const pt = self.pt; if (ptr_val.isUndef(pt.zcu)) { @@ -1080,7 +1078,7 @@ const NavGen = struct { return self.derivePtr(derivation); } - fn derivePtr(self: *NavGen, derivation: Value.PointerDeriveStep) Error!IdRef { + fn derivePtr(self: *NavGen, derivation: Value.PointerDeriveStep) Error!Id { const pt = self.pt; const zcu = pt.zcu; switch (derivation) { @@ -1159,7 +1157,7 @@ const NavGen = struct { self: *NavGen, ty: Type, uav: InternPool.Key.Ptr.BaseAddr.Uav, - ) !IdRef { + ) !Id { // TODO: Merge this function with constantDeclRef. const pt = self.pt; @@ -1182,7 +1180,7 @@ const NavGen = struct { // Uav refs are always generic. assert(ty.ptrAddressSpace(zcu) == .generic); - const decl_ptr_ty_id = try self.ptrType(uav_ty, .Generic, .indirect); + const decl_ptr_ty_id = try self.ptrType(uav_ty, .generic, .indirect); const ptr_id = try self.resolveUav(uav.val); if (decl_ptr_ty_id != ty_id) { @@ -1199,7 +1197,7 @@ const NavGen = struct { } } - fn constantNavRef(self: *NavGen, ty: Type, nav_index: InternPool.Nav.Index) !IdRef { + fn constantNavRef(self: *NavGen, ty: Type, nav_index: InternPool.Nav.Index) !Id { const pt = self.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -1240,7 +1238,7 @@ const NavGen = struct { const decl_ptr_ty_id = try self.ptrType(nav_ty, storage_class, .indirect); const ptr_id = switch (storage_class) { - .Generic => try self.castToGeneric(decl_ptr_ty_id, decl_id), + .generic => try self.castToGeneric(decl_ptr_ty_id, decl_id), else => decl_id, }; @@ -1272,7 +1270,7 @@ const NavGen = struct { /// The integer type that is returned by this function is the type that is used to perform /// actual operations (as well as store) a Zig type of a particular number of bits. To create /// a type with an exact size, use SpvModule.intType. - fn intType(self: *NavGen, signedness: std.builtin.Signedness, bits: u16) !IdRef { + fn intType(self: *NavGen, signedness: std.builtin.Signedness, bits: u16) !Id { const backing_bits, const big_int = self.backingIntBits(bits); if (big_int) { if (backing_bits > 64) { @@ -1289,12 +1287,12 @@ const NavGen = struct { }; } - fn arrayType(self: *NavGen, len: u32, child_ty: IdRef) !IdRef { + fn arrayType(self: *NavGen, len: u32, child_ty: Id) !Id { const len_id = try self.constInt(Type.u32, len); return self.spv.arrayType(len_id, child_ty); } - fn ptrType(self: *NavGen, child_ty: Type, storage_class: StorageClass, child_repr: Repr) !IdRef { + fn ptrType(self: *NavGen, child_ty: Type, storage_class: StorageClass, child_repr: Repr) !Id { const zcu = self.pt.zcu; const ip = &zcu.intern_pool; const key = .{ child_ty.toIntern(), storage_class, child_repr }; @@ -1323,7 +1321,7 @@ const NavGen = struct { .vulkan, .opengl => { if (child_ty.zigTypeTag(zcu) == .@"struct") { switch (storage_class) { - .Uniform, .PushConstant => try self.spv.decorate(child_ty_id, .Block), + .uniform, .push_constant => try self.spv.decorate(child_ty_id, .block), else => {}, } } @@ -1331,7 +1329,7 @@ const NavGen = struct { switch (ip.indexToKey(child_ty.toIntern())) { .func_type, .opaque_type => {}, else => { - try self.spv.decorate(result_id, .{ .ArrayStride = .{ .array_stride = @intCast(child_ty.abiSize(zcu)) } }); + try self.spv.decorate(result_id, .{ .array_stride = .{ .array_stride = @intCast(child_ty.abiSize(zcu)) } }); }, } }, @@ -1349,9 +1347,9 @@ const NavGen = struct { return result_id; } - fn functionType(self: *NavGen, return_ty: Type, param_types: []const Type) !IdRef { + fn functionType(self: *NavGen, return_ty: Type, param_types: []const Type) !Id { const return_ty_id = try self.resolveFnReturnType(return_ty); - const param_ids = try self.gpa.alloc(IdRef, param_types.len); + const param_ids = try self.gpa.alloc(Id, param_types.len); defer self.gpa.free(param_ids); for (param_types, param_ids) |param_ty, *param_id| { @@ -1379,7 +1377,7 @@ const NavGen = struct { /// padding: [padding_size]u8, /// } /// If any of the fields' size is 0, it will be omitted. - fn resolveUnionType(self: *NavGen, ty: Type) !IdRef { + fn resolveUnionType(self: *NavGen, ty: Type) !Id { const zcu = self.pt.zcu; const ip = &zcu.intern_pool; const union_obj = zcu.typeToUnion(ty).?; @@ -1394,7 +1392,7 @@ const NavGen = struct { return try self.resolveType(Type.fromInterned(union_obj.enum_tag_ty), .indirect); } - var member_types: [4]IdRef = undefined; + var member_types: [4]Id = undefined; var member_names: [4][]const u8 = undefined; const u8_ty_id = try self.resolveType(Type.u8, .direct); @@ -1433,7 +1431,7 @@ const NavGen = struct { return result_id; } - fn resolveFnReturnType(self: *NavGen, ret_ty: Type) !IdRef { + fn resolveFnReturnType(self: *NavGen, ret_ty: Type) !Id { const zcu = self.pt.zcu; if (!ret_ty.hasRuntimeBitsIgnoreComptime(zcu)) { // If the return type is an error set or an error union, then we make this @@ -1450,7 +1448,7 @@ const NavGen = struct { } /// Turn a Zig type into a SPIR-V Type, and return a reference to it. - fn resolveType(self: *NavGen, ty: Type, repr: Repr) Error!IdRef { + fn resolveType(self: *NavGen, ty: Type, repr: Repr) Error!Id { if (self.intern_map.get(.{ ty.toIntern(), repr })) |id| { return id; } @@ -1460,7 +1458,7 @@ const NavGen = struct { return id; } - fn resolveTypeInner(self: *NavGen, ty: Type, repr: Repr) Error!IdRef { + fn resolveTypeInner(self: *NavGen, ty: Type, repr: Repr) Error!Id { const pt = self.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -1564,7 +1562,7 @@ const NavGen = struct { const result_id = try self.arrayType(total_len, elem_ty_id); switch (self.spv.target.os.tag) { .vulkan, .opengl => { - try self.spv.decorate(result_id, .{ .ArrayStride = .{ + try self.spv.decorate(result_id, .{ .array_stride = .{ .array_stride = @intCast(elem_ty.abiSize(zcu)), } }); }, @@ -1604,7 +1602,7 @@ const NavGen = struct { assert(!fn_info.is_var_args); // Note: Logic is different from functionType(). - const param_ty_ids = try self.gpa.alloc(IdRef, fn_info.param_types.len); + const param_ty_ids = try self.gpa.alloc(Id, fn_info.param_types.len); defer self.gpa.free(param_ty_ids); var param_index: usize = 0; for (fn_info.param_types.get(ip)) |param_ty_index| { @@ -1655,7 +1653,7 @@ const NavGen = struct { .@"struct" => { const struct_type = switch (ip.indexToKey(ty.toIntern())) { .tuple_type => |tuple| { - const member_types = try self.gpa.alloc(IdRef, tuple.values.len); + const member_types = try self.gpa.alloc(Id, tuple.values.len); defer self.gpa.free(member_types); var member_index: usize = 0; @@ -1683,7 +1681,7 @@ const NavGen = struct { return try self.resolveType(Type.fromInterned(struct_type.backingIntTypeUnordered(ip)), .direct); } - var member_types = std.ArrayList(IdRef).init(self.gpa); + var member_types = std.ArrayList(Id).init(self.gpa); defer member_types.deinit(); var member_names = std.ArrayList([]const u8).init(self.gpa); @@ -1701,7 +1699,7 @@ const NavGen = struct { switch (self.spv.target.os.tag) { .vulkan, .opengl => { - try self.spv.decorateMember(result_id, index, .{ .Offset = .{ + try self.spv.decorateMember(result_id, index, .{ .offset = .{ .byte_offset = @intCast(ty.structFieldOffset(field_index, zcu)), } }); }, @@ -1765,7 +1763,7 @@ const NavGen = struct { const payload_ty_id = try self.resolveType(payload_ty, .indirect); - var member_types: [2]IdRef = undefined; + var member_types: [2]Id = undefined; var member_names: [2][]const u8 = undefined; if (eu_layout.error_first) { // Put the error first @@ -1809,30 +1807,30 @@ const NavGen = struct { fn spvStorageClass(self: *NavGen, as: std.builtin.AddressSpace) StorageClass { return switch (as) { - .generic => if (self.spv.hasFeature(.generic_pointer)) .Generic else .Function, + .generic => if (self.spv.hasFeature(.generic_pointer)) .generic else .function, .global => switch (self.spv.target.os.tag) { - .opencl, .amdhsa => .CrossWorkgroup, - else => .StorageBuffer, + .opencl, .amdhsa => .cross_workgroup, + else => .storage_buffer, }, .push_constant => { - return .PushConstant; + return .push_constant; }, .output => { - return .Output; + return .output; }, .uniform => { - return .Uniform; + return .uniform; }, .storage_buffer => { - return .StorageBuffer; + return .storage_buffer; }, .physical_storage_buffer => { - return .PhysicalStorageBuffer; + return .physical_storage_buffer; }, - .constant => .UniformConstant, - .shared => .Workgroup, - .local => .Function, - .input => .Input, + .constant => .uniform_constant, + .shared => .workgroup, + .local => .function, + .input => .input, .gs, .fs, .ss, @@ -1980,22 +1978,22 @@ const NavGen = struct { value: Temporary.Value, const Value = union(enum) { - singleton: IdResult, + singleton: Id, exploded_vector: IdRange, }; - fn init(ty: Type, singleton: IdResult) Temporary { + fn init(ty: Type, singleton: Id) Temporary { return .{ .ty = ty, .value = .{ .singleton = singleton } }; } - fn materialize(self: Temporary, ng: *NavGen) !IdResult { + fn materialize(self: Temporary, ng: *NavGen) !Id { const zcu = ng.pt.zcu; switch (self.value) { .singleton => |id| return id, .exploded_vector => |range| { assert(self.ty.isVector(zcu)); assert(self.ty.vectorLen(zcu) == range.len); - const constituents = try ng.gpa.alloc(IdRef, range.len); + const constituents = try ng.gpa.alloc(Id, range.len); defer ng.gpa.free(constituents); for (constituents, 0..range.len) |*id, i| { id.* = range.at(i); @@ -2170,16 +2168,16 @@ const NavGen = struct { /// on the operation and input value. const Value = union(enum) { /// A single scalar value that is used by a scalar operation. - scalar: IdResult, + scalar: Id, /// A single scalar that is broadcasted in an unrolled operation. - scalar_broadcast: IdResult, + scalar_broadcast: Id, /// A vector represented by a consecutive list of IDs that is used in an unrolled operation. vector_exploded: IdRange, }; /// Query the value at a particular index of the operation. Note that /// the index is *not* the component/lane, but the index of the *operation*. - fn at(self: PreparedOperand, i: usize) IdResult { + fn at(self: PreparedOperand, i: usize) Id { switch (self.value) { .scalar => |id| { assert(i == 0); @@ -2253,9 +2251,9 @@ const NavGen = struct { for (0..ops) |i| { try self.func.body.emitRaw(self.spv.gpa, opcode, 3); - self.func.body.writeOperand(spec.IdResultType, op_result_ty_id); - self.func.body.writeOperand(IdResult, results.at(i)); - self.func.body.writeOperand(IdResult, op_src.at(i)); + self.func.body.writeOperand(spec.Id, op_result_ty_id); + self.func.body.writeOperand(Id, results.at(i)); + self.func.body.writeOperand(Id, op_src.at(i)); } return v.finalize(result_ty, results); @@ -2388,10 +2386,10 @@ const NavGen = struct { for (0..ops) |i| { try self.func.body.emitRaw(self.spv.gpa, opcode, 4); - self.func.body.writeOperand(spec.IdResultType, op_result_ty_id); - self.func.body.writeOperand(IdResult, results.at(i)); - self.func.body.writeOperand(IdResult, op_lhs.at(i)); - self.func.body.writeOperand(IdResult, op_rhs.at(i)); + self.func.body.writeOperand(spec.Id, op_result_ty_id); + self.func.body.writeOperand(Id, results.at(i)); + self.func.body.writeOperand(Id, op_lhs.at(i)); + self.func.body.writeOperand(Id, op_rhs.at(i)); } return v.finalize(result_ty, results); @@ -2442,9 +2440,9 @@ const NavGen = struct { }) |opcode| { for (0..ops) |i| { try self.func.body.emitRaw(self.spv.gpa, opcode, 3); - self.func.body.writeOperand(spec.IdResultType, op_result_ty_id); - self.func.body.writeOperand(IdResult, results.at(i)); - self.func.body.writeOperand(IdResult, op_operand.at(i)); + self.func.body.writeOperand(spec.Id, op_result_ty_id); + self.func.body.writeOperand(Id, results.at(i)); + self.func.body.writeOperand(Id, op_operand.at(i)); } } else { const set = try self.importExtendedSet(); @@ -2583,10 +2581,10 @@ const NavGen = struct { }) |opcode| { for (0..ops) |i| { try self.func.body.emitRaw(self.spv.gpa, opcode, 4); - self.func.body.writeOperand(spec.IdResultType, op_result_ty_id); - self.func.body.writeOperand(IdResult, results.at(i)); - self.func.body.writeOperand(IdResult, op_lhs.at(i)); - self.func.body.writeOperand(IdResult, op_rhs.at(i)); + self.func.body.writeOperand(spec.Id, op_result_ty_id); + self.func.body.writeOperand(Id, results.at(i)); + self.func.body.writeOperand(Id, op_lhs.at(i)); + self.func.body.writeOperand(Id, op_rhs.at(i)); } } else { const set = try self.importExtendedSet(); @@ -2702,10 +2700,10 @@ const NavGen = struct { const op_result = self.spv.allocId(); try self.func.body.emitRaw(self.spv.gpa, opcode, 4); - self.func.body.writeOperand(spec.IdResultType, op_result_ty_id); - self.func.body.writeOperand(IdResult, op_result); - self.func.body.writeOperand(IdResult, lhs_op.at(i)); - self.func.body.writeOperand(IdResult, rhs_op.at(i)); + self.func.body.writeOperand(spec.Id, op_result_ty_id); + self.func.body.writeOperand(Id, op_result); + self.func.body.writeOperand(Id, lhs_op.at(i)); + self.func.body.writeOperand(Id, rhs_op.at(i)); // The above operation returns a struct. We might want to expand // Temporary to deal with the fact that these are structs eventually, @@ -2804,8 +2802,8 @@ const NavGen = struct { const buffer_struct_ty_id = self.spv.allocId(); try self.spv.structType(buffer_struct_ty_id, &.{anyerror_ty_id}, &.{"error_out"}); - try self.spv.decorate(buffer_struct_ty_id, .Block); - try self.spv.decorateMember(buffer_struct_ty_id, 0, .{ .Offset = .{ .byte_offset = 0 } }); + try self.spv.decorate(buffer_struct_ty_id, .block); + try self.spv.decorateMember(buffer_struct_ty_id, 0, .{ .offset = .{ .byte_offset = 0 } }); const ptr_buffer_struct_ty_id = self.spv.allocId(); try self.spv.sections.types_globals_constants.emit(self.spv.gpa, .OpTypePointer, .{ @@ -2820,15 +2818,15 @@ const NavGen = struct { .id_result = buffer_struct_id, .storage_class = self.spvStorageClass(.global), }); - try self.spv.decorate(buffer_struct_id, .{ .DescriptorSet = .{ .descriptor_set = 0 } }); - try self.spv.decorate(buffer_struct_id, .{ .Binding = .{ .binding_point = 0 } }); + try self.spv.decorate(buffer_struct_id, .{ .descriptor_set = .{ .descriptor_set = 0 } }); + try self.spv.decorate(buffer_struct_id, .{ .binding = .{ .binding_point = 0 } }); self.object.error_buffer = spv_err_decl_index; } try self.spv.sections.execution_modes.emit(self.spv.gpa, .OpExecutionMode, .{ .entry_point = kernel_id, - .mode = .{ .LocalSize = .{ + .mode = .{ .local_size = .{ .x_size = 1, .y_size = 1, .z_size = 1, @@ -2873,7 +2871,7 @@ const NavGen = struct { .pointer = p_error_id, .object = error_id, .memory_access = .{ - .Aligned = .{ .literal_integer = @intCast(Type.abiAlignment(.anyerror, zcu).toByteUnits().?) }, + .aligned = .{ .literal_integer = @intCast(Type.abiAlignment(.anyerror, zcu).toByteUnits().?) }, }, }); try section.emit(self.spv.gpa, .OpReturn, {}); @@ -2885,8 +2883,8 @@ const NavGen = struct { defer self.gpa.free(test_name); const execution_mode: spec.ExecutionModel = switch (target.os.tag) { - .vulkan, .opengl => .GLCompute, - .opencl, .amdhsa => .Kernel, + .vulkan, .opengl => .gl_compute, + .opencl, .amdhsa => .kernel, else => unreachable, }; @@ -2983,7 +2981,7 @@ const NavGen = struct { assert(maybe_init_val == null); // TODO const storage_class = self.spvStorageClass(nav.getAddrspace()); - assert(storage_class != .Generic); // These should be instance globals + assert(storage_class != .generic); // These should be instance globals const ptr_ty_id = try self.ptrType(ty, storage_class, .indirect); @@ -2993,38 +2991,8 @@ const NavGen = struct { .storage_class = storage_class, }); - if (nav.fqn.eqlSlice("position", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .Position } }); - } else if (nav.fqn.eqlSlice("point_size", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .PointSize } }); - } else if (nav.fqn.eqlSlice("invocation_id", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .InvocationId } }); - } else if (nav.fqn.eqlSlice("frag_coord", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .FragCoord } }); - } else if (nav.fqn.eqlSlice("point_coord", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .PointCoord } }); - } else if (nav.fqn.eqlSlice("front_facing", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .FrontFacing } }); - } else if (nav.fqn.eqlSlice("sample_mask", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .SampleMask } }); - } else if (nav.fqn.eqlSlice("frag_depth", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .FragDepth } }); - } else if (nav.fqn.eqlSlice("num_workgroups", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .NumWorkgroups } }); - } else if (nav.fqn.eqlSlice("workgroup_size", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .WorkgroupSize } }); - } else if (nav.fqn.eqlSlice("workgroup_id", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .WorkgroupId } }); - } else if (nav.fqn.eqlSlice("local_invocation_id", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .LocalInvocationId } }); - } else if (nav.fqn.eqlSlice("global_invocation_id", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .GlobalInvocationId } }); - } else if (nav.fqn.eqlSlice("local_invocation_index", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .LocalInvocationIndex } }); - } else if (nav.fqn.eqlSlice("vertex_index", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .VertexIndex } }); - } else if (nav.fqn.eqlSlice("instance_index", ip)) { - try self.spv.decorate(result_id, .{ .BuiltIn = .{ .built_in = .InstanceIndex } }); + if (std.meta.stringToEnum(spec.BuiltIn, nav.fqn.toSlice(ip))) |builtin| { + try self.spv.decorate(result_id, .{ .built_in = .{ .built_in = builtin } }); } try self.spv.debugName(result_id, nav.fqn.toSlice(ip)); @@ -3040,7 +3008,7 @@ const NavGen = struct { try self.spv.declareDeclDeps(spv_decl_index, &.{}); - const ptr_ty_id = try self.ptrType(ty, .Function, .indirect); + const ptr_ty_id = try self.ptrType(ty, .function, .indirect); if (maybe_init_val) |init_val| { // TODO: Combine with resolveAnonDecl? @@ -3109,7 +3077,7 @@ const NavGen = struct { /// Convert representation from indirect (in memory) to direct (in 'register') /// This converts the argument type from resolveType(ty, .indirect) to resolveType(ty, .direct). - fn convertToDirect(self: *NavGen, ty: Type, operand_id: IdRef) !IdRef { + fn convertToDirect(self: *NavGen, ty: Type, operand_id: Id) !Id { const pt = self.pt; const zcu = pt.zcu; switch (ty.scalarType(zcu).zigTypeTag(zcu)) { @@ -3136,7 +3104,7 @@ const NavGen = struct { /// Convert representation from direct (in 'register) to direct (in memory) /// This converts the argument type from resolveType(ty, .direct) to resolveType(ty, .indirect). - fn convertToIndirect(self: *NavGen, ty: Type, operand_id: IdRef) !IdRef { + fn convertToIndirect(self: *NavGen, ty: Type, operand_id: Id) !Id { const zcu = self.pt.zcu; switch (ty.scalarType(zcu).zigTypeTag(zcu)) { .bool => { @@ -3147,7 +3115,7 @@ const NavGen = struct { } } - fn extractField(self: *NavGen, result_ty: Type, object: IdRef, field: u32) !IdRef { + fn extractField(self: *NavGen, result_ty: Type, object: Id, field: u32) !Id { const result_ty_id = try self.resolveType(result_ty, .indirect); const result_id = self.spv.allocId(); const indexes = [_]u32{field}; @@ -3161,7 +3129,7 @@ const NavGen = struct { return try self.convertToDirect(result_ty, result_id); } - fn extractVectorComponent(self: *NavGen, result_ty: Type, vector_id: IdRef, field: u32) !IdRef { + fn extractVectorComponent(self: *NavGen, result_ty: Type, vector_id: Id, field: u32) !Id { const result_ty_id = try self.resolveType(result_ty, .direct); const result_id = self.spv.allocId(); const indexes = [_]u32{field}; @@ -3179,14 +3147,14 @@ const NavGen = struct { is_volatile: bool = false, }; - fn load(self: *NavGen, value_ty: Type, ptr_id: IdRef, options: MemoryOptions) !IdRef { + fn load(self: *NavGen, value_ty: Type, ptr_id: Id, options: MemoryOptions) !Id { const zcu = self.pt.zcu; const alignment: u32 = @intCast(value_ty.abiAlignment(zcu).toByteUnits().?); const indirect_value_ty_id = try self.resolveType(value_ty, .indirect); const result_id = self.spv.allocId(); - const access = spec.MemoryAccess.Extended{ - .Volatile = options.is_volatile, - .Aligned = .{ .literal_integer = alignment }, + const access: spec.MemoryAccess.Extended = .{ + .@"volatile" = options.is_volatile, + .aligned = .{ .literal_integer = alignment }, }; try self.func.body.emit(self.spv.gpa, .OpLoad, .{ .id_result_type = indirect_value_ty_id, @@ -3197,11 +3165,9 @@ const NavGen = struct { return try self.convertToDirect(value_ty, result_id); } - fn store(self: *NavGen, value_ty: Type, ptr_id: IdRef, value_id: IdRef, options: MemoryOptions) !void { + fn store(self: *NavGen, value_ty: Type, ptr_id: Id, value_id: Id, options: MemoryOptions) !void { const indirect_value_id = try self.convertToIndirect(value_ty, value_id); - const access = spec.MemoryAccess.Extended{ - .Volatile = options.is_volatile, - }; + const access: spec.MemoryAccess.Extended = .{ .@"volatile" = options.is_volatile }; try self.func.body.emit(self.spv.gpa, .OpStore, .{ .pointer = ptr_id, .object = indirect_value_id, @@ -3222,7 +3188,7 @@ const NavGen = struct { return; const air_tags = self.air.instructions.items(.tag); - const maybe_result_id: ?IdRef = switch (air_tags[@intFromEnum(inst)]) { + const maybe_result_id: ?Id = switch (air_tags[@intFromEnum(inst)]) { // zig fmt: off .add, .add_wrap, .add_optimized => try self.airArithOp(inst, .f_add, .i_add, .i_add), .sub, .sub_wrap, .sub_optimized => try self.airArithOp(inst, .f_sub, .i_sub, .i_sub), @@ -3390,7 +3356,7 @@ const NavGen = struct { try self.inst_results.putNoClobber(self.gpa, inst, result_id); } - fn airBinOpSimple(self: *NavGen, inst: Air.Inst.Index, op: BinaryOp) !?IdRef { + fn airBinOpSimple(self: *NavGen, inst: Air.Inst.Index, op: BinaryOp) !?Id { const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.temporary(bin_op.lhs); const rhs = try self.temporary(bin_op.rhs); @@ -3399,7 +3365,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airShift(self: *NavGen, inst: Air.Inst.Index, unsigned: BinaryOp, signed: BinaryOp) !?IdRef { + fn airShift(self: *NavGen, inst: Air.Inst.Index, unsigned: BinaryOp, signed: BinaryOp) !?Id { const zcu = self.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; @@ -3438,7 +3404,7 @@ const NavGen = struct { const MinMax = enum { min, max }; - fn airMinMax(self: *NavGen, inst: Air.Inst.Index, op: MinMax) !?IdRef { + fn airMinMax(self: *NavGen, inst: Air.Inst.Index, op: MinMax) !?Id { const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.temporary(bin_op.lhs); @@ -3503,7 +3469,7 @@ const NavGen = struct { } } - fn airDivFloor(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airDivFloor(self: *NavGen, inst: Air.Inst.Index) !?Id { const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.temporary(bin_op.lhs); @@ -3560,7 +3526,7 @@ const NavGen = struct { } } - fn airDivTrunc(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airDivTrunc(self: *NavGen, inst: Air.Inst.Index) !?Id { const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.temporary(bin_op.lhs); @@ -3588,7 +3554,7 @@ const NavGen = struct { } } - fn airUnOpSimple(self: *NavGen, inst: Air.Inst.Index, op: UnaryOp) !?IdRef { + fn airUnOpSimple(self: *NavGen, inst: Air.Inst.Index, op: UnaryOp) !?Id { const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand = try self.temporary(un_op); const result = try self.buildUnary(op, operand); @@ -3601,7 +3567,7 @@ const NavGen = struct { comptime fop: BinaryOp, comptime sop: BinaryOp, comptime uop: BinaryOp, - ) !?IdRef { + ) !?Id { const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.temporary(bin_op.lhs); @@ -3622,7 +3588,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airAbs(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airAbs(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.temporary(ty_op.operand); // Note: operand_ty may be signed, while ty is always unsigned! @@ -3662,7 +3628,7 @@ const NavGen = struct { comptime add: BinaryOp, comptime ucmp: CmpPredicate, comptime scmp: CmpPredicate, - ) !?IdRef { + ) !?Id { _ = scmp; // Note: OpIAddCarry and OpISubBorrow are not really useful here: For unsigned numbers, // there is in both cases only one extra operation required. For signed operations, @@ -3725,7 +3691,7 @@ const NavGen = struct { return try self.constructComposite(result_ty_id, &.{ try result.materialize(self), try ov.materialize(self) }); } - fn airMulOverflow(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airMulOverflow(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; @@ -3897,7 +3863,7 @@ const NavGen = struct { return try self.constructComposite(result_ty_id, &.{ try result.materialize(self), try ov.materialize(self) }); } - fn airShlOverflow(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airShlOverflow(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; @@ -3938,7 +3904,7 @@ const NavGen = struct { return try self.constructComposite(result_ty_id, &.{ try result.materialize(self), try ov.materialize(self) }); } - fn airMulAdd(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airMulAdd(self: *NavGen, inst: Air.Inst.Index) !?Id { const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const extra = self.air.extraData(Air.Bin, pl_op.payload).data; @@ -3954,7 +3920,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airClzCtz(self: *NavGen, inst: Air.Inst.Index, op: UnaryOp) !?IdRef { + fn airClzCtz(self: *NavGen, inst: Air.Inst.Index, op: UnaryOp) !?Id { if (self.liveness.isUnused(inst)) return null; const zcu = self.pt.zcu; @@ -3979,7 +3945,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airSelect(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airSelect(self: *NavGen, inst: Air.Inst.Index) !?Id { const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const extra = self.air.extraData(Air.Bin, pl_op.payload).data; const pred = try self.temporary(pl_op.operand); @@ -3990,7 +3956,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airSplat(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airSplat(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_id = try self.resolve(ty_op.operand); @@ -3999,7 +3965,7 @@ const NavGen = struct { return try self.constructCompositeSplat(result_ty, operand_id); } - fn airReduce(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airReduce(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const reduce = self.air.instructions.items(.data)[@intFromEnum(inst)].reduce; const operand = try self.resolve(reduce.operand); @@ -4062,16 +4028,16 @@ const NavGen = struct { result_id = self.spv.allocId(); try self.func.body.emitRaw(self.spv.gpa, opcode, 4); - self.func.body.writeOperand(spec.IdResultType, scalar_ty_id); - self.func.body.writeOperand(spec.IdResult, result_id); - self.func.body.writeOperand(spec.IdResultType, lhs); - self.func.body.writeOperand(spec.IdResultType, rhs); + self.func.body.writeOperand(spec.Id, scalar_ty_id); + self.func.body.writeOperand(spec.Id, result_id); + self.func.body.writeOperand(spec.Id, lhs); + self.func.body.writeOperand(spec.Id, rhs); } return result_id; } - fn airShuffleOne(ng: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airShuffleOne(ng: *NavGen, inst: Air.Inst.Index) !?Id { const pt = ng.pt; const zcu = pt.zcu; const gpa = zcu.gpa; @@ -4082,7 +4048,7 @@ const NavGen = struct { const elem_ty = result_ty.childType(zcu); const operand = try ng.resolve(unwrapped.operand); - const constituents = try gpa.alloc(IdRef, mask.len); + const constituents = try gpa.alloc(Id, mask.len); defer gpa.free(constituents); for (constituents, mask) |*id, mask_elem| { @@ -4096,7 +4062,7 @@ const NavGen = struct { return try ng.constructComposite(result_ty_id, constituents); } - fn airShuffleTwo(ng: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airShuffleTwo(ng: *NavGen, inst: Air.Inst.Index) !?Id { const pt = ng.pt; const zcu = pt.zcu; const gpa = zcu.gpa; @@ -4109,7 +4075,7 @@ const NavGen = struct { const operand_a = try ng.resolve(unwrapped.operand_a); const operand_b = try ng.resolve(unwrapped.operand_b); - const constituents = try gpa.alloc(IdRef, mask.len); + const constituents = try gpa.alloc(Id, mask.len); defer gpa.free(constituents); for (constituents, mask) |*id, mask_elem| { @@ -4124,8 +4090,8 @@ const NavGen = struct { return try ng.constructComposite(result_ty_id, constituents); } - fn indicesToIds(self: *NavGen, indices: []const u32) ![]IdRef { - const ids = try self.gpa.alloc(IdRef, indices.len); + fn indicesToIds(self: *NavGen, indices: []const u32) ![]Id { + const ids = try self.gpa.alloc(Id, indices.len); errdefer self.gpa.free(ids); for (indices, ids) |index, *id| { id.* = try self.constInt(Type.u32, index); @@ -4136,10 +4102,10 @@ const NavGen = struct { fn accessChainId( self: *NavGen, - result_ty_id: IdRef, - base: IdRef, - indices: []const IdRef, - ) !IdRef { + result_ty_id: Id, + base: Id, + indices: []const Id, + ) !Id { const result_id = self.spv.allocId(); try self.func.body.emit(self.spv.gpa, .OpInBoundsAccessChain, .{ .id_result_type = result_ty_id, @@ -4156,10 +4122,10 @@ const NavGen = struct { /// is the latter and PtrAccessChain is the former. fn accessChain( self: *NavGen, - result_ty_id: IdRef, - base: IdRef, + result_ty_id: Id, + base: Id, indices: []const u32, - ) !IdRef { + ) !Id { const ids = try self.indicesToIds(indices); defer self.gpa.free(ids); return try self.accessChainId(result_ty_id, base, ids); @@ -4167,11 +4133,11 @@ const NavGen = struct { fn ptrAccessChain( self: *NavGen, - result_ty_id: IdRef, - base: IdRef, - element: IdRef, + result_ty_id: Id, + base: Id, + element: Id, indices: []const u32, - ) !IdRef { + ) !Id { const ids = try self.indicesToIds(indices); defer self.gpa.free(ids); @@ -4199,7 +4165,7 @@ const NavGen = struct { return result_id; } - fn ptrAdd(self: *NavGen, result_ty: Type, ptr_ty: Type, ptr_id: IdRef, offset_id: IdRef) !IdRef { + fn ptrAdd(self: *NavGen, result_ty: Type, ptr_ty: Type, ptr_id: Id, offset_id: Id) !Id { const zcu = self.pt.zcu; const result_ty_id = try self.resolveType(result_ty, .direct); @@ -4220,7 +4186,7 @@ const NavGen = struct { } } - fn airPtrAdd(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airPtrAdd(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const ptr_id = try self.resolve(bin_op.lhs); @@ -4231,7 +4197,7 @@ const NavGen = struct { return try self.ptrAdd(result_ty, ptr_ty, ptr_id, offset_id); } - fn airPtrSub(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airPtrSub(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const ptr_id = try self.resolve(bin_op.lhs); @@ -4427,7 +4393,7 @@ const NavGen = struct { self: *NavGen, inst: Air.Inst.Index, comptime op: std.math.CompareOperator, - ) !?IdRef { + ) !?Id { const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const lhs = try self.temporary(bin_op.lhs); const rhs = try self.temporary(bin_op.rhs); @@ -4436,7 +4402,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airVectorCmp(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airVectorCmp(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const vec_cmp = self.air.extraData(Air.VectorCmp, ty_pl.payload).data; const lhs = try self.temporary(vec_cmp.lhs); @@ -4452,8 +4418,8 @@ const NavGen = struct { self: *NavGen, dst_ty: Type, src_ty: Type, - src_id: IdRef, - ) !IdRef { + src_id: Id, + ) !Id { const zcu = self.pt.zcu; const src_ty_id = try self.resolveType(src_ty, .direct); const dst_ty_id = try self.resolveType(dst_ty, .direct); @@ -4489,9 +4455,9 @@ const NavGen = struct { break :blk result_id; } - const dst_ptr_ty_id = try self.ptrType(dst_ty, .Function, .indirect); + const dst_ptr_ty_id = try self.ptrType(dst_ty, .function, .indirect); - const tmp_id = try self.alloc(src_ty, .{ .storage_class = .Function }); + const tmp_id = try self.alloc(src_ty, .{ .storage_class = .function }); try self.store(src_ty, tmp_id, src_id, .{}); const casted_ptr_id = self.spv.allocId(); try self.func.body.emit(self.spv.gpa, .OpBitcast, .{ @@ -4515,7 +4481,7 @@ const NavGen = struct { return result_id; } - fn airBitCast(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airBitCast(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_ty = self.typeOf(ty_op.operand); const result_ty = self.typeOfIndex(inst); @@ -4528,7 +4494,7 @@ const NavGen = struct { return try self.bitCast(result_ty, operand_ty, operand_id); } - fn airIntCast(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airIntCast(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const src = try self.temporary(ty_op.operand); const dst_ty = self.typeOfIndex(inst); @@ -4554,7 +4520,7 @@ const NavGen = struct { return try result.materialize(self); } - fn intFromPtr(self: *NavGen, operand_id: IdRef) !IdRef { + fn intFromPtr(self: *NavGen, operand_id: Id) !Id { const result_type_id = try self.resolveType(Type.usize, .direct); const result_id = self.spv.allocId(); try self.func.body.emit(self.spv.gpa, .OpConvertPtrToU, .{ @@ -4565,7 +4531,7 @@ const NavGen = struct { return result_id; } - fn airFloatFromInt(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airFloatFromInt(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_ty = self.typeOf(ty_op.operand); const operand_id = try self.resolve(ty_op.operand); @@ -4573,7 +4539,7 @@ const NavGen = struct { return try self.floatFromInt(result_ty, operand_ty, operand_id); } - fn floatFromInt(self: *NavGen, result_ty: Type, operand_ty: Type, operand_id: IdRef) !IdRef { + fn floatFromInt(self: *NavGen, result_ty: Type, operand_ty: Type, operand_id: Id) !Id { const operand_info = self.arithmeticTypeInfo(operand_ty); const result_id = self.spv.allocId(); const result_ty_id = try self.resolveType(result_ty, .direct); @@ -4592,14 +4558,14 @@ const NavGen = struct { return result_id; } - fn airIntFromFloat(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airIntFromFloat(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_id = try self.resolve(ty_op.operand); const result_ty = self.typeOfIndex(inst); return try self.intFromFloat(result_ty, operand_id); } - fn intFromFloat(self: *NavGen, result_ty: Type, operand_id: IdRef) !IdRef { + fn intFromFloat(self: *NavGen, result_ty: Type, operand_id: Id) !Id { const result_info = self.arithmeticTypeInfo(result_ty); const result_ty_id = try self.resolveType(result_ty, .direct); const result_id = self.spv.allocId(); @@ -4618,7 +4584,7 @@ const NavGen = struct { return result_id; } - fn airFloatCast(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airFloatCast(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.temporary(ty_op.operand); const dest_ty = self.typeOfIndex(inst); @@ -4626,7 +4592,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airNot(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airNot(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand = try self.temporary(ty_op.operand); const result_ty = self.typeOfIndex(inst); @@ -4645,7 +4611,7 @@ const NavGen = struct { return try result.materialize(self); } - fn airArrayToSlice(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airArrayToSlice(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -4670,7 +4636,7 @@ const NavGen = struct { return try self.constructComposite(slice_ty_id, &.{ elem_ptr_id, len_id }); } - fn airSlice(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airSlice(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; const ptr_id = try self.resolve(bin_op.lhs); @@ -4680,7 +4646,7 @@ const NavGen = struct { return try self.constructComposite(slice_ty_id, &.{ ptr_id, len_id }); } - fn airAggregateInit(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airAggregateInit(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -4732,7 +4698,7 @@ const NavGen = struct { const types = try self.gpa.alloc(Type, elements.len); defer self.gpa.free(types); - const constituents = try self.gpa.alloc(IdRef, elements.len); + const constituents = try self.gpa.alloc(Id, elements.len); defer self.gpa.free(constituents); var index: usize = 0; @@ -4771,7 +4737,7 @@ const NavGen = struct { }, .vector => { const n_elems = result_ty.vectorLen(zcu); - const elem_ids = try self.gpa.alloc(IdRef, n_elems); + const elem_ids = try self.gpa.alloc(Id, n_elems); defer self.gpa.free(elem_ids); for (elements, 0..) |element, i| { @@ -4784,7 +4750,7 @@ const NavGen = struct { .array => { const array_info = result_ty.arrayInfo(zcu); const n_elems: usize = @intCast(result_ty.arrayLenIncludingSentinel(zcu)); - const elem_ids = try self.gpa.alloc(IdRef, n_elems); + const elem_ids = try self.gpa.alloc(Id, n_elems); defer self.gpa.free(elem_ids); for (elements, 0..) |element, i| { @@ -4803,7 +4769,7 @@ const NavGen = struct { } } - fn sliceOrArrayLen(self: *NavGen, operand_id: IdRef, ty: Type) !IdRef { + fn sliceOrArrayLen(self: *NavGen, operand_id: Id, ty: Type) !Id { const pt = self.pt; const zcu = pt.zcu; switch (ty.ptrSize(zcu)) { @@ -4819,7 +4785,7 @@ const NavGen = struct { } } - fn sliceOrArrayPtr(self: *NavGen, operand_id: IdRef, ty: Type) !IdRef { + fn sliceOrArrayPtr(self: *NavGen, operand_id: Id, ty: Type) !Id { const zcu = self.pt.zcu; if (ty.isSlice(zcu)) { const ptr_ty = ty.slicePtrFieldType(zcu); @@ -4849,14 +4815,14 @@ const NavGen = struct { return self.fail("TODO implement airMemcpy for spirv", .{}); } - fn airSliceField(self: *NavGen, inst: Air.Inst.Index, field: u32) !?IdRef { + fn airSliceField(self: *NavGen, inst: Air.Inst.Index, field: u32) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const field_ty = self.typeOfIndex(inst); const operand_id = try self.resolve(ty_op.operand); return try self.extractField(field_ty, operand_id, field); } - fn airSliceElemPtr(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airSliceElemPtr(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; @@ -4873,7 +4839,7 @@ const NavGen = struct { return try self.ptrAccessChain(ptr_ty_id, slice_ptr, index_id, &.{}); } - fn airSliceElemVal(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airSliceElemVal(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const slice_ty = self.typeOf(bin_op.lhs); @@ -4890,7 +4856,7 @@ const NavGen = struct { return try self.load(slice_ty.childType(zcu), elem_ptr, .{ .is_volatile = slice_ty.isVolatilePtr(zcu) }); } - fn ptrElemPtr(self: *NavGen, ptr_ty: Type, ptr_id: IdRef, index_id: IdRef) !IdRef { + fn ptrElemPtr(self: *NavGen, ptr_ty: Type, ptr_id: Id, index_id: Id) !Id { const zcu = self.pt.zcu; // Construct new pointer type for the resulting pointer const elem_ty = ptr_ty.elemType2(zcu); // use elemType() so that we get T for *[N]T. @@ -4905,7 +4871,7 @@ const NavGen = struct { } } - fn airPtrElemPtr(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airPtrElemPtr(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; @@ -4923,7 +4889,7 @@ const NavGen = struct { return try self.ptrElemPtr(src_ptr_ty, ptr_id, index_id); } - fn airArrayElemVal(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airArrayElemVal(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const array_ty = self.typeOf(bin_op.lhs); @@ -4938,14 +4904,14 @@ const NavGen = struct { const is_vector = array_ty.isVector(zcu); const elem_repr: Repr = if (is_vector) .direct else .indirect; - const ptr_array_ty_id = try self.ptrType(array_ty, .Function, .direct); - const ptr_elem_ty_id = try self.ptrType(elem_ty, .Function, elem_repr); + const ptr_array_ty_id = try self.ptrType(array_ty, .function, .direct); + const ptr_elem_ty_id = try self.ptrType(elem_ty, .function, elem_repr); const tmp_id = self.spv.allocId(); try self.func.prologue.emit(self.spv.gpa, .OpVariable, .{ .id_result_type = ptr_array_ty_id, .id_result = tmp_id, - .storage_class = .Function, + .storage_class = .function, }); try self.func.body.emit(self.spv.gpa, .OpStore, .{ @@ -4973,7 +4939,7 @@ const NavGen = struct { return try self.convertToDirect(elem_ty, result_id); } - fn airPtrElemVal(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airPtrElemVal(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const bin_op = self.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; const ptr_ty = self.typeOf(bin_op.lhs); @@ -5029,7 +4995,7 @@ const NavGen = struct { } } - fn airGetUnionTag(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airGetUnionTag(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const un_ty = self.typeOf(ty_op.operand); @@ -5048,8 +5014,8 @@ const NavGen = struct { self: *NavGen, ty: Type, active_field: u32, - payload: ?IdRef, - ) !IdRef { + payload: ?Id, + ) !Id { // To initialize a union, generate a temporary variable with the // union type, then get the field pointer and pointer-cast it to the // right type to store it. Finally load the entire union. @@ -5100,20 +5066,20 @@ const NavGen = struct { return try self.constInt(tag_ty, tag_int); } - const tmp_id = try self.alloc(ty, .{ .storage_class = .Function }); + const tmp_id = try self.alloc(ty, .{ .storage_class = .function }); if (layout.tag_size != 0) { - const tag_ptr_ty_id = try self.ptrType(tag_ty, .Function, .indirect); + const tag_ptr_ty_id = try self.ptrType(tag_ty, .function, .indirect); const ptr_id = try self.accessChain(tag_ptr_ty_id, tmp_id, &.{@as(u32, @intCast(layout.tag_index))}); const tag_id = try self.constInt(tag_ty, tag_int); try self.store(tag_ty, ptr_id, tag_id, .{}); } if (payload_ty.hasRuntimeBitsIgnoreComptime(zcu)) { - const pl_ptr_ty_id = try self.ptrType(layout.payload_ty, .Function, .indirect); + const pl_ptr_ty_id = try self.ptrType(layout.payload_ty, .function, .indirect); const pl_ptr_id = try self.accessChain(pl_ptr_ty_id, tmp_id, &.{layout.payload_index}); const active_pl_ptr_id = if (!layout.payload_ty.eql(payload_ty, zcu)) blk: { - const active_pl_ptr_ty_id = try self.ptrType(payload_ty, .Function, .indirect); + const active_pl_ptr_ty_id = try self.ptrType(payload_ty, .function, .indirect); const active_pl_ptr_id = self.spv.allocId(); try self.func.body.emit(self.spv.gpa, .OpBitcast, .{ .id_result_type = active_pl_ptr_ty_id, @@ -5134,7 +5100,7 @@ const NavGen = struct { return try self.load(ty, tmp_id, .{}); } - fn airUnionInit(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airUnionInit(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ip = &zcu.intern_pool; @@ -5151,7 +5117,7 @@ const NavGen = struct { return try self.unionInit(ty, extra.field_index, payload); } - fn airStructFieldVal(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airStructFieldVal(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; @@ -5216,13 +5182,13 @@ const NavGen = struct { const layout = self.unionLayout(object_ty); assert(layout.has_payload); - const tmp_id = try self.alloc(object_ty, .{ .storage_class = .Function }); + const tmp_id = try self.alloc(object_ty, .{ .storage_class = .function }); try self.store(object_ty, tmp_id, object_id, .{}); - const pl_ptr_ty_id = try self.ptrType(layout.payload_ty, .Function, .indirect); + const pl_ptr_ty_id = try self.ptrType(layout.payload_ty, .function, .indirect); const pl_ptr_id = try self.accessChain(pl_ptr_ty_id, tmp_id, &.{layout.payload_index}); - const active_pl_ptr_ty_id = try self.ptrType(field_ty, .Function, .indirect); + const active_pl_ptr_ty_id = try self.ptrType(field_ty, .function, .indirect); const active_pl_ptr_id = self.spv.allocId(); try self.func.body.emit(self.spv.gpa, .OpBitcast, .{ .id_result_type = active_pl_ptr_ty_id, @@ -5236,7 +5202,7 @@ const NavGen = struct { } } - fn airFieldParentPtr(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airFieldParentPtr(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; @@ -5273,9 +5239,9 @@ const NavGen = struct { self: *NavGen, result_ptr_ty: Type, object_ptr_ty: Type, - object_ptr: IdRef, + object_ptr: Id, field_index: u32, - ) !IdRef { + ) !Id { const result_ty_id = try self.resolveType(result_ptr_ty, .direct); const zcu = self.pt.zcu; @@ -5318,7 +5284,7 @@ const NavGen = struct { } } - fn airStructFieldPtrIndex(self: *NavGen, inst: Air.Inst.Index, field_index: u32) !?IdRef { + fn airStructFieldPtrIndex(self: *NavGen, inst: Air.Inst.Index, field_index: u32) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const struct_ptr = try self.resolve(ty_op.operand); const struct_ptr_ty = self.typeOf(ty_op.operand); @@ -5327,7 +5293,7 @@ const NavGen = struct { } const AllocOptions = struct { - initializer: ?IdRef = null, + initializer: ?Id = null, /// The final storage class of the pointer. This may be either `.Generic` or `.Function`. /// In either case, the local is allocated in the `.Function` storage class, and optionally /// cast back to `.Generic`. @@ -5342,8 +5308,8 @@ const NavGen = struct { self: *NavGen, ty: Type, options: AllocOptions, - ) !IdRef { - const ptr_fn_ty_id = try self.ptrType(ty, .Function, .indirect); + ) !Id { + const ptr_fn_ty_id = try self.ptrType(ty, .function, .indirect); // SPIR-V requires that OpVariable declarations for locals go into the first block, so we are just going to // directly generate them into func.prologue instead of the body. @@ -5351,7 +5317,7 @@ const NavGen = struct { try self.func.prologue.emit(self.spv.gpa, .OpVariable, .{ .id_result_type = ptr_fn_ty_id, .id_result = var_id, - .storage_class = .Function, + .storage_class = .function, .initializer = options.initializer, }); @@ -5361,17 +5327,17 @@ const NavGen = struct { } switch (options.storage_class) { - .Generic => { - const ptr_gn_ty_id = try self.ptrType(ty, .Generic, .indirect); + .generic => { + const ptr_gn_ty_id = try self.ptrType(ty, .generic, .indirect); // Convert to a generic pointer return self.castToGeneric(ptr_gn_ty_id, var_id); }, - .Function => return var_id, + .function => return var_id, else => unreachable, } } - fn airAlloc(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airAlloc(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ptr_ty = self.typeOfIndex(inst); const child_ty = ptr_ty.childType(zcu); @@ -5380,7 +5346,7 @@ const NavGen = struct { }); } - fn airArg(self: *NavGen) IdRef { + fn airArg(self: *NavGen) Id { defer self.next_arg_index += 1; return self.args.items[self.next_arg_index]; } @@ -5389,14 +5355,14 @@ const NavGen = struct { /// block to jump to. This function emits instructions, so it should be emitted /// inside the merge block of the block. /// This function should only be called with structured control flow generation. - fn structuredNextBlock(self: *NavGen, incoming: []const ControlFlow.Structured.Block.Incoming) !IdRef { + fn structuredNextBlock(self: *NavGen, incoming: []const ControlFlow.Structured.Block.Incoming) !Id { assert(self.control_flow == .structured); const result_id = self.spv.allocId(); const block_id_ty_id = try self.resolveType(Type.u32, .direct); try self.func.body.emitRaw(self.spv.gpa, .OpPhi, @intCast(2 + incoming.len * 2)); // result type + result + variable/parent... - self.func.body.writeOperand(spec.IdResultType, block_id_ty_id); - self.func.body.writeOperand(spec.IdRef, result_id); + self.func.body.writeOperand(spec.Id, block_id_ty_id); + self.func.body.writeOperand(spec.Id, result_id); for (incoming) |incoming_block| { self.func.body.writeOperand(spec.PairIdRefIdRef, .{ incoming_block.next_block, incoming_block.src_label }); @@ -5408,7 +5374,7 @@ const NavGen = struct { /// Jumps to the block with the target block-id. This function must only be called when /// terminating a body, there should be no instructions after it. /// This function should only be called with structured control flow generation. - fn structuredBreak(self: *NavGen, target_block: IdRef) !void { + fn structuredBreak(self: *NavGen, target_block: Id) !void { assert(self.control_flow == .structured); const sblock = self.control_flow.structured.block_stack.getLast(); @@ -5448,12 +5414,12 @@ const NavGen = struct { /// Using loops; loops can be early exited by jumping to the merge block at /// any time. loop: struct { - merge_label: IdRef, - continue_label: IdRef, + merge_label: Id, + continue_label: Id, }, }, body: []const Air.Inst.Index, - ) !IdRef { + ) !Id { assert(self.control_flow == .structured); var sblock: ControlFlow.Structured.Block = switch (block_merge_type) { @@ -5533,13 +5499,13 @@ const NavGen = struct { } } - fn airBlock(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airBlock(self: *NavGen, inst: Air.Inst.Index) !?Id { const inst_datas = self.air.instructions.items(.data); const extra = self.air.extraData(Air.Block, inst_datas[@intFromEnum(inst)].ty_pl.payload); return self.lowerBlock(inst, @ptrCast(self.air.extra.items[extra.end..][0..extra.data.body_len])); } - fn lowerBlock(self: *NavGen, inst: Air.Inst.Index, body: []const Air.Inst.Index) !?IdRef { + fn lowerBlock(self: *NavGen, inst: Air.Inst.Index, body: []const Air.Inst.Index) !?Id { // In AIR, a block doesn't really define an entry point like a block, but // more like a scope that breaks can jump out of and "return" a value from. // This cannot be directly modelled in SPIR-V, so in a block instruction, @@ -5584,8 +5550,8 @@ const NavGen = struct { // result type + result + variable/parent... 2 + @as(u16, @intCast(block.incoming_blocks.items.len * 2)), ); - self.func.body.writeOperand(spec.IdResultType, result_type_id); - self.func.body.writeOperand(spec.IdRef, result_id); + self.func.body.writeOperand(spec.Id, result_type_id); + self.func.body.writeOperand(spec.Id, result_id); for (block.incoming_blocks.items) |incoming| { self.func.body.writeOperand( @@ -5599,7 +5565,7 @@ const NavGen = struct { }; const maybe_block_result_var_id = if (have_block_result) blk: { - const block_result_var_id = try self.alloc(ty, .{ .storage_class = .Function }); + const block_result_var_id = try self.alloc(ty, .{ .storage_class = .function }); try cf.block_results.putNoClobber(self.gpa, inst, block_result_var_id); break :blk block_result_var_id; } else null; @@ -5823,7 +5789,7 @@ const NavGen = struct { } } - fn airLoad(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airLoad(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const ptr_ty = self.typeOf(ty_op.operand); @@ -5894,7 +5860,7 @@ const NavGen = struct { }); } - fn airTry(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airTry(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const err_union_id = try self.resolve(pl_op.operand); @@ -5964,7 +5930,7 @@ const NavGen = struct { return try self.extractField(payload_ty, err_union_id, eu_layout.payloadFieldIndex()); } - fn airErrUnionErr(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airErrUnionErr(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_id = try self.resolve(ty_op.operand); @@ -5987,7 +5953,7 @@ const NavGen = struct { return try self.extractField(Type.anyerror, operand_id, eu_layout.errorFieldIndex()); } - fn airErrUnionPayload(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airErrUnionPayload(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const operand_id = try self.resolve(ty_op.operand); const payload_ty = self.typeOfIndex(inst); @@ -6000,7 +5966,7 @@ const NavGen = struct { return try self.extractField(payload_ty, operand_id, eu_layout.payloadFieldIndex()); } - fn airWrapErrUnionErr(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airWrapErrUnionErr(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const err_union_ty = self.typeOfIndex(inst); @@ -6014,7 +5980,7 @@ const NavGen = struct { const payload_ty_id = try self.resolveType(payload_ty, .indirect); - var members: [2]IdRef = undefined; + var members: [2]Id = undefined; members[eu_layout.errorFieldIndex()] = operand_id; members[eu_layout.payloadFieldIndex()] = try self.spv.constUndef(payload_ty_id); @@ -6026,7 +5992,7 @@ const NavGen = struct { return try self.constructComposite(err_union_ty_id, &members); } - fn airWrapErrUnionPayload(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airWrapErrUnionPayload(self: *NavGen, inst: Air.Inst.Index) !?Id { const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; const err_union_ty = self.typeOfIndex(inst); const operand_id = try self.resolve(ty_op.operand); @@ -6037,7 +6003,7 @@ const NavGen = struct { return try self.constInt(Type.anyerror, 0); } - var members: [2]IdRef = undefined; + var members: [2]Id = undefined; members[eu_layout.errorFieldIndex()] = try self.constInt(Type.anyerror, 0); members[eu_layout.payloadFieldIndex()] = try self.convertToIndirect(payload_ty, operand_id); @@ -6049,7 +6015,7 @@ const NavGen = struct { return try self.constructComposite(err_union_ty_id, &members); } - fn airIsNull(self: *NavGen, inst: Air.Inst.Index, is_pointer: bool, pred: enum { is_null, is_non_null }) !?IdRef { + fn airIsNull(self: *NavGen, inst: Air.Inst.Index, is_pointer: bool, pred: enum { is_null, is_non_null }) !?Id { const pt = self.pt; const zcu = pt.zcu; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; @@ -6126,7 +6092,7 @@ const NavGen = struct { }; } - fn airIsErr(self: *NavGen, inst: Air.Inst.Index, pred: enum { is_err, is_non_err }) !?IdRef { + fn airIsErr(self: *NavGen, inst: Air.Inst.Index, pred: enum { is_err, is_non_err }) !?Id { const zcu = self.pt.zcu; const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op; const operand_id = try self.resolve(un_op); @@ -6164,7 +6130,7 @@ const NavGen = struct { return result_id; } - fn airUnwrapOptional(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airUnwrapOptional(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -6181,7 +6147,7 @@ const NavGen = struct { return try self.extractField(payload_ty, operand_id, 0); } - fn airUnwrapOptionalPtr(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airUnwrapOptionalPtr(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -6206,7 +6172,7 @@ const NavGen = struct { return try self.accessChain(result_ty_id, operand_id, &.{0}); } - fn airWrapOptional(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airWrapOptional(self: *NavGen, inst: Air.Inst.Index) !?Id { const pt = self.pt; const zcu = pt.zcu; const ty_op = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; @@ -6224,7 +6190,7 @@ const NavGen = struct { } const payload_id = try self.convertToIndirect(payload_ty, operand_id); - const members = [_]IdRef{ payload_id, try self.constBool(true, .indirect) }; + const members = [_]Id{ payload_id, try self.constBool(true, .indirect) }; const optional_ty_id = try self.resolveType(optional_ty, .direct); return try self.constructComposite(optional_ty_id, &members); } @@ -6294,8 +6260,8 @@ const NavGen = struct { // Emit the instruction before generating the blocks. try self.func.body.emitRaw(self.spv.gpa, .OpSwitch, 2 + (cond_words + 1) * num_conditions); - self.func.body.writeOperand(IdRef, cond_indirect); - self.func.body.writeOperand(IdRef, default); + self.func.body.writeOperand(Id, cond_indirect); + self.func.body.writeOperand(Id, default); // Emit each of the cases { @@ -6322,7 +6288,7 @@ const NavGen = struct { else => unreachable, }; self.func.body.writeOperand(spec.LiteralContextDependentNumber, int_lit); - self.func.body.writeOperand(IdRef, label); + self.func.body.writeOperand(Id, label); } } } @@ -6399,7 +6365,7 @@ const NavGen = struct { }); } - fn airDbgInlineBlock(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airDbgInlineBlock(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const inst_datas = self.air.instructions.items(.data); const extra = self.air.extraData(Air.DbgInlineBlock, inst_datas[@intFromEnum(inst)].ty_pl.payload); @@ -6416,7 +6382,7 @@ const NavGen = struct { try self.spv.debugName(target_id, name.toSlice(self.air)); } - fn airAssembly(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airAssembly(self: *NavGen, inst: Air.Inst.Index) !?Id { const zcu = self.pt.zcu; const ty_pl = self.air.instructions.items(.data)[@intFromEnum(inst)].ty_pl; const extra = self.air.extraData(Air.Asm, ty_pl.payload); @@ -6586,7 +6552,7 @@ const NavGen = struct { return null; } - fn airCall(self: *NavGen, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) !?IdRef { + fn airCall(self: *NavGen, inst: Air.Inst.Index, modifier: std.builtin.CallModifier) !?Id { _ = modifier; const pt = self.pt; @@ -6608,7 +6574,7 @@ const NavGen = struct { const callee_id = try self.resolve(pl_op.operand); comptime assert(zig_call_abi_ver == 3); - const params = try self.gpa.alloc(spec.IdRef, args.len); + const params = try self.gpa.alloc(spec.Id, args.len); defer self.gpa.free(params); var n_params: usize = 0; for (args) |arg| { @@ -6637,7 +6603,7 @@ const NavGen = struct { return result_id; } - fn builtin3D(self: *NavGen, result_ty: Type, builtin: spec.BuiltIn, dimension: u32, out_of_range_value: anytype) !IdRef { + fn builtin3D(self: *NavGen, result_ty: Type, builtin: spec.BuiltIn, dimension: u32, out_of_range_value: anytype) !Id { if (dimension >= 3) { return try self.constInt(result_ty, out_of_range_value); } @@ -6645,7 +6611,7 @@ const NavGen = struct { .len = 3, .child = result_ty.toIntern(), }); - const ptr_ty_id = try self.ptrType(vec_ty, .Input, .indirect); + const ptr_ty_id = try self.ptrType(vec_ty, .input, .indirect); const spv_decl_index = try self.spv.builtin(ptr_ty_id, builtin); try self.func.decl_deps.put(self.spv.gpa, spv_decl_index, {}); const ptr = self.spv.declPtr(spv_decl_index).result_id; @@ -6653,34 +6619,34 @@ const NavGen = struct { return try self.extractVectorComponent(result_ty, vec, dimension); } - fn airWorkItemId(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airWorkItemId(self: *NavGen, inst: Air.Inst.Index) !?Id { if (self.liveness.isUnused(inst)) return null; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const dimension = pl_op.payload; // TODO: Should we make these builtins return usize? - const result_id = try self.builtin3D(Type.u64, .LocalInvocationId, dimension, 0); + const result_id = try self.builtin3D(Type.u64, .local_invocation_id, dimension, 0); const tmp = Temporary.init(Type.u64, result_id); const result = try self.buildConvert(Type.u32, tmp); return try result.materialize(self); } - fn airWorkGroupSize(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airWorkGroupSize(self: *NavGen, inst: Air.Inst.Index) !?Id { if (self.liveness.isUnused(inst)) return null; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const dimension = pl_op.payload; // TODO: Should we make these builtins return usize? - const result_id = try self.builtin3D(Type.u64, .WorkgroupSize, dimension, 0); + const result_id = try self.builtin3D(Type.u64, .workgroup_size, dimension, 0); const tmp = Temporary.init(Type.u64, result_id); const result = try self.buildConvert(Type.u32, tmp); return try result.materialize(self); } - fn airWorkGroupId(self: *NavGen, inst: Air.Inst.Index) !?IdRef { + fn airWorkGroupId(self: *NavGen, inst: Air.Inst.Index) !?Id { if (self.liveness.isUnused(inst)) return null; const pl_op = self.air.instructions.items(.data)[@intFromEnum(inst)].pl_op; const dimension = pl_op.payload; // TODO: Should we make these builtins return usize? - const result_id = try self.builtin3D(Type.u64, .WorkgroupId, dimension, 0); + const result_id = try self.builtin3D(Type.u64, .workgroup_id, dimension, 0); const tmp = Temporary.init(Type.u64, result_id); const result = try self.buildConvert(Type.u32, tmp); return try result.materialize(self); diff --git a/src/codegen/spirv/Assembler.zig b/src/codegen/spirv/Assembler.zig index 2cf336b9c4..190c8c2e92 100644 --- a/src/codegen/spirv/Assembler.zig +++ b/src/codegen/spirv/Assembler.zig @@ -7,8 +7,7 @@ const assert = std.debug.assert; const spec = @import("spec.zig"); const Opcode = spec.Opcode; const Word = spec.Word; -const IdRef = spec.IdRef; -const IdResult = spec.IdResult; +const Id = spec.Id; const StorageClass = spec.StorageClass; const SpvModule = @import("Module.zig"); @@ -127,10 +126,10 @@ const AsmValue = union(enum) { unresolved_forward_reference, /// This result-value is a normal result produced by a different instruction. - value: IdRef, + value: Id, /// This result-value represents a type registered into the module's type system. - ty: IdRef, + ty: Id, /// This is a pre-supplied constant integer value. constant: u32, @@ -141,7 +140,7 @@ const AsmValue = union(enum) { /// Retrieve the result-id of this AsmValue. Asserts that this AsmValue /// is of a variant that allows the result to be obtained (not an unresolved /// forward declaration, not in the process of being declared, etc). - pub fn resultId(self: AsmValue) IdRef { + pub fn resultId(self: AsmValue) Id { return switch (self) { .just_declared, .unresolved_forward_reference, @@ -314,7 +313,7 @@ fn processInstruction(self: *Assembler) !void { return; }, else => switch (self.inst.opcode.class()) { - .TypeDeclaration => try self.processTypeInstruction(), + .type_declaration => try self.processTypeInstruction(), else => (try self.processGenericInstruction()) orelse return, }, }; @@ -392,7 +391,7 @@ fn processTypeInstruction(self: *Assembler) !AsmValue { break :blk result_id; }, .OpTypeStruct => blk: { - const ids = try self.gpa.alloc(IdRef, operands[1..].len); + const ids = try self.gpa.alloc(Id, operands[1..].len); defer self.gpa.free(ids); for (operands[1..], ids) |op, *id| id.* = try self.resolveRefId(op.ref_id); const result_id = self.spv.allocId(); @@ -429,7 +428,7 @@ fn processTypeInstruction(self: *Assembler) !AsmValue { const param_operands = operands[2..]; const return_type = try self.resolveRefId(operands[1].ref_id); - const param_types = try self.spv.gpa.alloc(IdRef, param_operands.len); + const param_types = try self.spv.gpa.alloc(Id, param_operands.len); defer self.spv.gpa.free(param_types); for (param_types, param_operands) |*param, operand| { param.* = try self.resolveRefId(operand.ref_id); @@ -457,17 +456,17 @@ fn processGenericInstruction(self: *Assembler) !?AsmValue { const operands = self.inst.operands.items; var maybe_spv_decl_index: ?SpvModule.Decl.Index = null; const section = switch (self.inst.opcode.class()) { - .ConstantCreation => &self.spv.sections.types_globals_constants, - .Annotation => &self.spv.sections.annotations, - .TypeDeclaration => unreachable, // Handled elsewhere. + .constant_creation => &self.spv.sections.types_globals_constants, + .annotation => &self.spv.sections.annotations, + .type_declaration => unreachable, // Handled elsewhere. else => switch (self.inst.opcode) { .OpEntryPoint => unreachable, .OpExecutionMode, .OpExecutionModeId => &self.spv.sections.execution_modes, .OpVariable => section: { const storage_class: spec.StorageClass = @enumFromInt(operands[2].value); - if (storage_class == .Function) break :section &self.func.prologue; + if (storage_class == .function) break :section &self.func.prologue; maybe_spv_decl_index = try self.spv.allocDecl(.global); - if (self.spv.version.minor < 4 and storage_class != .Input and storage_class != .Output) { + if (self.spv.version.minor < 4 and storage_class != .input and storage_class != .output) { // Before version 1.4, the interface’s storage classes are limited to the Input and Output break :section &self.spv.sections.types_globals_constants; } @@ -481,7 +480,7 @@ fn processGenericInstruction(self: *Assembler) !?AsmValue { }, }; - var maybe_result_id: ?IdResult = null; + var maybe_result_id: ?Id = null; const first_word = section.instructions.items.len; // At this point we're not quite sure how many operands this instruction is going to have, // so insert 0 and patch up the actual opcode word later. @@ -504,12 +503,12 @@ fn processGenericInstruction(self: *Assembler) !?AsmValue { else self.spv.allocId(); try section.ensureUnusedCapacity(self.spv.gpa, 1); - section.writeOperand(IdResult, maybe_result_id.?); + section.writeOperand(Id, maybe_result_id.?); }, .ref_id => |index| { const result = try self.resolveRef(index); try section.ensureUnusedCapacity(self.spv.gpa, 1); - section.writeOperand(spec.IdRef, result.resultId()); + section.writeOperand(spec.Id, result.resultId()); }, .string => |offset| { const text = std.mem.sliceTo(self.inst.string_bytes.items[offset..], 0); @@ -558,7 +557,7 @@ fn resolveRef(self: *Assembler, ref: AsmValue.Ref) !AsmValue { } } -fn resolveRefId(self: *Assembler, ref: AsmValue.Ref) !IdRef { +fn resolveRefId(self: *Assembler, ref: AsmValue.Ref) !Id { const value = try self.resolveRef(ref); return value.resultId(); } @@ -600,7 +599,7 @@ fn parseInstruction(self: *Assembler) !void { const expected_operands = inst.operands; // This is a loop because the result-id is not always the first operand. const requires_lhs_result = for (expected_operands) |op| { - if (op.kind == .IdResult) break true; + if (op.kind == .id_result) break true; } else false; if (requires_lhs_result and maybe_lhs_result == null) { @@ -614,7 +613,7 @@ fn parseInstruction(self: *Assembler) !void { } for (expected_operands) |operand| { - if (operand.kind == .IdResult) { + if (operand.kind == .id_result) { try self.inst.operands.append(self.gpa, .{ .result_id = maybe_lhs_result.? }); continue; } @@ -646,11 +645,11 @@ fn parseOperand(self: *Assembler, kind: spec.OperandKind) Error!void { .value_enum => try self.parseValueEnum(kind), .id => try self.parseRefId(), else => switch (kind) { - .LiteralInteger => try self.parseLiteralInteger(), - .LiteralString => try self.parseString(), - .LiteralContextDependentNumber => try self.parseContextDependentNumber(), - .LiteralExtInstInteger => try self.parseLiteralExtInstInteger(), - .PairIdRefIdRef => try self.parsePhiSource(), + .literal_integer => try self.parseLiteralInteger(), + .literal_string => try self.parseString(), + .literal_context_dependent_number => try self.parseContextDependentNumber(), + .literal_ext_inst_integer => try self.parseLiteralExtInstInteger(), + .pair_id_ref_id_ref => try self.parsePhiSource(), else => return self.todo("parse operand of type {s}", .{@tagName(kind)}), }, } diff --git a/src/codegen/spirv/Module.zig b/src/codegen/spirv/Module.zig index 0b2f1aaab3..ffcff0eab4 100644 --- a/src/codegen/spirv/Module.zig +++ b/src/codegen/spirv/Module.zig @@ -15,9 +15,7 @@ const Wyhash = std.hash.Wyhash; const spec = @import("spec.zig"); const Word = spec.Word; -const IdRef = spec.IdRef; -const IdResult = spec.IdResult; -const IdResultType = spec.IdResultType; +const Id = spec.Id; const Section = @import("Section.zig"); @@ -82,7 +80,7 @@ pub const Decl = struct { /// - For `func`, this is the result-id of the associated OpFunction instruction. /// - For `global`, this is the result-id of the associated OpVariable instruction. /// - For `invocation_global`, this is the result-id of the associated InvocationGlobal instruction. - result_id: IdRef, + result_id: Id, /// The offset of the first dependency of this decl in the `decl_deps` array. begin_dep: u32, /// The past-end offset of the dependencies of this decl in the `decl_deps` array. @@ -150,7 +148,7 @@ sections: struct { next_result_id: Word, /// Cache for results of OpString instructions. -strings: std.StringArrayHashMapUnmanaged(IdRef) = .empty, +strings: std.StringArrayHashMapUnmanaged(Id) = .empty, /// Some types shouldn't be emitted more than one time, but cannot be caught by /// the `intern_map` during codegen. Sometimes, IDs are compared to check if @@ -161,20 +159,20 @@ strings: std.StringArrayHashMapUnmanaged(IdRef) = .empty, /// Additionally, this is used for other values which can be cached, for example, /// built-in variables. cache: struct { - bool_type: ?IdRef = null, - void_type: ?IdRef = null, - int_types: std.AutoHashMapUnmanaged(std.builtin.Type.Int, IdRef) = .empty, - float_types: std.AutoHashMapUnmanaged(std.builtin.Type.Float, IdRef) = .empty, - vector_types: std.AutoHashMapUnmanaged(struct { IdRef, u32 }, IdRef) = .empty, - array_types: std.AutoHashMapUnmanaged(struct { IdRef, IdRef }, IdRef) = .empty, + bool_type: ?Id = null, + void_type: ?Id = null, + int_types: std.AutoHashMapUnmanaged(std.builtin.Type.Int, Id) = .empty, + float_types: std.AutoHashMapUnmanaged(std.builtin.Type.Float, Id) = .empty, + vector_types: std.AutoHashMapUnmanaged(struct { Id, u32 }, Id) = .empty, + array_types: std.AutoHashMapUnmanaged(struct { Id, Id }, Id) = .empty, capabilities: std.AutoHashMapUnmanaged(spec.Capability, void) = .empty, extensions: std.StringHashMapUnmanaged(void) = .empty, - extended_instruction_set: std.AutoHashMapUnmanaged(spec.InstructionSet, IdRef) = .empty, - decorations: std.AutoHashMapUnmanaged(struct { IdRef, spec.Decoration }, void) = .empty, - builtins: std.AutoHashMapUnmanaged(struct { IdRef, spec.BuiltIn }, Decl.Index) = .empty, + extended_instruction_set: std.AutoHashMapUnmanaged(spec.InstructionSet, Id) = .empty, + decorations: std.AutoHashMapUnmanaged(struct { Id, spec.Decoration }, void) = .empty, + builtins: std.AutoHashMapUnmanaged(struct { Id, spec.BuiltIn }, Decl.Index) = .empty, - bool_const: [2]?IdRef = .{ null, null }, + bool_const: [2]?Id = .{ null, null }, } = .{}, /// Set of Decls, referred to by Decl.Index. @@ -185,7 +183,7 @@ decls: std.ArrayListUnmanaged(Decl) = .empty, decl_deps: std.ArrayListUnmanaged(Decl.Index) = .empty, /// The list of entry points that should be exported from this module. -entry_points: std.AutoArrayHashMapUnmanaged(IdRef, EntryPoint) = .empty, +entry_points: std.AutoArrayHashMapUnmanaged(Id, EntryPoint) = .empty, pub fn init(gpa: Allocator, target: *const std.Target) Module { const version_minor: u8 = blk: { @@ -245,7 +243,7 @@ pub const IdRange = struct { base: u32, len: u32, - pub fn at(range: IdRange, i: usize) IdResult { + pub fn at(range: IdRange, i: usize) Id { assert(i < range.len); return @enumFromInt(range.base + i); } @@ -259,7 +257,7 @@ pub fn allocIds(self: *Module, n: u32) IdRange { }; } -pub fn allocId(self: *Module) IdResult { +pub fn allocId(self: *Module) Id { return self.allocIds(1).at(0); } @@ -275,7 +273,7 @@ fn addEntryPointDeps( self: *Module, decl_index: Decl.Index, seen: *std.DynamicBitSetUnmanaged, - interface: *std.ArrayList(IdRef), + interface: *std.ArrayList(Id), ) !void { const decl = self.declPtr(decl_index); const deps = self.decl_deps.items[decl.begin_dep..decl.end_dep]; @@ -299,7 +297,7 @@ fn entryPoints(self: *Module) !Section { var entry_points = Section{}; errdefer entry_points.deinit(self.gpa); - var interface = std.ArrayList(IdRef).init(self.gpa); + var interface = std.ArrayList(Id).init(self.gpa); defer interface.deinit(); var seen = try std.DynamicBitSetUnmanaged.initEmpty(self.gpa, self.decls.items.len); @@ -317,12 +315,12 @@ fn entryPoints(self: *Module) !Section { .interface = interface.items, }); - if (entry_point.exec_mode == null and entry_point.exec_model == .Fragment) { + if (entry_point.exec_mode == null and entry_point.exec_model == .fragment) { switch (self.target.os.tag) { .vulkan, .opengl => |tag| { try self.sections.execution_modes.emit(self.gpa, .OpExecutionMode, .{ .entry_point = entry_point_id, - .mode = if (tag == .vulkan) .OriginUpperLeft else .OriginLowerLeft, + .mode = if (tag == .vulkan) .origin_upper_left else .origin_lower_left, }); }, .opencl => {}, @@ -338,59 +336,59 @@ pub fn finalize(self: *Module, a: Allocator) ![]Word { // Emit capabilities and extensions switch (self.target.os.tag) { .opengl => { - try self.addCapability(.Shader); - try self.addCapability(.Matrix); + try self.addCapability(.shader); + try self.addCapability(.matrix); }, .vulkan => { - try self.addCapability(.Shader); - try self.addCapability(.Matrix); + try self.addCapability(.shader); + try self.addCapability(.matrix); if (self.target.cpu.arch == .spirv64) { try self.addExtension("SPV_KHR_physical_storage_buffer"); - try self.addCapability(.PhysicalStorageBufferAddresses); + try self.addCapability(.physical_storage_buffer_addresses); } }, .opencl, .amdhsa => { - try self.addCapability(.Kernel); - try self.addCapability(.Addresses); + try self.addCapability(.kernel); + try self.addCapability(.addresses); }, else => unreachable, } - if (self.target.cpu.arch == .spirv64) try self.addCapability(.Int64); - if (self.target.cpu.has(.spirv, .int64)) try self.addCapability(.Int64); - if (self.target.cpu.has(.spirv, .float16)) try self.addCapability(.Float16); - if (self.target.cpu.has(.spirv, .float64)) try self.addCapability(.Float64); - if (self.target.cpu.has(.spirv, .generic_pointer)) try self.addCapability(.GenericPointer); - if (self.target.cpu.has(.spirv, .vector16)) try self.addCapability(.Vector16); + if (self.target.cpu.arch == .spirv64) try self.addCapability(.int64); + if (self.target.cpu.has(.spirv, .int64)) try self.addCapability(.int64); + if (self.target.cpu.has(.spirv, .float16)) try self.addCapability(.float16); + if (self.target.cpu.has(.spirv, .float64)) try self.addCapability(.float64); + if (self.target.cpu.has(.spirv, .generic_pointer)) try self.addCapability(.generic_pointer); + if (self.target.cpu.has(.spirv, .vector16)) try self.addCapability(.vector16); if (self.target.cpu.has(.spirv, .storage_push_constant16)) { try self.addExtension("SPV_KHR_16bit_storage"); - try self.addCapability(.StoragePushConstant16); + try self.addCapability(.storage_push_constant16); } if (self.target.cpu.has(.spirv, .arbitrary_precision_integers)) { try self.addExtension("SPV_INTEL_arbitrary_precision_integers"); - try self.addCapability(.ArbitraryPrecisionIntegersINTEL); + try self.addCapability(.arbitrary_precision_integers_intel); } if (self.target.cpu.has(.spirv, .variable_pointers)) { try self.addExtension("SPV_KHR_variable_pointers"); - try self.addCapability(.VariablePointersStorageBuffer); - try self.addCapability(.VariablePointers); + try self.addCapability(.variable_pointers_storage_buffer); + try self.addCapability(.variable_pointers); } // These are well supported - try self.addCapability(.Int8); - try self.addCapability(.Int16); + try self.addCapability(.int8); + try self.addCapability(.int16); // Emit memory model const addressing_model: spec.AddressingModel = switch (self.target.os.tag) { - .opengl => .Logical, - .vulkan => if (self.target.cpu.arch == .spirv32) .Logical else .PhysicalStorageBuffer64, - .opencl => if (self.target.cpu.arch == .spirv32) .Physical32 else .Physical64, - .amdhsa => .Physical64, + .opengl => .logical, + .vulkan => if (self.target.cpu.arch == .spirv32) .logical else .physical_storage_buffer64, + .opencl => if (self.target.cpu.arch == .spirv32) .physical32 else .physical64, + .amdhsa => .physical64, else => unreachable, }; try self.sections.memory_model.emit(self.gpa, .OpMemoryModel, .{ .addressing_model = addressing_model, .memory_model = switch (self.target.os.tag) { - .opencl => .OpenCL, - .vulkan, .opengl => .GLSL450, + .opencl => .open_cl, + .vulkan, .opengl => .glsl450, else => unreachable, }, }); @@ -411,7 +409,7 @@ pub fn finalize(self: *Module, a: Allocator) ![]Word { var source = Section{}; defer source.deinit(self.gpa); try self.sections.debug_strings.emit(self.gpa, .OpSource, .{ - .source_language = .Zig, + .source_language = .zig, .version = 0, // We cannot emit these because the Khronos translator does not parse this instruction // correctly. @@ -473,7 +471,7 @@ pub fn addExtension(self: *Module, ext: []const u8) !void { } /// Imports or returns the existing id of an extended instruction set -pub fn importInstructionSet(self: *Module, set: spec.InstructionSet) !IdRef { +pub fn importInstructionSet(self: *Module, set: spec.InstructionSet) !Id { assert(set != .core); const gop = try self.cache.extended_instruction_set.getOrPut(self.gpa, set); @@ -490,7 +488,7 @@ pub fn importInstructionSet(self: *Module, set: spec.InstructionSet) !IdRef { } /// Fetch the result-id of an instruction corresponding to a string. -pub fn resolveString(self: *Module, string: []const u8) !IdRef { +pub fn resolveString(self: *Module, string: []const u8) !Id { if (self.strings.get(string)) |id| { return id; } @@ -506,7 +504,7 @@ pub fn resolveString(self: *Module, string: []const u8) !IdRef { return id; } -pub fn structType(self: *Module, result_id: IdResult, types: []const IdRef, maybe_names: ?[]const []const u8) !void { +pub fn structType(self: *Module, result_id: Id, types: []const Id, maybe_names: ?[]const []const u8) !void { try self.sections.types_globals_constants.emit(self.gpa, .OpTypeStruct, .{ .id_result = result_id, .id_ref = types, @@ -520,7 +518,7 @@ pub fn structType(self: *Module, result_id: IdResult, types: []const IdRef, mayb } } -pub fn boolType(self: *Module) !IdRef { +pub fn boolType(self: *Module) !Id { if (self.cache.bool_type) |id| return id; const result_id = self.allocId(); @@ -531,7 +529,7 @@ pub fn boolType(self: *Module) !IdRef { return result_id; } -pub fn voidType(self: *Module) !IdRef { +pub fn voidType(self: *Module) !Id { if (self.cache.void_type) |id| return id; const result_id = self.allocId(); @@ -543,7 +541,7 @@ pub fn voidType(self: *Module) !IdRef { return result_id; } -pub fn intType(self: *Module, signedness: std.builtin.Signedness, bits: u16) !IdRef { +pub fn intType(self: *Module, signedness: std.builtin.Signedness, bits: u16) !Id { assert(bits > 0); const entry = try self.cache.int_types.getOrPut(self.gpa, .{ .signedness = signedness, .bits = bits }); if (!entry.found_existing) { @@ -566,7 +564,7 @@ pub fn intType(self: *Module, signedness: std.builtin.Signedness, bits: u16) !Id return entry.value_ptr.*; } -pub fn floatType(self: *Module, bits: u16) !IdRef { +pub fn floatType(self: *Module, bits: u16) !Id { assert(bits > 0); const entry = try self.cache.float_types.getOrPut(self.gpa, .{ .bits = bits }); if (!entry.found_existing) { @@ -581,7 +579,7 @@ pub fn floatType(self: *Module, bits: u16) !IdRef { return entry.value_ptr.*; } -pub fn vectorType(self: *Module, len: u32, child_ty_id: IdRef) !IdRef { +pub fn vectorType(self: *Module, len: u32, child_ty_id: Id) !Id { const entry = try self.cache.vector_types.getOrPut(self.gpa, .{ child_ty_id, len }); if (!entry.found_existing) { const result_id = self.allocId(); @@ -595,7 +593,7 @@ pub fn vectorType(self: *Module, len: u32, child_ty_id: IdRef) !IdRef { return entry.value_ptr.*; } -pub fn arrayType(self: *Module, len_id: IdRef, child_ty_id: IdRef) !IdRef { +pub fn arrayType(self: *Module, len_id: Id, child_ty_id: Id) !Id { const entry = try self.cache.array_types.getOrPut(self.gpa, .{ child_ty_id, len_id }); if (!entry.found_existing) { const result_id = self.allocId(); @@ -609,7 +607,7 @@ pub fn arrayType(self: *Module, len_id: IdRef, child_ty_id: IdRef) !IdRef { return entry.value_ptr.*; } -pub fn functionType(self: *Module, return_ty_id: IdRef, param_type_ids: []const IdRef) !IdRef { +pub fn functionType(self: *Module, return_ty_id: Id, param_type_ids: []const Id) !Id { const result_id = self.allocId(); try self.sections.types_globals_constants.emit(self.gpa, .OpTypeFunction, .{ .id_result = result_id, @@ -619,7 +617,7 @@ pub fn functionType(self: *Module, return_ty_id: IdRef, param_type_ids: []const return result_id; } -pub fn constant(self: *Module, result_ty_id: IdRef, value: spec.LiteralContextDependentNumber) !IdRef { +pub fn constant(self: *Module, result_ty_id: Id, value: spec.LiteralContextDependentNumber) !Id { const result_id = self.allocId(); const section = &self.sections.types_globals_constants; try section.emit(self.gpa, .OpConstant, .{ @@ -630,7 +628,7 @@ pub fn constant(self: *Module, result_ty_id: IdRef, value: spec.LiteralContextDe return result_id; } -pub fn constBool(self: *Module, value: bool) !IdRef { +pub fn constBool(self: *Module, value: bool) !Id { if (self.cache.bool_const[@intFromBool(value)]) |b| return b; const result_ty_id = try self.boolType(); @@ -653,7 +651,7 @@ pub fn constBool(self: *Module, value: bool) !IdRef { /// Return a pointer to a builtin variable. `result_ty_id` must be a **pointer** /// with storage class `.Input`. -pub fn builtin(self: *Module, result_ty_id: IdRef, spirv_builtin: spec.BuiltIn) !Decl.Index { +pub fn builtin(self: *Module, result_ty_id: Id, spirv_builtin: spec.BuiltIn) !Decl.Index { const entry = try self.cache.builtins.getOrPut(self.gpa, .{ result_ty_id, spirv_builtin }); if (!entry.found_existing) { const decl_index = try self.allocDecl(.global); @@ -662,15 +660,15 @@ pub fn builtin(self: *Module, result_ty_id: IdRef, spirv_builtin: spec.BuiltIn) try self.sections.types_globals_constants.emit(self.gpa, .OpVariable, .{ .id_result_type = result_ty_id, .id_result = result_id, - .storage_class = .Input, + .storage_class = .input, }); - try self.decorate(result_id, .{ .BuiltIn = .{ .built_in = spirv_builtin } }); + try self.decorate(result_id, .{ .built_in = .{ .built_in = spirv_builtin } }); try self.declareDeclDeps(decl_index, &.{}); } return entry.value_ptr.*; } -pub fn constUndef(self: *Module, ty_id: IdRef) !IdRef { +pub fn constUndef(self: *Module, ty_id: Id) !Id { const result_id = self.allocId(); try self.sections.types_globals_constants.emit(self.gpa, .OpUndef, .{ .id_result_type = ty_id, @@ -679,7 +677,7 @@ pub fn constUndef(self: *Module, ty_id: IdRef) !IdRef { return result_id; } -pub fn constNull(self: *Module, ty_id: IdRef) !IdRef { +pub fn constNull(self: *Module, ty_id: Id) !Id { const result_id = self.allocId(); try self.sections.types_globals_constants.emit(self.gpa, .OpConstantNull, .{ .id_result_type = ty_id, @@ -691,7 +689,7 @@ pub fn constNull(self: *Module, ty_id: IdRef) !IdRef { /// Decorate a result-id. pub fn decorate( self: *Module, - target: IdRef, + target: Id, decoration: spec.Decoration.Extended, ) !void { const entry = try self.cache.decorations.getOrPut(self.gpa, .{ target, decoration }); @@ -707,7 +705,7 @@ pub fn decorate( /// We really don't have to and shouldn't need to cache this. pub fn decorateMember( self: *Module, - structure_type: IdRef, + structure_type: Id, member: u32, decoration: spec.Decoration.Extended, ) !void { @@ -762,20 +760,20 @@ pub fn declareEntryPoint( if (!gop.found_existing) gop.value_ptr.exec_mode = exec_mode; } -pub fn debugName(self: *Module, target: IdResult, name: []const u8) !void { +pub fn debugName(self: *Module, target: Id, name: []const u8) !void { try self.sections.debug_names.emit(self.gpa, .OpName, .{ .target = target, .name = name, }); } -pub fn debugNameFmt(self: *Module, target: IdResult, comptime fmt: []const u8, args: anytype) !void { +pub fn debugNameFmt(self: *Module, target: Id, comptime fmt: []const u8, args: anytype) !void { const name = try std.fmt.allocPrint(self.gpa, fmt, args); defer self.gpa.free(name); try self.debugName(target, name); } -pub fn memberDebugName(self: *Module, target: IdResult, member: u32, name: []const u8) !void { +pub fn memberDebugName(self: *Module, target: Id, member: u32, name: []const u8) !void { try self.sections.debug_names.emit(self.gpa, .OpMemberName, .{ .type = target, .member = member, diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig index 5c2a5fde62..53fbe66764 100644 --- a/src/codegen/spirv/Section.zig +++ b/src/codegen/spirv/Section.zig @@ -79,7 +79,7 @@ pub fn emit( pub fn emitBranch( section: *Section, allocator: Allocator, - target_label: spec.IdRef, + target_label: spec.Id, ) !void { try section.emit(allocator, .OpBranch, .{ .target_label = target_label, @@ -94,8 +94,8 @@ pub fn emitSpecConstantOp( ) !void { const word_count = operandsSize(opcode.Operands(), operands); try section.emitRaw(allocator, .OpSpecConstantOp, 1 + word_count); - section.writeOperand(spec.IdRef, operands.id_result_type); - section.writeOperand(spec.IdRef, operands.id_result); + section.writeOperand(spec.Id, operands.id_result_type); + section.writeOperand(spec.Id, operands.id_result); section.writeOperand(Opcode, opcode); const fields = @typeInfo(opcode.Operands()).@"struct".fields; @@ -134,7 +134,7 @@ fn writeOperands(section: *Section, comptime Operands: type, operands: Operands) pub fn writeOperand(section: *Section, comptime Operand: type, operand: Operand) void { switch (Operand) { - spec.IdResult => section.writeWord(@intFromEnum(operand)), + spec.Id => section.writeWord(@intFromEnum(operand)), spec.LiteralInteger => section.writeWord(operand), @@ -266,7 +266,7 @@ fn operandsSize(comptime Operands: type, operands: Operands) usize { fn operandSize(comptime Operand: type, operand: Operand) usize { return switch (Operand) { - spec.IdResult, + spec.Id, spec.LiteralInteger, spec.LiteralExtInstInteger, => 1, diff --git a/src/codegen/spirv/extinst.zig.grammar.json b/src/codegen/spirv/extinst.zig.grammar.json index 70c290097e..ea8c5f7729 100644 --- a/src/codegen/spirv/extinst.zig.grammar.json +++ b/src/codegen/spirv/extinst.zig.grammar.json @@ -1,13 +1,11 @@ { - "version": 0, - "revision": 0, - "instructions": [ - { - "opname": "InvocationGlobal", - "opcode": 0, - "operands": [ - { "kind": "IdRef", "name": "initializer function" } - ] - } - ] + "version": 0, + "revision": 0, + "instructions": [ + { + "opname": "InvocationGlobal", + "opcode": 0, + "operands": [{ "kind": "IdRef", "name": "initializer function" }] + } + ] } diff --git a/src/codegen/spirv/spec.zig b/src/codegen/spirv/spec.zig index 82ec05ebba..a2b18d4db0 100644 --- a/src/codegen/spirv/spec.zig +++ b/src/codegen/spirv/spec.zig @@ -1,7 +1,6 @@ //! This file is auto-generated by tools/gen_spirv_spec.zig. const std = @import("std"); -const assert = std.debug.assert; pub const Version = packed struct(Word) { padding: u8 = 0, @@ -15,22 +14,17 @@ pub const Version = packed struct(Word) { }; pub const Word = u32; -pub const IdResult = enum(Word) { +pub const Id = enum(Word) { none, _, - pub fn format(self: IdResult, writer: *std.io.Writer) std.io.Writer.Error!void { + pub fn format(self: Id, writer: *std.io.Writer) std.io.Writer.Error!void { switch (self) { .none => try writer.writeAll("(none)"), else => try writer.print("%{d}", .{@intFromEnum(self)}), } } }; -pub const IdResultType = IdResult; -pub const IdRef = IdResult; - -pub const IdMemorySemantics = IdRef; -pub const IdScope = IdRef; pub const LiteralInteger = Word; pub const LiteralFloat = Word; @@ -45,9 +39,9 @@ pub const LiteralContextDependentNumber = union(enum) { }; pub const LiteralExtInstInteger = struct { inst: Word }; pub const LiteralSpecConstantOpInteger = struct { opcode: Opcode }; -pub const PairLiteralIntegerIdRef = struct { value: LiteralInteger, label: IdRef }; -pub const PairIdRefLiteralInteger = struct { target: IdRef, member: LiteralInteger }; -pub const PairIdRefIdRef = [2]IdRef; +pub const PairLiteralIntegerIdRef = struct { value: LiteralInteger, label: Id }; +pub const PairIdRefLiteralInteger = struct { target: Id, member: LiteralInteger }; +pub const PairIdRefIdRef = [2]Id; pub const Quantifier = enum { required, @@ -81,1499 +75,1564 @@ pub const Instruction = struct { }; pub const zig_generator_id: Word = 41; -pub const version = Version{ .major = 1, .minor = 6, .patch = 1 }; +pub const version: Version = .{ .major = 1, .minor = 6, .patch = 4 }; pub const magic_number: Word = 0x07230203; pub const Class = enum { - Miscellaneous, - Debug, - Extension, - ModeSetting, - TypeDeclaration, - ConstantCreation, - Function, - Memory, - Annotation, - Composite, - Image, - Conversion, - Arithmetic, - RelationalAndLogical, - Bit, - Derivative, - Primitive, - Barrier, - Atomic, - ControlFlow, - Group, - Pipe, - DeviceSideEnqueue, - NonUniform, - Reserved, + miscellaneous, + debug, + extension, + mode_setting, + type_declaration, + constant_creation, + function, + memory, + annotation, + composite, + image, + conversion, + arithmetic, + relational_and_logical, + bit, + derivative, + primitive, + barrier, + atomic, + control_flow, + group, + pipe, + device_side_enqueue, + non_uniform, + tensor, + graph, + reserved, }; pub const OperandKind = enum { - Opcode, - ImageOperands, - FPFastMathMode, - SelectionControl, - LoopControl, - FunctionControl, - MemorySemantics, - MemoryAccess, - KernelProfilingInfo, - RayFlags, - FragmentShadingRate, - RawAccessChainOperands, - SourceLanguage, - ExecutionModel, - AddressingModel, - MemoryModel, - ExecutionMode, - StorageClass, - Dim, - SamplerAddressingMode, - SamplerFilterMode, - ImageFormat, - ImageChannelOrder, - ImageChannelDataType, - FPRoundingMode, - FPDenormMode, - QuantizationModes, - FPOperationMode, - OverflowModes, - LinkageType, - AccessQualifier, - HostAccessQualifier, - FunctionParameterAttribute, - Decoration, - BuiltIn, - Scope, - GroupOperation, - KernelEnqueueFlags, - Capability, - RayQueryIntersection, - RayQueryCommittedIntersectionType, - RayQueryCandidateIntersectionType, - PackedVectorFormat, - CooperativeMatrixOperands, - CooperativeMatrixLayout, - CooperativeMatrixUse, - InitializationModeQualifier, - LoadCacheControl, - StoreCacheControl, - NamedMaximumNumberOfRegisters, - IdResultType, - IdResult, - IdMemorySemantics, - IdScope, - IdRef, - LiteralInteger, - LiteralString, - LiteralFloat, - LiteralContextDependentNumber, - LiteralExtInstInteger, - LiteralSpecConstantOpInteger, - PairLiteralIntegerIdRef, - PairIdRefLiteralInteger, - PairIdRefIdRef, - @"OpenCL.DebugInfo.100.DebugInfoFlags", - @"OpenCL.DebugInfo.100.DebugBaseTypeAttributeEncoding", - @"OpenCL.DebugInfo.100.DebugCompositeType", - @"OpenCL.DebugInfo.100.DebugTypeQualifier", - @"OpenCL.DebugInfo.100.DebugOperation", - @"OpenCL.DebugInfo.100.DebugImportedEntity", - @"NonSemantic.Shader.DebugInfo.100.DebugInfoFlags", - @"NonSemantic.Shader.DebugInfo.100.BuildIdentifierFlags", - @"NonSemantic.Shader.DebugInfo.100.DebugBaseTypeAttributeEncoding", - @"NonSemantic.Shader.DebugInfo.100.DebugCompositeType", - @"NonSemantic.Shader.DebugInfo.100.DebugTypeQualifier", - @"NonSemantic.Shader.DebugInfo.100.DebugOperation", - @"NonSemantic.Shader.DebugInfo.100.DebugImportedEntity", - @"NonSemantic.ClspvReflection.6.KernelPropertyFlags", - @"DebugInfo.DebugInfoFlags", - @"DebugInfo.DebugBaseTypeAttributeEncoding", - @"DebugInfo.DebugCompositeType", - @"DebugInfo.DebugTypeQualifier", - @"DebugInfo.DebugOperation", + opcode, + image_operands, + fp_fast_math_mode, + selection_control, + loop_control, + function_control, + memory_semantics, + memory_access, + kernel_profiling_info, + ray_flags, + fragment_shading_rate, + raw_access_chain_operands, + source_language, + execution_model, + addressing_model, + memory_model, + execution_mode, + storage_class, + dim, + sampler_addressing_mode, + sampler_filter_mode, + image_format, + image_channel_order, + image_channel_data_type, + fp_rounding_mode, + fp_denorm_mode, + quantization_modes, + fp_operation_mode, + overflow_modes, + linkage_type, + access_qualifier, + host_access_qualifier, + function_parameter_attribute, + decoration, + built_in, + scope, + group_operation, + kernel_enqueue_flags, + capability, + ray_query_intersection, + ray_query_committed_intersection_type, + ray_query_candidate_intersection_type, + packed_vector_format, + cooperative_matrix_operands, + cooperative_matrix_layout, + cooperative_matrix_use, + cooperative_matrix_reduce, + tensor_clamp_mode, + tensor_addressing_operands, + initialization_mode_qualifier, + load_cache_control, + store_cache_control, + named_maximum_number_of_registers, + matrix_multiply_accumulate_operands, + fp_encoding, + cooperative_vector_matrix_layout, + component_type, + id_result_type, + id_result, + id_memory_semantics, + id_scope, + id_ref, + literal_integer, + literal_string, + literal_float, + literal_context_dependent_number, + literal_ext_inst_integer, + literal_spec_constant_op_integer, + pair_literal_integer_id_ref, + pair_id_ref_literal_integer, + pair_id_ref_id_ref, + tensor_operands, + debug_info_debug_info_flags, + debug_info_debug_base_type_attribute_encoding, + debug_info_debug_composite_type, + debug_info_debug_type_qualifier, + debug_info_debug_operation, + open_cl_debug_info_100_debug_info_flags, + open_cl_debug_info_100_debug_base_type_attribute_encoding, + open_cl_debug_info_100_debug_composite_type, + open_cl_debug_info_100_debug_type_qualifier, + open_cl_debug_info_100_debug_operation, + open_cl_debug_info_100_debug_imported_entity, + non_semantic_clspv_reflection_6_kernel_property_flags, + non_semantic_shader_debug_info_100_debug_info_flags, + non_semantic_shader_debug_info_100_build_identifier_flags, + non_semantic_shader_debug_info_100_debug_base_type_attribute_encoding, + non_semantic_shader_debug_info_100_debug_composite_type, + non_semantic_shader_debug_info_100_debug_type_qualifier, + non_semantic_shader_debug_info_100_debug_operation, + non_semantic_shader_debug_info_100_debug_imported_entity, pub fn category(self: OperandKind) OperandCategory { return switch (self) { - .Opcode => .literal, - .ImageOperands => .bit_enum, - .FPFastMathMode => .bit_enum, - .SelectionControl => .bit_enum, - .LoopControl => .bit_enum, - .FunctionControl => .bit_enum, - .MemorySemantics => .bit_enum, - .MemoryAccess => .bit_enum, - .KernelProfilingInfo => .bit_enum, - .RayFlags => .bit_enum, - .FragmentShadingRate => .bit_enum, - .RawAccessChainOperands => .bit_enum, - .SourceLanguage => .value_enum, - .ExecutionModel => .value_enum, - .AddressingModel => .value_enum, - .MemoryModel => .value_enum, - .ExecutionMode => .value_enum, - .StorageClass => .value_enum, - .Dim => .value_enum, - .SamplerAddressingMode => .value_enum, - .SamplerFilterMode => .value_enum, - .ImageFormat => .value_enum, - .ImageChannelOrder => .value_enum, - .ImageChannelDataType => .value_enum, - .FPRoundingMode => .value_enum, - .FPDenormMode => .value_enum, - .QuantizationModes => .value_enum, - .FPOperationMode => .value_enum, - .OverflowModes => .value_enum, - .LinkageType => .value_enum, - .AccessQualifier => .value_enum, - .HostAccessQualifier => .value_enum, - .FunctionParameterAttribute => .value_enum, - .Decoration => .value_enum, - .BuiltIn => .value_enum, - .Scope => .value_enum, - .GroupOperation => .value_enum, - .KernelEnqueueFlags => .value_enum, - .Capability => .value_enum, - .RayQueryIntersection => .value_enum, - .RayQueryCommittedIntersectionType => .value_enum, - .RayQueryCandidateIntersectionType => .value_enum, - .PackedVectorFormat => .value_enum, - .CooperativeMatrixOperands => .bit_enum, - .CooperativeMatrixLayout => .value_enum, - .CooperativeMatrixUse => .value_enum, - .InitializationModeQualifier => .value_enum, - .LoadCacheControl => .value_enum, - .StoreCacheControl => .value_enum, - .NamedMaximumNumberOfRegisters => .value_enum, - .IdResultType => .id, - .IdResult => .id, - .IdMemorySemantics => .id, - .IdScope => .id, - .IdRef => .id, - .LiteralInteger => .literal, - .LiteralString => .literal, - .LiteralFloat => .literal, - .LiteralContextDependentNumber => .literal, - .LiteralExtInstInteger => .literal, - .LiteralSpecConstantOpInteger => .literal, - .PairLiteralIntegerIdRef => .composite, - .PairIdRefLiteralInteger => .composite, - .PairIdRefIdRef => .composite, - .@"OpenCL.DebugInfo.100.DebugInfoFlags" => .bit_enum, - .@"OpenCL.DebugInfo.100.DebugBaseTypeAttributeEncoding" => .value_enum, - .@"OpenCL.DebugInfo.100.DebugCompositeType" => .value_enum, - .@"OpenCL.DebugInfo.100.DebugTypeQualifier" => .value_enum, - .@"OpenCL.DebugInfo.100.DebugOperation" => .value_enum, - .@"OpenCL.DebugInfo.100.DebugImportedEntity" => .value_enum, - .@"NonSemantic.Shader.DebugInfo.100.DebugInfoFlags" => .bit_enum, - .@"NonSemantic.Shader.DebugInfo.100.BuildIdentifierFlags" => .bit_enum, - .@"NonSemantic.Shader.DebugInfo.100.DebugBaseTypeAttributeEncoding" => .value_enum, - .@"NonSemantic.Shader.DebugInfo.100.DebugCompositeType" => .value_enum, - .@"NonSemantic.Shader.DebugInfo.100.DebugTypeQualifier" => .value_enum, - .@"NonSemantic.Shader.DebugInfo.100.DebugOperation" => .value_enum, - .@"NonSemantic.Shader.DebugInfo.100.DebugImportedEntity" => .value_enum, - .@"NonSemantic.ClspvReflection.6.KernelPropertyFlags" => .bit_enum, - .@"DebugInfo.DebugInfoFlags" => .bit_enum, - .@"DebugInfo.DebugBaseTypeAttributeEncoding" => .value_enum, - .@"DebugInfo.DebugCompositeType" => .value_enum, - .@"DebugInfo.DebugTypeQualifier" => .value_enum, - .@"DebugInfo.DebugOperation" => .value_enum, + .opcode => .literal, + .image_operands => .bit_enum, + .fp_fast_math_mode => .bit_enum, + .selection_control => .bit_enum, + .loop_control => .bit_enum, + .function_control => .bit_enum, + .memory_semantics => .bit_enum, + .memory_access => .bit_enum, + .kernel_profiling_info => .bit_enum, + .ray_flags => .bit_enum, + .fragment_shading_rate => .bit_enum, + .raw_access_chain_operands => .bit_enum, + .source_language => .value_enum, + .execution_model => .value_enum, + .addressing_model => .value_enum, + .memory_model => .value_enum, + .execution_mode => .value_enum, + .storage_class => .value_enum, + .dim => .value_enum, + .sampler_addressing_mode => .value_enum, + .sampler_filter_mode => .value_enum, + .image_format => .value_enum, + .image_channel_order => .value_enum, + .image_channel_data_type => .value_enum, + .fp_rounding_mode => .value_enum, + .fp_denorm_mode => .value_enum, + .quantization_modes => .value_enum, + .fp_operation_mode => .value_enum, + .overflow_modes => .value_enum, + .linkage_type => .value_enum, + .access_qualifier => .value_enum, + .host_access_qualifier => .value_enum, + .function_parameter_attribute => .value_enum, + .decoration => .value_enum, + .built_in => .value_enum, + .scope => .value_enum, + .group_operation => .value_enum, + .kernel_enqueue_flags => .value_enum, + .capability => .value_enum, + .ray_query_intersection => .value_enum, + .ray_query_committed_intersection_type => .value_enum, + .ray_query_candidate_intersection_type => .value_enum, + .packed_vector_format => .value_enum, + .cooperative_matrix_operands => .bit_enum, + .cooperative_matrix_layout => .value_enum, + .cooperative_matrix_use => .value_enum, + .cooperative_matrix_reduce => .bit_enum, + .tensor_clamp_mode => .value_enum, + .tensor_addressing_operands => .bit_enum, + .initialization_mode_qualifier => .value_enum, + .load_cache_control => .value_enum, + .store_cache_control => .value_enum, + .named_maximum_number_of_registers => .value_enum, + .matrix_multiply_accumulate_operands => .bit_enum, + .fp_encoding => .value_enum, + .cooperative_vector_matrix_layout => .value_enum, + .component_type => .value_enum, + .id_result_type => .id, + .id_result => .id, + .id_memory_semantics => .id, + .id_scope => .id, + .id_ref => .id, + .literal_integer => .literal, + .literal_string => .literal, + .literal_float => .literal, + .literal_context_dependent_number => .literal, + .literal_ext_inst_integer => .literal, + .literal_spec_constant_op_integer => .literal, + .pair_literal_integer_id_ref => .composite, + .pair_id_ref_literal_integer => .composite, + .pair_id_ref_id_ref => .composite, + .tensor_operands => .bit_enum, + .debug_info_debug_info_flags => .bit_enum, + .debug_info_debug_base_type_attribute_encoding => .value_enum, + .debug_info_debug_composite_type => .value_enum, + .debug_info_debug_type_qualifier => .value_enum, + .debug_info_debug_operation => .value_enum, + .open_cl_debug_info_100_debug_info_flags => .bit_enum, + .open_cl_debug_info_100_debug_base_type_attribute_encoding => .value_enum, + .open_cl_debug_info_100_debug_composite_type => .value_enum, + .open_cl_debug_info_100_debug_type_qualifier => .value_enum, + .open_cl_debug_info_100_debug_operation => .value_enum, + .open_cl_debug_info_100_debug_imported_entity => .value_enum, + .non_semantic_clspv_reflection_6_kernel_property_flags => .bit_enum, + .non_semantic_shader_debug_info_100_debug_info_flags => .bit_enum, + .non_semantic_shader_debug_info_100_build_identifier_flags => .bit_enum, + .non_semantic_shader_debug_info_100_debug_base_type_attribute_encoding => .value_enum, + .non_semantic_shader_debug_info_100_debug_composite_type => .value_enum, + .non_semantic_shader_debug_info_100_debug_type_qualifier => .value_enum, + .non_semantic_shader_debug_info_100_debug_operation => .value_enum, + .non_semantic_shader_debug_info_100_debug_imported_entity => .value_enum, }; } pub fn enumerants(self: OperandKind) []const Enumerant { return switch (self) { - .Opcode => unreachable, - .ImageOperands => &[_]Enumerant{ - .{ .name = "Bias", .value = 0x0001, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "Lod", .value = 0x0002, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "Grad", .value = 0x0004, .parameters = &[_]OperandKind{ .IdRef, .IdRef } }, - .{ .name = "ConstOffset", .value = 0x0008, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "Offset", .value = 0x0010, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "ConstOffsets", .value = 0x0020, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "Sample", .value = 0x0040, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "MinLod", .value = 0x0080, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "MakeTexelAvailable", .value = 0x0100, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "MakeTexelAvailableKHR", .value = 0x0100, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "MakeTexelVisible", .value = 0x0200, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "MakeTexelVisibleKHR", .value = 0x0200, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "NonPrivateTexel", .value = 0x0400, .parameters = &[_]OperandKind{} }, - .{ .name = "NonPrivateTexelKHR", .value = 0x0400, .parameters = &[_]OperandKind{} }, - .{ .name = "VolatileTexel", .value = 0x0800, .parameters = &[_]OperandKind{} }, - .{ .name = "VolatileTexelKHR", .value = 0x0800, .parameters = &[_]OperandKind{} }, - .{ .name = "SignExtend", .value = 0x1000, .parameters = &[_]OperandKind{} }, - .{ .name = "ZeroExtend", .value = 0x2000, .parameters = &[_]OperandKind{} }, - .{ .name = "Nontemporal", .value = 0x4000, .parameters = &[_]OperandKind{} }, - .{ .name = "Offsets", .value = 0x10000, .parameters = &[_]OperandKind{.IdRef} }, - }, - .FPFastMathMode => &[_]Enumerant{ - .{ .name = "NotNaN", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "NotInf", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "NSZ", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "AllowRecip", .value = 0x0008, .parameters = &[_]OperandKind{} }, - .{ .name = "Fast", .value = 0x0010, .parameters = &[_]OperandKind{} }, - .{ .name = "AllowContract", .value = 0x10000, .parameters = &[_]OperandKind{} }, - .{ .name = "AllowContractFastINTEL", .value = 0x10000, .parameters = &[_]OperandKind{} }, - .{ .name = "AllowReassoc", .value = 0x20000, .parameters = &[_]OperandKind{} }, - .{ .name = "AllowReassocINTEL", .value = 0x20000, .parameters = &[_]OperandKind{} }, - .{ .name = "AllowTransform", .value = 0x40000, .parameters = &[_]OperandKind{} }, - }, - .SelectionControl => &[_]Enumerant{ - .{ .name = "Flatten", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "DontFlatten", .value = 0x0002, .parameters = &[_]OperandKind{} }, - }, - .LoopControl => &[_]Enumerant{ - .{ .name = "Unroll", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "DontUnroll", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "DependencyInfinite", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "DependencyLength", .value = 0x0008, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MinIterations", .value = 0x0010, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxIterations", .value = 0x0020, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "IterationMultiple", .value = 0x0040, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "PeelCount", .value = 0x0080, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "PartialCount", .value = 0x0100, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "InitiationIntervalINTEL", .value = 0x10000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxConcurrencyINTEL", .value = 0x20000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "DependencyArrayINTEL", .value = 0x40000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "PipelineEnableINTEL", .value = 0x80000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "LoopCoalesceINTEL", .value = 0x100000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxInterleavingINTEL", .value = 0x200000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SpeculatedIterationsINTEL", .value = 0x400000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "NoFusionINTEL", .value = 0x800000, .parameters = &[_]OperandKind{} }, - .{ .name = "LoopCountINTEL", .value = 0x1000000, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxReinvocationDelayINTEL", .value = 0x2000000, .parameters = &[_]OperandKind{.LiteralInteger} }, - }, - .FunctionControl => &[_]Enumerant{ - .{ .name = "Inline", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "DontInline", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "Pure", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "Const", .value = 0x0008, .parameters = &[_]OperandKind{} }, - .{ .name = "OptNoneINTEL", .value = 0x10000, .parameters = &[_]OperandKind{} }, - }, - .MemorySemantics => &[_]Enumerant{ - .{ .name = "Relaxed", .value = 0x0000, .parameters = &[_]OperandKind{} }, - .{ .name = "Acquire", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "Release", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "AcquireRelease", .value = 0x0008, .parameters = &[_]OperandKind{} }, - .{ .name = "SequentiallyConsistent", .value = 0x0010, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformMemory", .value = 0x0040, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupMemory", .value = 0x0080, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkgroupMemory", .value = 0x0100, .parameters = &[_]OperandKind{} }, - .{ .name = "CrossWorkgroupMemory", .value = 0x0200, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicCounterMemory", .value = 0x0400, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageMemory", .value = 0x0800, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputMemory", .value = 0x1000, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputMemoryKHR", .value = 0x1000, .parameters = &[_]OperandKind{} }, - .{ .name = "MakeAvailable", .value = 0x2000, .parameters = &[_]OperandKind{} }, - .{ .name = "MakeAvailableKHR", .value = 0x2000, .parameters = &[_]OperandKind{} }, - .{ .name = "MakeVisible", .value = 0x4000, .parameters = &[_]OperandKind{} }, - .{ .name = "MakeVisibleKHR", .value = 0x4000, .parameters = &[_]OperandKind{} }, - .{ .name = "Volatile", .value = 0x8000, .parameters = &[_]OperandKind{} }, - }, - .MemoryAccess => &[_]Enumerant{ - .{ .name = "Volatile", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "Aligned", .value = 0x0002, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Nontemporal", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "MakePointerAvailable", .value = 0x0008, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "MakePointerAvailableKHR", .value = 0x0008, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "MakePointerVisible", .value = 0x0010, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "MakePointerVisibleKHR", .value = 0x0010, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "NonPrivatePointer", .value = 0x0020, .parameters = &[_]OperandKind{} }, - .{ .name = "NonPrivatePointerKHR", .value = 0x0020, .parameters = &[_]OperandKind{} }, - .{ .name = "AliasScopeINTELMask", .value = 0x10000, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "NoAliasINTELMask", .value = 0x20000, .parameters = &[_]OperandKind{.IdRef} }, - }, - .KernelProfilingInfo => &[_]Enumerant{ - .{ .name = "CmdExecTime", .value = 0x0001, .parameters = &[_]OperandKind{} }, - }, - .RayFlags => &[_]Enumerant{ - .{ .name = "NoneKHR", .value = 0x0000, .parameters = &[_]OperandKind{} }, - .{ .name = "OpaqueKHR", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "NoOpaqueKHR", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "TerminateOnFirstHitKHR", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "SkipClosestHitShaderKHR", .value = 0x0008, .parameters = &[_]OperandKind{} }, - .{ .name = "CullBackFacingTrianglesKHR", .value = 0x0010, .parameters = &[_]OperandKind{} }, - .{ .name = "CullFrontFacingTrianglesKHR", .value = 0x0020, .parameters = &[_]OperandKind{} }, - .{ .name = "CullOpaqueKHR", .value = 0x0040, .parameters = &[_]OperandKind{} }, - .{ .name = "CullNoOpaqueKHR", .value = 0x0080, .parameters = &[_]OperandKind{} }, - .{ .name = "SkipTrianglesKHR", .value = 0x0100, .parameters = &[_]OperandKind{} }, - .{ .name = "SkipAABBsKHR", .value = 0x0200, .parameters = &[_]OperandKind{} }, - .{ .name = "ForceOpacityMicromap2StateEXT", .value = 0x0400, .parameters = &[_]OperandKind{} }, - }, - .FragmentShadingRate => &[_]Enumerant{ - .{ .name = "Vertical2Pixels", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "Vertical4Pixels", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "Horizontal2Pixels", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "Horizontal4Pixels", .value = 0x0008, .parameters = &[_]OperandKind{} }, - }, - .RawAccessChainOperands => &[_]Enumerant{ - .{ .name = "RobustnessPerComponentNV", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "RobustnessPerElementNV", .value = 0x0002, .parameters = &[_]OperandKind{} }, - }, - .SourceLanguage => &[_]Enumerant{ - .{ .name = "Unknown", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ESSL", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "GLSL", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "OpenCL_C", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "OpenCL_CPP", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "HLSL", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "CPP_for_OpenCL", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "SYCL", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "HERO_C", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "NZSL", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "WGSL", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "Slang", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "Zig", .value = 12, .parameters = &[_]OperandKind{} }, - }, - .ExecutionModel => &[_]Enumerant{ - .{ .name = "Vertex", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "TessellationControl", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "TessellationEvaluation", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Geometry", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Fragment", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "GLCompute", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Kernel", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "TaskNV", .value = 5267, .parameters = &[_]OperandKind{} }, - .{ .name = "MeshNV", .value = 5268, .parameters = &[_]OperandKind{} }, - .{ .name = "RayGenerationNV", .value = 5313, .parameters = &[_]OperandKind{} }, - .{ .name = "RayGenerationKHR", .value = 5313, .parameters = &[_]OperandKind{} }, - .{ .name = "IntersectionNV", .value = 5314, .parameters = &[_]OperandKind{} }, - .{ .name = "IntersectionKHR", .value = 5314, .parameters = &[_]OperandKind{} }, - .{ .name = "AnyHitNV", .value = 5315, .parameters = &[_]OperandKind{} }, - .{ .name = "AnyHitKHR", .value = 5315, .parameters = &[_]OperandKind{} }, - .{ .name = "ClosestHitNV", .value = 5316, .parameters = &[_]OperandKind{} }, - .{ .name = "ClosestHitKHR", .value = 5316, .parameters = &[_]OperandKind{} }, - .{ .name = "MissNV", .value = 5317, .parameters = &[_]OperandKind{} }, - .{ .name = "MissKHR", .value = 5317, .parameters = &[_]OperandKind{} }, - .{ .name = "CallableNV", .value = 5318, .parameters = &[_]OperandKind{} }, - .{ .name = "CallableKHR", .value = 5318, .parameters = &[_]OperandKind{} }, - .{ .name = "TaskEXT", .value = 5364, .parameters = &[_]OperandKind{} }, - .{ .name = "MeshEXT", .value = 5365, .parameters = &[_]OperandKind{} }, - }, - .AddressingModel => &[_]Enumerant{ - .{ .name = "Logical", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Physical32", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Physical64", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "PhysicalStorageBuffer64", .value = 5348, .parameters = &[_]OperandKind{} }, - .{ .name = "PhysicalStorageBuffer64EXT", .value = 5348, .parameters = &[_]OperandKind{} }, - }, - .MemoryModel => &[_]Enumerant{ - .{ .name = "Simple", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "GLSL450", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "OpenCL", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Vulkan", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "VulkanKHR", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .ExecutionMode => &[_]Enumerant{ - .{ .name = "Invocations", .value = 0, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SpacingEqual", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "SpacingFractionalEven", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "SpacingFractionalOdd", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "VertexOrderCw", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "VertexOrderCcw", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "PixelCenterInteger", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "OriginUpperLeft", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "OriginLowerLeft", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "EarlyFragmentTests", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "PointMode", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "Xfb", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "DepthReplacing", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "DepthGreater", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "DepthLess", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "DepthUnchanged", .value = 16, .parameters = &[_]OperandKind{} }, - .{ .name = "LocalSize", .value = 17, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger, .LiteralInteger } }, - .{ .name = "LocalSizeHint", .value = 18, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger, .LiteralInteger } }, - .{ .name = "InputPoints", .value = 19, .parameters = &[_]OperandKind{} }, - .{ .name = "InputLines", .value = 20, .parameters = &[_]OperandKind{} }, - .{ .name = "InputLinesAdjacency", .value = 21, .parameters = &[_]OperandKind{} }, - .{ .name = "Triangles", .value = 22, .parameters = &[_]OperandKind{} }, - .{ .name = "InputTrianglesAdjacency", .value = 23, .parameters = &[_]OperandKind{} }, - .{ .name = "Quads", .value = 24, .parameters = &[_]OperandKind{} }, - .{ .name = "Isolines", .value = 25, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputVertices", .value = 26, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "OutputPoints", .value = 27, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputLineStrip", .value = 28, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputTriangleStrip", .value = 29, .parameters = &[_]OperandKind{} }, - .{ .name = "VecTypeHint", .value = 30, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "ContractionOff", .value = 31, .parameters = &[_]OperandKind{} }, - .{ .name = "Initializer", .value = 33, .parameters = &[_]OperandKind{} }, - .{ .name = "Finalizer", .value = 34, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupSize", .value = 35, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SubgroupsPerWorkgroup", .value = 36, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SubgroupsPerWorkgroupId", .value = 37, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "LocalSizeId", .value = 38, .parameters = &[_]OperandKind{ .IdRef, .IdRef, .IdRef } }, - .{ .name = "LocalSizeHintId", .value = 39, .parameters = &[_]OperandKind{ .IdRef, .IdRef, .IdRef } }, - .{ .name = "NonCoherentColorAttachmentReadEXT", .value = 4169, .parameters = &[_]OperandKind{} }, - .{ .name = "NonCoherentDepthAttachmentReadEXT", .value = 4170, .parameters = &[_]OperandKind{} }, - .{ .name = "NonCoherentStencilAttachmentReadEXT", .value = 4171, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupUniformControlFlowKHR", .value = 4421, .parameters = &[_]OperandKind{} }, - .{ .name = "PostDepthCoverage", .value = 4446, .parameters = &[_]OperandKind{} }, - .{ .name = "DenormPreserve", .value = 4459, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "DenormFlushToZero", .value = 4460, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SignedZeroInfNanPreserve", .value = 4461, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "RoundingModeRTE", .value = 4462, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "RoundingModeRTZ", .value = 4463, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "EarlyAndLateFragmentTestsAMD", .value = 5017, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilRefReplacingEXT", .value = 5027, .parameters = &[_]OperandKind{} }, - .{ .name = "CoalescingAMDX", .value = 5069, .parameters = &[_]OperandKind{} }, - .{ .name = "MaxNodeRecursionAMDX", .value = 5071, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "StaticNumWorkgroupsAMDX", .value = 5072, .parameters = &[_]OperandKind{ .IdRef, .IdRef, .IdRef } }, - .{ .name = "ShaderIndexAMDX", .value = 5073, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "MaxNumWorkgroupsAMDX", .value = 5077, .parameters = &[_]OperandKind{ .IdRef, .IdRef, .IdRef } }, - .{ .name = "StencilRefUnchangedFrontAMD", .value = 5079, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilRefGreaterFrontAMD", .value = 5080, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilRefLessFrontAMD", .value = 5081, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilRefUnchangedBackAMD", .value = 5082, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilRefGreaterBackAMD", .value = 5083, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilRefLessBackAMD", .value = 5084, .parameters = &[_]OperandKind{} }, - .{ .name = "QuadDerivativesKHR", .value = 5088, .parameters = &[_]OperandKind{} }, - .{ .name = "RequireFullQuadsKHR", .value = 5089, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputLinesNV", .value = 5269, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputLinesEXT", .value = 5269, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputPrimitivesNV", .value = 5270, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "OutputPrimitivesEXT", .value = 5270, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "DerivativeGroupQuadsNV", .value = 5289, .parameters = &[_]OperandKind{} }, - .{ .name = "DerivativeGroupLinearNV", .value = 5290, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputTrianglesNV", .value = 5298, .parameters = &[_]OperandKind{} }, - .{ .name = "OutputTrianglesEXT", .value = 5298, .parameters = &[_]OperandKind{} }, - .{ .name = "PixelInterlockOrderedEXT", .value = 5366, .parameters = &[_]OperandKind{} }, - .{ .name = "PixelInterlockUnorderedEXT", .value = 5367, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleInterlockOrderedEXT", .value = 5368, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleInterlockUnorderedEXT", .value = 5369, .parameters = &[_]OperandKind{} }, - .{ .name = "ShadingRateInterlockOrderedEXT", .value = 5370, .parameters = &[_]OperandKind{} }, - .{ .name = "ShadingRateInterlockUnorderedEXT", .value = 5371, .parameters = &[_]OperandKind{} }, - .{ .name = "SharedLocalMemorySizeINTEL", .value = 5618, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "RoundingModeRTPINTEL", .value = 5620, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "RoundingModeRTNINTEL", .value = 5621, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "FloatingPointModeALTINTEL", .value = 5622, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "FloatingPointModeIEEEINTEL", .value = 5623, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxWorkgroupSizeINTEL", .value = 5893, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger, .LiteralInteger } }, - .{ .name = "MaxWorkDimINTEL", .value = 5894, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "NoGlobalOffsetINTEL", .value = 5895, .parameters = &[_]OperandKind{} }, - .{ .name = "NumSIMDWorkitemsINTEL", .value = 5896, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SchedulerTargetFmaxMhzINTEL", .value = 5903, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaximallyReconvergesKHR", .value = 6023, .parameters = &[_]OperandKind{} }, - .{ .name = "FPFastMathDefault", .value = 6028, .parameters = &[_]OperandKind{ .IdRef, .IdRef } }, - .{ .name = "StreamingInterfaceINTEL", .value = 6154, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "RegisterMapInterfaceINTEL", .value = 6160, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "NamedBarrierCountINTEL", .value = 6417, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaximumRegistersINTEL", .value = 6461, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaximumRegistersIdINTEL", .value = 6462, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "NamedMaximumRegistersINTEL", .value = 6463, .parameters = &[_]OperandKind{.NamedMaximumNumberOfRegisters} }, - }, - .StorageClass => &[_]Enumerant{ - .{ .name = "UniformConstant", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Input", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Uniform", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Output", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Workgroup", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "CrossWorkgroup", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Private", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "Function", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "Generic", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "PushConstant", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicCounter", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "Image", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageBuffer", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "TileImageEXT", .value = 4172, .parameters = &[_]OperandKind{} }, - .{ .name = "NodePayloadAMDX", .value = 5068, .parameters = &[_]OperandKind{} }, - .{ .name = "NodeOutputPayloadAMDX", .value = 5076, .parameters = &[_]OperandKind{} }, - .{ .name = "CallableDataNV", .value = 5328, .parameters = &[_]OperandKind{} }, - .{ .name = "CallableDataKHR", .value = 5328, .parameters = &[_]OperandKind{} }, - .{ .name = "IncomingCallableDataNV", .value = 5329, .parameters = &[_]OperandKind{} }, - .{ .name = "IncomingCallableDataKHR", .value = 5329, .parameters = &[_]OperandKind{} }, - .{ .name = "RayPayloadNV", .value = 5338, .parameters = &[_]OperandKind{} }, - .{ .name = "RayPayloadKHR", .value = 5338, .parameters = &[_]OperandKind{} }, - .{ .name = "HitAttributeNV", .value = 5339, .parameters = &[_]OperandKind{} }, - .{ .name = "HitAttributeKHR", .value = 5339, .parameters = &[_]OperandKind{} }, - .{ .name = "IncomingRayPayloadNV", .value = 5342, .parameters = &[_]OperandKind{} }, - .{ .name = "IncomingRayPayloadKHR", .value = 5342, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderRecordBufferNV", .value = 5343, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderRecordBufferKHR", .value = 5343, .parameters = &[_]OperandKind{} }, - .{ .name = "PhysicalStorageBuffer", .value = 5349, .parameters = &[_]OperandKind{} }, - .{ .name = "PhysicalStorageBufferEXT", .value = 5349, .parameters = &[_]OperandKind{} }, - .{ .name = "HitObjectAttributeNV", .value = 5385, .parameters = &[_]OperandKind{} }, - .{ .name = "TaskPayloadWorkgroupEXT", .value = 5402, .parameters = &[_]OperandKind{} }, - .{ .name = "CodeSectionINTEL", .value = 5605, .parameters = &[_]OperandKind{} }, - .{ .name = "DeviceOnlyINTEL", .value = 5936, .parameters = &[_]OperandKind{} }, - .{ .name = "HostOnlyINTEL", .value = 5937, .parameters = &[_]OperandKind{} }, - }, - .Dim => &[_]Enumerant{ - .{ .name = "1D", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "2D", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "3D", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Cube", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Rect", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "Buffer", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "SubpassData", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "TileImageDataEXT", .value = 4173, .parameters = &[_]OperandKind{} }, - }, - .SamplerAddressingMode => &[_]Enumerant{ - .{ .name = "None", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ClampToEdge", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Clamp", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Repeat", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "RepeatMirrored", .value = 4, .parameters = &[_]OperandKind{} }, - }, - .SamplerFilterMode => &[_]Enumerant{ - .{ .name = "Nearest", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Linear", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .ImageFormat => &[_]Enumerant{ - .{ .name = "Unknown", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba32f", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba16f", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "R32f", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba8", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba8Snorm", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg32f", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg16f", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "R11fG11fB10f", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "R16f", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba16", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgb10A2", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg16", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg8", .value = 13, .parameters = &[_]OperandKind{} }, - .{ .name = "R16", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "R8", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba16Snorm", .value = 16, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg16Snorm", .value = 17, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg8Snorm", .value = 18, .parameters = &[_]OperandKind{} }, - .{ .name = "R16Snorm", .value = 19, .parameters = &[_]OperandKind{} }, - .{ .name = "R8Snorm", .value = 20, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba32i", .value = 21, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba16i", .value = 22, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba8i", .value = 23, .parameters = &[_]OperandKind{} }, - .{ .name = "R32i", .value = 24, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg32i", .value = 25, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg16i", .value = 26, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg8i", .value = 27, .parameters = &[_]OperandKind{} }, - .{ .name = "R16i", .value = 28, .parameters = &[_]OperandKind{} }, - .{ .name = "R8i", .value = 29, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba32ui", .value = 30, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba16ui", .value = 31, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgba8ui", .value = 32, .parameters = &[_]OperandKind{} }, - .{ .name = "R32ui", .value = 33, .parameters = &[_]OperandKind{} }, - .{ .name = "Rgb10a2ui", .value = 34, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg32ui", .value = 35, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg16ui", .value = 36, .parameters = &[_]OperandKind{} }, - .{ .name = "Rg8ui", .value = 37, .parameters = &[_]OperandKind{} }, - .{ .name = "R16ui", .value = 38, .parameters = &[_]OperandKind{} }, - .{ .name = "R8ui", .value = 39, .parameters = &[_]OperandKind{} }, - .{ .name = "R64ui", .value = 40, .parameters = &[_]OperandKind{} }, - .{ .name = "R64i", .value = 41, .parameters = &[_]OperandKind{} }, - }, - .ImageChannelOrder => &[_]Enumerant{ - .{ .name = "R", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "A", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RG", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "RA", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "RGB", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "RGBA", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "BGRA", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "ARGB", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "Intensity", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "Luminance", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "Rx", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "RGx", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "RGBx", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "Depth", .value = 13, .parameters = &[_]OperandKind{} }, - .{ .name = "DepthStencil", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "sRGB", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "sRGBx", .value = 16, .parameters = &[_]OperandKind{} }, - .{ .name = "sRGBA", .value = 17, .parameters = &[_]OperandKind{} }, - .{ .name = "sBGRA", .value = 18, .parameters = &[_]OperandKind{} }, - .{ .name = "ABGR", .value = 19, .parameters = &[_]OperandKind{} }, - }, - .ImageChannelDataType => &[_]Enumerant{ - .{ .name = "SnormInt8", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "SnormInt16", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormInt8", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormInt16", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormShort565", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormShort555", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormInt101010", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedInt8", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedInt16", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedInt32", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedInt8", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedInt16", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedInt32", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "HalfFloat", .value = 13, .parameters = &[_]OperandKind{} }, - .{ .name = "Float", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormInt24", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "UnormInt101010_2", .value = 16, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedIntRaw10EXT", .value = 19, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedIntRaw12EXT", .value = 20, .parameters = &[_]OperandKind{} }, - }, - .FPRoundingMode => &[_]Enumerant{ - .{ .name = "RTE", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "RTZ", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RTP", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "RTN", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .FPDenormMode => &[_]Enumerant{ - .{ .name = "Preserve", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "FlushToZero", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .QuantizationModes => &[_]Enumerant{ - .{ .name = "TRN", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "TRN_ZERO", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RND", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "RND_ZERO", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "RND_INF", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "RND_MIN_INF", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "RND_CONV", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "RND_CONV_ODD", .value = 7, .parameters = &[_]OperandKind{} }, - }, - .FPOperationMode => &[_]Enumerant{ - .{ .name = "IEEE", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ALT", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .OverflowModes => &[_]Enumerant{ - .{ .name = "WRAP", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "SAT", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "SAT_ZERO", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "SAT_SYM", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .LinkageType => &[_]Enumerant{ - .{ .name = "Export", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Import", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "LinkOnceODR", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .AccessQualifier => &[_]Enumerant{ - .{ .name = "ReadOnly", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "WriteOnly", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "ReadWrite", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .HostAccessQualifier => &[_]Enumerant{ - .{ .name = "NoneINTEL", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ReadINTEL", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "WriteINTEL", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "ReadWriteINTEL", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .FunctionParameterAttribute => &[_]Enumerant{ - .{ .name = "Zext", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Sext", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "ByVal", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Sret", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "NoAlias", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "NoCapture", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "NoWrite", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "NoReadWrite", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "RuntimeAlignedINTEL", .value = 5940, .parameters = &[_]OperandKind{} }, - }, - .Decoration => &[_]Enumerant{ - .{ .name = "RelaxedPrecision", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "SpecId", .value = 1, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Block", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "BufferBlock", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "RowMajor", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "ColMajor", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "ArrayStride", .value = 6, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MatrixStride", .value = 7, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "GLSLShared", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "GLSLPacked", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "CPacked", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "BuiltIn", .value = 11, .parameters = &[_]OperandKind{.BuiltIn} }, - .{ .name = "NoPerspective", .value = 13, .parameters = &[_]OperandKind{} }, - .{ .name = "Flat", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "Patch", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "Centroid", .value = 16, .parameters = &[_]OperandKind{} }, - .{ .name = "Sample", .value = 17, .parameters = &[_]OperandKind{} }, - .{ .name = "Invariant", .value = 18, .parameters = &[_]OperandKind{} }, - .{ .name = "Restrict", .value = 19, .parameters = &[_]OperandKind{} }, - .{ .name = "Aliased", .value = 20, .parameters = &[_]OperandKind{} }, - .{ .name = "Volatile", .value = 21, .parameters = &[_]OperandKind{} }, - .{ .name = "Constant", .value = 22, .parameters = &[_]OperandKind{} }, - .{ .name = "Coherent", .value = 23, .parameters = &[_]OperandKind{} }, - .{ .name = "NonWritable", .value = 24, .parameters = &[_]OperandKind{} }, - .{ .name = "NonReadable", .value = 25, .parameters = &[_]OperandKind{} }, - .{ .name = "Uniform", .value = 26, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformId", .value = 27, .parameters = &[_]OperandKind{.IdScope} }, - .{ .name = "SaturatedConversion", .value = 28, .parameters = &[_]OperandKind{} }, - .{ .name = "Stream", .value = 29, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Location", .value = 30, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Component", .value = 31, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Index", .value = 32, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Binding", .value = 33, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "DescriptorSet", .value = 34, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Offset", .value = 35, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "XfbBuffer", .value = 36, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "XfbStride", .value = 37, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "FuncParamAttr", .value = 38, .parameters = &[_]OperandKind{.FunctionParameterAttribute} }, - .{ .name = "FPRoundingMode", .value = 39, .parameters = &[_]OperandKind{.FPRoundingMode} }, - .{ .name = "FPFastMathMode", .value = 40, .parameters = &[_]OperandKind{.FPFastMathMode} }, - .{ .name = "LinkageAttributes", .value = 41, .parameters = &[_]OperandKind{ .LiteralString, .LinkageType } }, - .{ .name = "NoContraction", .value = 42, .parameters = &[_]OperandKind{} }, - .{ .name = "InputAttachmentIndex", .value = 43, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Alignment", .value = 44, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxByteOffset", .value = 45, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "AlignmentId", .value = 46, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "MaxByteOffsetId", .value = 47, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "NoSignedWrap", .value = 4469, .parameters = &[_]OperandKind{} }, - .{ .name = "NoUnsignedWrap", .value = 4470, .parameters = &[_]OperandKind{} }, - .{ .name = "WeightTextureQCOM", .value = 4487, .parameters = &[_]OperandKind{} }, - .{ .name = "BlockMatchTextureQCOM", .value = 4488, .parameters = &[_]OperandKind{} }, - .{ .name = "BlockMatchSamplerQCOM", .value = 4499, .parameters = &[_]OperandKind{} }, - .{ .name = "ExplicitInterpAMD", .value = 4999, .parameters = &[_]OperandKind{} }, - .{ .name = "NodeSharesPayloadLimitsWithAMDX", .value = 5019, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "NodeMaxPayloadsAMDX", .value = 5020, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "TrackFinishWritingAMDX", .value = 5078, .parameters = &[_]OperandKind{} }, - .{ .name = "PayloadNodeNameAMDX", .value = 5091, .parameters = &[_]OperandKind{.LiteralString} }, - .{ .name = "OverrideCoverageNV", .value = 5248, .parameters = &[_]OperandKind{} }, - .{ .name = "PassthroughNV", .value = 5250, .parameters = &[_]OperandKind{} }, - .{ .name = "ViewportRelativeNV", .value = 5252, .parameters = &[_]OperandKind{} }, - .{ .name = "SecondaryViewportRelativeNV", .value = 5256, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "PerPrimitiveNV", .value = 5271, .parameters = &[_]OperandKind{} }, - .{ .name = "PerPrimitiveEXT", .value = 5271, .parameters = &[_]OperandKind{} }, - .{ .name = "PerViewNV", .value = 5272, .parameters = &[_]OperandKind{} }, - .{ .name = "PerTaskNV", .value = 5273, .parameters = &[_]OperandKind{} }, - .{ .name = "PerVertexKHR", .value = 5285, .parameters = &[_]OperandKind{} }, - .{ .name = "PerVertexNV", .value = 5285, .parameters = &[_]OperandKind{} }, - .{ .name = "NonUniform", .value = 5300, .parameters = &[_]OperandKind{} }, - .{ .name = "NonUniformEXT", .value = 5300, .parameters = &[_]OperandKind{} }, - .{ .name = "RestrictPointer", .value = 5355, .parameters = &[_]OperandKind{} }, - .{ .name = "RestrictPointerEXT", .value = 5355, .parameters = &[_]OperandKind{} }, - .{ .name = "AliasedPointer", .value = 5356, .parameters = &[_]OperandKind{} }, - .{ .name = "AliasedPointerEXT", .value = 5356, .parameters = &[_]OperandKind{} }, - .{ .name = "HitObjectShaderRecordBufferNV", .value = 5386, .parameters = &[_]OperandKind{} }, - .{ .name = "BindlessSamplerNV", .value = 5398, .parameters = &[_]OperandKind{} }, - .{ .name = "BindlessImageNV", .value = 5399, .parameters = &[_]OperandKind{} }, - .{ .name = "BoundSamplerNV", .value = 5400, .parameters = &[_]OperandKind{} }, - .{ .name = "BoundImageNV", .value = 5401, .parameters = &[_]OperandKind{} }, - .{ .name = "SIMTCallINTEL", .value = 5599, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "ReferencedIndirectlyINTEL", .value = 5602, .parameters = &[_]OperandKind{} }, - .{ .name = "ClobberINTEL", .value = 5607, .parameters = &[_]OperandKind{.LiteralString} }, - .{ .name = "SideEffectsINTEL", .value = 5608, .parameters = &[_]OperandKind{} }, - .{ .name = "VectorComputeVariableINTEL", .value = 5624, .parameters = &[_]OperandKind{} }, - .{ .name = "FuncParamIOKindINTEL", .value = 5625, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "VectorComputeFunctionINTEL", .value = 5626, .parameters = &[_]OperandKind{} }, - .{ .name = "StackCallINTEL", .value = 5627, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalVariableOffsetINTEL", .value = 5628, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "CounterBuffer", .value = 5634, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "HlslCounterBufferGOOGLE", .value = 5634, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "UserSemantic", .value = 5635, .parameters = &[_]OperandKind{.LiteralString} }, - .{ .name = "HlslSemanticGOOGLE", .value = 5635, .parameters = &[_]OperandKind{.LiteralString} }, - .{ .name = "UserTypeGOOGLE", .value = 5636, .parameters = &[_]OperandKind{.LiteralString} }, - .{ .name = "FunctionRoundingModeINTEL", .value = 5822, .parameters = &[_]OperandKind{ .LiteralInteger, .FPRoundingMode } }, - .{ .name = "FunctionDenormModeINTEL", .value = 5823, .parameters = &[_]OperandKind{ .LiteralInteger, .FPDenormMode } }, - .{ .name = "RegisterINTEL", .value = 5825, .parameters = &[_]OperandKind{} }, - .{ .name = "MemoryINTEL", .value = 5826, .parameters = &[_]OperandKind{.LiteralString} }, - .{ .name = "NumbanksINTEL", .value = 5827, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "BankwidthINTEL", .value = 5828, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxPrivateCopiesINTEL", .value = 5829, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SinglepumpINTEL", .value = 5830, .parameters = &[_]OperandKind{} }, - .{ .name = "DoublepumpINTEL", .value = 5831, .parameters = &[_]OperandKind{} }, - .{ .name = "MaxReplicatesINTEL", .value = 5832, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "SimpleDualPortINTEL", .value = 5833, .parameters = &[_]OperandKind{} }, - .{ .name = "MergeINTEL", .value = 5834, .parameters = &[_]OperandKind{ .LiteralString, .LiteralString } }, - .{ .name = "BankBitsINTEL", .value = 5835, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "ForcePow2DepthINTEL", .value = 5836, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "StridesizeINTEL", .value = 5883, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "WordsizeINTEL", .value = 5884, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "TrueDualPortINTEL", .value = 5885, .parameters = &[_]OperandKind{} }, - .{ .name = "BurstCoalesceINTEL", .value = 5899, .parameters = &[_]OperandKind{} }, - .{ .name = "CacheSizeINTEL", .value = 5900, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "DontStaticallyCoalesceINTEL", .value = 5901, .parameters = &[_]OperandKind{} }, - .{ .name = "PrefetchINTEL", .value = 5902, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "StallEnableINTEL", .value = 5905, .parameters = &[_]OperandKind{} }, - .{ .name = "FuseLoopsInFunctionINTEL", .value = 5907, .parameters = &[_]OperandKind{} }, - .{ .name = "MathOpDSPModeINTEL", .value = 5909, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger } }, - .{ .name = "AliasScopeINTEL", .value = 5914, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "NoAliasINTEL", .value = 5915, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "InitiationIntervalINTEL", .value = 5917, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MaxConcurrencyINTEL", .value = 5918, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "PipelineEnableINTEL", .value = 5919, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "BufferLocationINTEL", .value = 5921, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "IOPipeStorageINTEL", .value = 5944, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "FunctionFloatingPointModeINTEL", .value = 6080, .parameters = &[_]OperandKind{ .LiteralInteger, .FPOperationMode } }, - .{ .name = "SingleElementVectorINTEL", .value = 6085, .parameters = &[_]OperandKind{} }, - .{ .name = "VectorComputeCallableFunctionINTEL", .value = 6087, .parameters = &[_]OperandKind{} }, - .{ .name = "MediaBlockIOINTEL", .value = 6140, .parameters = &[_]OperandKind{} }, - .{ .name = "StallFreeINTEL", .value = 6151, .parameters = &[_]OperandKind{} }, - .{ .name = "FPMaxErrorDecorationINTEL", .value = 6170, .parameters = &[_]OperandKind{.LiteralFloat} }, - .{ .name = "LatencyControlLabelINTEL", .value = 6172, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "LatencyControlConstraintINTEL", .value = 6173, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger, .LiteralInteger } }, - .{ .name = "ConduitKernelArgumentINTEL", .value = 6175, .parameters = &[_]OperandKind{} }, - .{ .name = "RegisterMapKernelArgumentINTEL", .value = 6176, .parameters = &[_]OperandKind{} }, - .{ .name = "MMHostInterfaceAddressWidthINTEL", .value = 6177, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MMHostInterfaceDataWidthINTEL", .value = 6178, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MMHostInterfaceLatencyINTEL", .value = 6179, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MMHostInterfaceReadWriteModeINTEL", .value = 6180, .parameters = &[_]OperandKind{.AccessQualifier} }, - .{ .name = "MMHostInterfaceMaxBurstINTEL", .value = 6181, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "MMHostInterfaceWaitRequestINTEL", .value = 6182, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "StableKernelArgumentINTEL", .value = 6183, .parameters = &[_]OperandKind{} }, - .{ .name = "HostAccessINTEL", .value = 6188, .parameters = &[_]OperandKind{ .HostAccessQualifier, .LiteralString } }, - .{ .name = "InitModeINTEL", .value = 6190, .parameters = &[_]OperandKind{.InitializationModeQualifier} }, - .{ .name = "ImplementInRegisterMapINTEL", .value = 6191, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "CacheControlLoadINTEL", .value = 6442, .parameters = &[_]OperandKind{ .LiteralInteger, .LoadCacheControl } }, - .{ .name = "CacheControlStoreINTEL", .value = 6443, .parameters = &[_]OperandKind{ .LiteralInteger, .StoreCacheControl } }, - }, - .BuiltIn => &[_]Enumerant{ - .{ .name = "Position", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "PointSize", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "ClipDistance", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "CullDistance", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "VertexId", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "InstanceId", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitiveId", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "InvocationId", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "Layer", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "ViewportIndex", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "TessLevelOuter", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "TessLevelInner", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "TessCoord", .value = 13, .parameters = &[_]OperandKind{} }, - .{ .name = "PatchVertices", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "FragCoord", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "PointCoord", .value = 16, .parameters = &[_]OperandKind{} }, - .{ .name = "FrontFacing", .value = 17, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleId", .value = 18, .parameters = &[_]OperandKind{} }, - .{ .name = "SamplePosition", .value = 19, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleMask", .value = 20, .parameters = &[_]OperandKind{} }, - .{ .name = "FragDepth", .value = 22, .parameters = &[_]OperandKind{} }, - .{ .name = "HelperInvocation", .value = 23, .parameters = &[_]OperandKind{} }, - .{ .name = "NumWorkgroups", .value = 24, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkgroupSize", .value = 25, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkgroupId", .value = 26, .parameters = &[_]OperandKind{} }, - .{ .name = "LocalInvocationId", .value = 27, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalInvocationId", .value = 28, .parameters = &[_]OperandKind{} }, - .{ .name = "LocalInvocationIndex", .value = 29, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkDim", .value = 30, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalSize", .value = 31, .parameters = &[_]OperandKind{} }, - .{ .name = "EnqueuedWorkgroupSize", .value = 32, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalOffset", .value = 33, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalLinearId", .value = 34, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupSize", .value = 36, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupMaxSize", .value = 37, .parameters = &[_]OperandKind{} }, - .{ .name = "NumSubgroups", .value = 38, .parameters = &[_]OperandKind{} }, - .{ .name = "NumEnqueuedSubgroups", .value = 39, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupId", .value = 40, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupLocalInvocationId", .value = 41, .parameters = &[_]OperandKind{} }, - .{ .name = "VertexIndex", .value = 42, .parameters = &[_]OperandKind{} }, - .{ .name = "InstanceIndex", .value = 43, .parameters = &[_]OperandKind{} }, - .{ .name = "CoreIDARM", .value = 4160, .parameters = &[_]OperandKind{} }, - .{ .name = "CoreCountARM", .value = 4161, .parameters = &[_]OperandKind{} }, - .{ .name = "CoreMaxIDARM", .value = 4162, .parameters = &[_]OperandKind{} }, - .{ .name = "WarpIDARM", .value = 4163, .parameters = &[_]OperandKind{} }, - .{ .name = "WarpMaxIDARM", .value = 4164, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupEqMask", .value = 4416, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupEqMaskKHR", .value = 4416, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupGeMask", .value = 4417, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupGeMaskKHR", .value = 4417, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupGtMask", .value = 4418, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupGtMaskKHR", .value = 4418, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupLeMask", .value = 4419, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupLeMaskKHR", .value = 4419, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupLtMask", .value = 4420, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupLtMaskKHR", .value = 4420, .parameters = &[_]OperandKind{} }, - .{ .name = "BaseVertex", .value = 4424, .parameters = &[_]OperandKind{} }, - .{ .name = "BaseInstance", .value = 4425, .parameters = &[_]OperandKind{} }, - .{ .name = "DrawIndex", .value = 4426, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitiveShadingRateKHR", .value = 4432, .parameters = &[_]OperandKind{} }, - .{ .name = "DeviceIndex", .value = 4438, .parameters = &[_]OperandKind{} }, - .{ .name = "ViewIndex", .value = 4440, .parameters = &[_]OperandKind{} }, - .{ .name = "ShadingRateKHR", .value = 4444, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordNoPerspAMD", .value = 4992, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordNoPerspCentroidAMD", .value = 4993, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordNoPerspSampleAMD", .value = 4994, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordSmoothAMD", .value = 4995, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordSmoothCentroidAMD", .value = 4996, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordSmoothSampleAMD", .value = 4997, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordPullModelAMD", .value = 4998, .parameters = &[_]OperandKind{} }, - .{ .name = "FragStencilRefEXT", .value = 5014, .parameters = &[_]OperandKind{} }, - .{ .name = "CoalescedInputCountAMDX", .value = 5021, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderIndexAMDX", .value = 5073, .parameters = &[_]OperandKind{} }, - .{ .name = "ViewportMaskNV", .value = 5253, .parameters = &[_]OperandKind{} }, - .{ .name = "SecondaryPositionNV", .value = 5257, .parameters = &[_]OperandKind{} }, - .{ .name = "SecondaryViewportMaskNV", .value = 5258, .parameters = &[_]OperandKind{} }, - .{ .name = "PositionPerViewNV", .value = 5261, .parameters = &[_]OperandKind{} }, - .{ .name = "ViewportMaskPerViewNV", .value = 5262, .parameters = &[_]OperandKind{} }, - .{ .name = "FullyCoveredEXT", .value = 5264, .parameters = &[_]OperandKind{} }, - .{ .name = "TaskCountNV", .value = 5274, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitiveCountNV", .value = 5275, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitiveIndicesNV", .value = 5276, .parameters = &[_]OperandKind{} }, - .{ .name = "ClipDistancePerViewNV", .value = 5277, .parameters = &[_]OperandKind{} }, - .{ .name = "CullDistancePerViewNV", .value = 5278, .parameters = &[_]OperandKind{} }, - .{ .name = "LayerPerViewNV", .value = 5279, .parameters = &[_]OperandKind{} }, - .{ .name = "MeshViewCountNV", .value = 5280, .parameters = &[_]OperandKind{} }, - .{ .name = "MeshViewIndicesNV", .value = 5281, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordKHR", .value = 5286, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordNV", .value = 5286, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordNoPerspKHR", .value = 5287, .parameters = &[_]OperandKind{} }, - .{ .name = "BaryCoordNoPerspNV", .value = 5287, .parameters = &[_]OperandKind{} }, - .{ .name = "FragSizeEXT", .value = 5292, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentSizeNV", .value = 5292, .parameters = &[_]OperandKind{} }, - .{ .name = "FragInvocationCountEXT", .value = 5293, .parameters = &[_]OperandKind{} }, - .{ .name = "InvocationsPerPixelNV", .value = 5293, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitivePointIndicesEXT", .value = 5294, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitiveLineIndicesEXT", .value = 5295, .parameters = &[_]OperandKind{} }, - .{ .name = "PrimitiveTriangleIndicesEXT", .value = 5296, .parameters = &[_]OperandKind{} }, - .{ .name = "CullPrimitiveEXT", .value = 5299, .parameters = &[_]OperandKind{} }, - .{ .name = "LaunchIdNV", .value = 5319, .parameters = &[_]OperandKind{} }, - .{ .name = "LaunchIdKHR", .value = 5319, .parameters = &[_]OperandKind{} }, - .{ .name = "LaunchSizeNV", .value = 5320, .parameters = &[_]OperandKind{} }, - .{ .name = "LaunchSizeKHR", .value = 5320, .parameters = &[_]OperandKind{} }, - .{ .name = "WorldRayOriginNV", .value = 5321, .parameters = &[_]OperandKind{} }, - .{ .name = "WorldRayOriginKHR", .value = 5321, .parameters = &[_]OperandKind{} }, - .{ .name = "WorldRayDirectionNV", .value = 5322, .parameters = &[_]OperandKind{} }, - .{ .name = "WorldRayDirectionKHR", .value = 5322, .parameters = &[_]OperandKind{} }, - .{ .name = "ObjectRayOriginNV", .value = 5323, .parameters = &[_]OperandKind{} }, - .{ .name = "ObjectRayOriginKHR", .value = 5323, .parameters = &[_]OperandKind{} }, - .{ .name = "ObjectRayDirectionNV", .value = 5324, .parameters = &[_]OperandKind{} }, - .{ .name = "ObjectRayDirectionKHR", .value = 5324, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTminNV", .value = 5325, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTminKHR", .value = 5325, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTmaxNV", .value = 5326, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTmaxKHR", .value = 5326, .parameters = &[_]OperandKind{} }, - .{ .name = "InstanceCustomIndexNV", .value = 5327, .parameters = &[_]OperandKind{} }, - .{ .name = "InstanceCustomIndexKHR", .value = 5327, .parameters = &[_]OperandKind{} }, - .{ .name = "ObjectToWorldNV", .value = 5330, .parameters = &[_]OperandKind{} }, - .{ .name = "ObjectToWorldKHR", .value = 5330, .parameters = &[_]OperandKind{} }, - .{ .name = "WorldToObjectNV", .value = 5331, .parameters = &[_]OperandKind{} }, - .{ .name = "WorldToObjectKHR", .value = 5331, .parameters = &[_]OperandKind{} }, - .{ .name = "HitTNV", .value = 5332, .parameters = &[_]OperandKind{} }, - .{ .name = "HitKindNV", .value = 5333, .parameters = &[_]OperandKind{} }, - .{ .name = "HitKindKHR", .value = 5333, .parameters = &[_]OperandKind{} }, - .{ .name = "CurrentRayTimeNV", .value = 5334, .parameters = &[_]OperandKind{} }, - .{ .name = "HitTriangleVertexPositionsKHR", .value = 5335, .parameters = &[_]OperandKind{} }, - .{ .name = "HitMicroTriangleVertexPositionsNV", .value = 5337, .parameters = &[_]OperandKind{} }, - .{ .name = "HitMicroTriangleVertexBarycentricsNV", .value = 5344, .parameters = &[_]OperandKind{} }, - .{ .name = "IncomingRayFlagsNV", .value = 5351, .parameters = &[_]OperandKind{} }, - .{ .name = "IncomingRayFlagsKHR", .value = 5351, .parameters = &[_]OperandKind{} }, - .{ .name = "RayGeometryIndexKHR", .value = 5352, .parameters = &[_]OperandKind{} }, - .{ .name = "WarpsPerSMNV", .value = 5374, .parameters = &[_]OperandKind{} }, - .{ .name = "SMCountNV", .value = 5375, .parameters = &[_]OperandKind{} }, - .{ .name = "WarpIDNV", .value = 5376, .parameters = &[_]OperandKind{} }, - .{ .name = "SMIDNV", .value = 5377, .parameters = &[_]OperandKind{} }, - .{ .name = "HitKindFrontFacingMicroTriangleNV", .value = 5405, .parameters = &[_]OperandKind{} }, - .{ .name = "HitKindBackFacingMicroTriangleNV", .value = 5406, .parameters = &[_]OperandKind{} }, - .{ .name = "CullMaskKHR", .value = 6021, .parameters = &[_]OperandKind{} }, - }, - .Scope => &[_]Enumerant{ - .{ .name = "CrossDevice", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Device", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Workgroup", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Subgroup", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Invocation", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "QueueFamily", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "QueueFamilyKHR", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderCallKHR", .value = 6, .parameters = &[_]OperandKind{} }, - }, - .GroupOperation => &[_]Enumerant{ - .{ .name = "Reduce", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "InclusiveScan", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "ExclusiveScan", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "ClusteredReduce", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "PartitionedReduceNV", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "PartitionedInclusiveScanNV", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "PartitionedExclusiveScanNV", .value = 8, .parameters = &[_]OperandKind{} }, - }, - .KernelEnqueueFlags => &[_]Enumerant{ - .{ .name = "NoWait", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "WaitKernel", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "WaitWorkGroup", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .Capability => &[_]Enumerant{ - .{ .name = "Matrix", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Shader", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Geometry", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Tessellation", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Addresses", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "Linkage", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Kernel", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "Vector16", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "Float16Buffer", .value = 8, .parameters = &[_]OperandKind{} }, - .{ .name = "Float16", .value = 9, .parameters = &[_]OperandKind{} }, - .{ .name = "Float64", .value = 10, .parameters = &[_]OperandKind{} }, - .{ .name = "Int64", .value = 11, .parameters = &[_]OperandKind{} }, - .{ .name = "Int64Atomics", .value = 12, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageBasic", .value = 13, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageReadWrite", .value = 14, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageMipmap", .value = 15, .parameters = &[_]OperandKind{} }, - .{ .name = "Pipes", .value = 17, .parameters = &[_]OperandKind{} }, - .{ .name = "Groups", .value = 18, .parameters = &[_]OperandKind{} }, - .{ .name = "DeviceEnqueue", .value = 19, .parameters = &[_]OperandKind{} }, - .{ .name = "LiteralSampler", .value = 20, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicStorage", .value = 21, .parameters = &[_]OperandKind{} }, - .{ .name = "Int16", .value = 22, .parameters = &[_]OperandKind{} }, - .{ .name = "TessellationPointSize", .value = 23, .parameters = &[_]OperandKind{} }, - .{ .name = "GeometryPointSize", .value = 24, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageGatherExtended", .value = 25, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageMultisample", .value = 27, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformBufferArrayDynamicIndexing", .value = 28, .parameters = &[_]OperandKind{} }, - .{ .name = "SampledImageArrayDynamicIndexing", .value = 29, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageBufferArrayDynamicIndexing", .value = 30, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageArrayDynamicIndexing", .value = 31, .parameters = &[_]OperandKind{} }, - .{ .name = "ClipDistance", .value = 32, .parameters = &[_]OperandKind{} }, - .{ .name = "CullDistance", .value = 33, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageCubeArray", .value = 34, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleRateShading", .value = 35, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageRect", .value = 36, .parameters = &[_]OperandKind{} }, - .{ .name = "SampledRect", .value = 37, .parameters = &[_]OperandKind{} }, - .{ .name = "GenericPointer", .value = 38, .parameters = &[_]OperandKind{} }, - .{ .name = "Int8", .value = 39, .parameters = &[_]OperandKind{} }, - .{ .name = "InputAttachment", .value = 40, .parameters = &[_]OperandKind{} }, - .{ .name = "SparseResidency", .value = 41, .parameters = &[_]OperandKind{} }, - .{ .name = "MinLod", .value = 42, .parameters = &[_]OperandKind{} }, - .{ .name = "Sampled1D", .value = 43, .parameters = &[_]OperandKind{} }, - .{ .name = "Image1D", .value = 44, .parameters = &[_]OperandKind{} }, - .{ .name = "SampledCubeArray", .value = 45, .parameters = &[_]OperandKind{} }, - .{ .name = "SampledBuffer", .value = 46, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageBuffer", .value = 47, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageMSArray", .value = 48, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageExtendedFormats", .value = 49, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageQuery", .value = 50, .parameters = &[_]OperandKind{} }, - .{ .name = "DerivativeControl", .value = 51, .parameters = &[_]OperandKind{} }, - .{ .name = "InterpolationFunction", .value = 52, .parameters = &[_]OperandKind{} }, - .{ .name = "TransformFeedback", .value = 53, .parameters = &[_]OperandKind{} }, - .{ .name = "GeometryStreams", .value = 54, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageReadWithoutFormat", .value = 55, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageWriteWithoutFormat", .value = 56, .parameters = &[_]OperandKind{} }, - .{ .name = "MultiViewport", .value = 57, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupDispatch", .value = 58, .parameters = &[_]OperandKind{} }, - .{ .name = "NamedBarrier", .value = 59, .parameters = &[_]OperandKind{} }, - .{ .name = "PipeStorage", .value = 60, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniform", .value = 61, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformVote", .value = 62, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformArithmetic", .value = 63, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformBallot", .value = 64, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformShuffle", .value = 65, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformShuffleRelative", .value = 66, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformClustered", .value = 67, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformQuad", .value = 68, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderLayer", .value = 69, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderViewportIndex", .value = 70, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformDecoration", .value = 71, .parameters = &[_]OperandKind{} }, - .{ .name = "CoreBuiltinsARM", .value = 4165, .parameters = &[_]OperandKind{} }, - .{ .name = "TileImageColorReadAccessEXT", .value = 4166, .parameters = &[_]OperandKind{} }, - .{ .name = "TileImageDepthReadAccessEXT", .value = 4167, .parameters = &[_]OperandKind{} }, - .{ .name = "TileImageStencilReadAccessEXT", .value = 4168, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentShadingRateKHR", .value = 4422, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupBallotKHR", .value = 4423, .parameters = &[_]OperandKind{} }, - .{ .name = "DrawParameters", .value = 4427, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkgroupMemoryExplicitLayoutKHR", .value = 4428, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkgroupMemoryExplicitLayout8BitAccessKHR", .value = 4429, .parameters = &[_]OperandKind{} }, - .{ .name = "WorkgroupMemoryExplicitLayout16BitAccessKHR", .value = 4430, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupVoteKHR", .value = 4431, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageBuffer16BitAccess", .value = 4433, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageUniformBufferBlock16", .value = 4433, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformAndStorageBuffer16BitAccess", .value = 4434, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageUniform16", .value = 4434, .parameters = &[_]OperandKind{} }, - .{ .name = "StoragePushConstant16", .value = 4435, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageInputOutput16", .value = 4436, .parameters = &[_]OperandKind{} }, - .{ .name = "DeviceGroup", .value = 4437, .parameters = &[_]OperandKind{} }, - .{ .name = "MultiView", .value = 4439, .parameters = &[_]OperandKind{} }, - .{ .name = "VariablePointersStorageBuffer", .value = 4441, .parameters = &[_]OperandKind{} }, - .{ .name = "VariablePointers", .value = 4442, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicStorageOps", .value = 4445, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleMaskPostDepthCoverage", .value = 4447, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageBuffer8BitAccess", .value = 4448, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformAndStorageBuffer8BitAccess", .value = 4449, .parameters = &[_]OperandKind{} }, - .{ .name = "StoragePushConstant8", .value = 4450, .parameters = &[_]OperandKind{} }, - .{ .name = "DenormPreserve", .value = 4464, .parameters = &[_]OperandKind{} }, - .{ .name = "DenormFlushToZero", .value = 4465, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedZeroInfNanPreserve", .value = 4466, .parameters = &[_]OperandKind{} }, - .{ .name = "RoundingModeRTE", .value = 4467, .parameters = &[_]OperandKind{} }, - .{ .name = "RoundingModeRTZ", .value = 4468, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryProvisionalKHR", .value = 4471, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryKHR", .value = 4472, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTraversalPrimitiveCullingKHR", .value = 4478, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingKHR", .value = 4479, .parameters = &[_]OperandKind{} }, - .{ .name = "TextureSampleWeightedQCOM", .value = 4484, .parameters = &[_]OperandKind{} }, - .{ .name = "TextureBoxFilterQCOM", .value = 4485, .parameters = &[_]OperandKind{} }, - .{ .name = "TextureBlockMatchQCOM", .value = 4486, .parameters = &[_]OperandKind{} }, - .{ .name = "TextureBlockMatch2QCOM", .value = 4498, .parameters = &[_]OperandKind{} }, - .{ .name = "Float16ImageAMD", .value = 5008, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageGatherBiasLodAMD", .value = 5009, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentMaskAMD", .value = 5010, .parameters = &[_]OperandKind{} }, - .{ .name = "StencilExportEXT", .value = 5013, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageReadWriteLodAMD", .value = 5015, .parameters = &[_]OperandKind{} }, - .{ .name = "Int64ImageEXT", .value = 5016, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderClockKHR", .value = 5055, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderEnqueueAMDX", .value = 5067, .parameters = &[_]OperandKind{} }, - .{ .name = "QuadControlKHR", .value = 5087, .parameters = &[_]OperandKind{} }, - .{ .name = "SampleMaskOverrideCoverageNV", .value = 5249, .parameters = &[_]OperandKind{} }, - .{ .name = "GeometryShaderPassthroughNV", .value = 5251, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderViewportIndexLayerEXT", .value = 5254, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderViewportIndexLayerNV", .value = 5254, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderViewportMaskNV", .value = 5255, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderStereoViewNV", .value = 5259, .parameters = &[_]OperandKind{} }, - .{ .name = "PerViewAttributesNV", .value = 5260, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentFullyCoveredEXT", .value = 5265, .parameters = &[_]OperandKind{} }, - .{ .name = "MeshShadingNV", .value = 5266, .parameters = &[_]OperandKind{} }, - .{ .name = "ImageFootprintNV", .value = 5282, .parameters = &[_]OperandKind{} }, - .{ .name = "MeshShadingEXT", .value = 5283, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentBarycentricKHR", .value = 5284, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentBarycentricNV", .value = 5284, .parameters = &[_]OperandKind{} }, - .{ .name = "ComputeDerivativeGroupQuadsNV", .value = 5288, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentDensityEXT", .value = 5291, .parameters = &[_]OperandKind{} }, - .{ .name = "ShadingRateNV", .value = 5291, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformPartitionedNV", .value = 5297, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderNonUniform", .value = 5301, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderNonUniformEXT", .value = 5301, .parameters = &[_]OperandKind{} }, - .{ .name = "RuntimeDescriptorArray", .value = 5302, .parameters = &[_]OperandKind{} }, - .{ .name = "RuntimeDescriptorArrayEXT", .value = 5302, .parameters = &[_]OperandKind{} }, - .{ .name = "InputAttachmentArrayDynamicIndexing", .value = 5303, .parameters = &[_]OperandKind{} }, - .{ .name = "InputAttachmentArrayDynamicIndexingEXT", .value = 5303, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformTexelBufferArrayDynamicIndexing", .value = 5304, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformTexelBufferArrayDynamicIndexingEXT", .value = 5304, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageTexelBufferArrayDynamicIndexing", .value = 5305, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageTexelBufferArrayDynamicIndexingEXT", .value = 5305, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformBufferArrayNonUniformIndexing", .value = 5306, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformBufferArrayNonUniformIndexingEXT", .value = 5306, .parameters = &[_]OperandKind{} }, - .{ .name = "SampledImageArrayNonUniformIndexing", .value = 5307, .parameters = &[_]OperandKind{} }, - .{ .name = "SampledImageArrayNonUniformIndexingEXT", .value = 5307, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageBufferArrayNonUniformIndexing", .value = 5308, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageBufferArrayNonUniformIndexingEXT", .value = 5308, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageArrayNonUniformIndexing", .value = 5309, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageImageArrayNonUniformIndexingEXT", .value = 5309, .parameters = &[_]OperandKind{} }, - .{ .name = "InputAttachmentArrayNonUniformIndexing", .value = 5310, .parameters = &[_]OperandKind{} }, - .{ .name = "InputAttachmentArrayNonUniformIndexingEXT", .value = 5310, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformTexelBufferArrayNonUniformIndexing", .value = 5311, .parameters = &[_]OperandKind{} }, - .{ .name = "UniformTexelBufferArrayNonUniformIndexingEXT", .value = 5311, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageTexelBufferArrayNonUniformIndexing", .value = 5312, .parameters = &[_]OperandKind{} }, - .{ .name = "StorageTexelBufferArrayNonUniformIndexingEXT", .value = 5312, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingPositionFetchKHR", .value = 5336, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingNV", .value = 5340, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingMotionBlurNV", .value = 5341, .parameters = &[_]OperandKind{} }, - .{ .name = "VulkanMemoryModel", .value = 5345, .parameters = &[_]OperandKind{} }, - .{ .name = "VulkanMemoryModelKHR", .value = 5345, .parameters = &[_]OperandKind{} }, - .{ .name = "VulkanMemoryModelDeviceScope", .value = 5346, .parameters = &[_]OperandKind{} }, - .{ .name = "VulkanMemoryModelDeviceScopeKHR", .value = 5346, .parameters = &[_]OperandKind{} }, - .{ .name = "PhysicalStorageBufferAddresses", .value = 5347, .parameters = &[_]OperandKind{} }, - .{ .name = "PhysicalStorageBufferAddressesEXT", .value = 5347, .parameters = &[_]OperandKind{} }, - .{ .name = "ComputeDerivativeGroupLinearNV", .value = 5350, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingProvisionalKHR", .value = 5353, .parameters = &[_]OperandKind{} }, - .{ .name = "CooperativeMatrixNV", .value = 5357, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentShaderSampleInterlockEXT", .value = 5363, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentShaderShadingRateInterlockEXT", .value = 5372, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderSMBuiltinsNV", .value = 5373, .parameters = &[_]OperandKind{} }, - .{ .name = "FragmentShaderPixelInterlockEXT", .value = 5378, .parameters = &[_]OperandKind{} }, - .{ .name = "DemoteToHelperInvocation", .value = 5379, .parameters = &[_]OperandKind{} }, - .{ .name = "DemoteToHelperInvocationEXT", .value = 5379, .parameters = &[_]OperandKind{} }, - .{ .name = "DisplacementMicromapNV", .value = 5380, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingOpacityMicromapEXT", .value = 5381, .parameters = &[_]OperandKind{} }, - .{ .name = "ShaderInvocationReorderNV", .value = 5383, .parameters = &[_]OperandKind{} }, - .{ .name = "BindlessTextureNV", .value = 5390, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryPositionFetchKHR", .value = 5391, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat16VectorNV", .value = 5404, .parameters = &[_]OperandKind{} }, - .{ .name = "RayTracingDisplacementMicromapNV", .value = 5409, .parameters = &[_]OperandKind{} }, - .{ .name = "RawAccessChainsNV", .value = 5414, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupShuffleINTEL", .value = 5568, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupBufferBlockIOINTEL", .value = 5569, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupImageBlockIOINTEL", .value = 5570, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupImageMediaBlockIOINTEL", .value = 5579, .parameters = &[_]OperandKind{} }, - .{ .name = "RoundToInfinityINTEL", .value = 5582, .parameters = &[_]OperandKind{} }, - .{ .name = "FloatingPointModeINTEL", .value = 5583, .parameters = &[_]OperandKind{} }, - .{ .name = "IntegerFunctions2INTEL", .value = 5584, .parameters = &[_]OperandKind{} }, - .{ .name = "FunctionPointersINTEL", .value = 5603, .parameters = &[_]OperandKind{} }, - .{ .name = "IndirectReferencesINTEL", .value = 5604, .parameters = &[_]OperandKind{} }, - .{ .name = "AsmINTEL", .value = 5606, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat32MinMaxEXT", .value = 5612, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat64MinMaxEXT", .value = 5613, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat16MinMaxEXT", .value = 5616, .parameters = &[_]OperandKind{} }, - .{ .name = "VectorComputeINTEL", .value = 5617, .parameters = &[_]OperandKind{} }, - .{ .name = "VectorAnyINTEL", .value = 5619, .parameters = &[_]OperandKind{} }, - .{ .name = "ExpectAssumeKHR", .value = 5629, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupAvcMotionEstimationINTEL", .value = 5696, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupAvcMotionEstimationIntraINTEL", .value = 5697, .parameters = &[_]OperandKind{} }, - .{ .name = "SubgroupAvcMotionEstimationChromaINTEL", .value = 5698, .parameters = &[_]OperandKind{} }, - .{ .name = "VariableLengthArrayINTEL", .value = 5817, .parameters = &[_]OperandKind{} }, - .{ .name = "FunctionFloatControlINTEL", .value = 5821, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAMemoryAttributesINTEL", .value = 5824, .parameters = &[_]OperandKind{} }, - .{ .name = "FPFastMathModeINTEL", .value = 5837, .parameters = &[_]OperandKind{} }, - .{ .name = "ArbitraryPrecisionIntegersINTEL", .value = 5844, .parameters = &[_]OperandKind{} }, - .{ .name = "ArbitraryPrecisionFloatingPointINTEL", .value = 5845, .parameters = &[_]OperandKind{} }, - .{ .name = "UnstructuredLoopControlsINTEL", .value = 5886, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGALoopControlsINTEL", .value = 5888, .parameters = &[_]OperandKind{} }, - .{ .name = "KernelAttributesINTEL", .value = 5892, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAKernelAttributesINTEL", .value = 5897, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAMemoryAccessesINTEL", .value = 5898, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAClusterAttributesINTEL", .value = 5904, .parameters = &[_]OperandKind{} }, - .{ .name = "LoopFuseINTEL", .value = 5906, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGADSPControlINTEL", .value = 5908, .parameters = &[_]OperandKind{} }, - .{ .name = "MemoryAccessAliasingINTEL", .value = 5910, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAInvocationPipeliningAttributesINTEL", .value = 5916, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGABufferLocationINTEL", .value = 5920, .parameters = &[_]OperandKind{} }, - .{ .name = "ArbitraryPrecisionFixedPointINTEL", .value = 5922, .parameters = &[_]OperandKind{} }, - .{ .name = "USMStorageClassesINTEL", .value = 5935, .parameters = &[_]OperandKind{} }, - .{ .name = "RuntimeAlignedAttributeINTEL", .value = 5939, .parameters = &[_]OperandKind{} }, - .{ .name = "IOPipesINTEL", .value = 5943, .parameters = &[_]OperandKind{} }, - .{ .name = "BlockingPipesINTEL", .value = 5945, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGARegINTEL", .value = 5948, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductInputAll", .value = 6016, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductInputAllKHR", .value = 6016, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductInput4x8Bit", .value = 6017, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductInput4x8BitKHR", .value = 6017, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductInput4x8BitPacked", .value = 6018, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductInput4x8BitPackedKHR", .value = 6018, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProduct", .value = 6019, .parameters = &[_]OperandKind{} }, - .{ .name = "DotProductKHR", .value = 6019, .parameters = &[_]OperandKind{} }, - .{ .name = "RayCullMaskKHR", .value = 6020, .parameters = &[_]OperandKind{} }, - .{ .name = "CooperativeMatrixKHR", .value = 6022, .parameters = &[_]OperandKind{} }, - .{ .name = "BitInstructions", .value = 6025, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupNonUniformRotateKHR", .value = 6026, .parameters = &[_]OperandKind{} }, - .{ .name = "FloatControls2", .value = 6029, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat32AddEXT", .value = 6033, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat64AddEXT", .value = 6034, .parameters = &[_]OperandKind{} }, - .{ .name = "LongCompositesINTEL", .value = 6089, .parameters = &[_]OperandKind{} }, - .{ .name = "OptNoneINTEL", .value = 6094, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicFloat16AddEXT", .value = 6095, .parameters = &[_]OperandKind{} }, - .{ .name = "DebugInfoModuleINTEL", .value = 6114, .parameters = &[_]OperandKind{} }, - .{ .name = "BFloat16ConversionINTEL", .value = 6115, .parameters = &[_]OperandKind{} }, - .{ .name = "SplitBarrierINTEL", .value = 6141, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAClusterAttributesV2INTEL", .value = 6150, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAKernelAttributesv2INTEL", .value = 6161, .parameters = &[_]OperandKind{} }, - .{ .name = "FPMaxErrorINTEL", .value = 6169, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGALatencyControlINTEL", .value = 6171, .parameters = &[_]OperandKind{} }, - .{ .name = "FPGAArgumentInterfacesINTEL", .value = 6174, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalVariableHostAccessINTEL", .value = 6187, .parameters = &[_]OperandKind{} }, - .{ .name = "GlobalVariableFPGADecorationsINTEL", .value = 6189, .parameters = &[_]OperandKind{} }, - .{ .name = "GroupUniformArithmeticKHR", .value = 6400, .parameters = &[_]OperandKind{} }, - .{ .name = "MaskedGatherScatterINTEL", .value = 6427, .parameters = &[_]OperandKind{} }, - .{ .name = "CacheControlsINTEL", .value = 6441, .parameters = &[_]OperandKind{} }, - .{ .name = "RegisterLimitsINTEL", .value = 6460, .parameters = &[_]OperandKind{} }, - }, - .RayQueryIntersection => &[_]Enumerant{ - .{ .name = "RayQueryCandidateIntersectionKHR", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryCommittedIntersectionKHR", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .RayQueryCommittedIntersectionType => &[_]Enumerant{ - .{ .name = "RayQueryCommittedIntersectionNoneKHR", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryCommittedIntersectionTriangleKHR", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryCommittedIntersectionGeneratedKHR", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .RayQueryCandidateIntersectionType => &[_]Enumerant{ - .{ .name = "RayQueryCandidateIntersectionTriangleKHR", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "RayQueryCandidateIntersectionAABBKHR", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .PackedVectorFormat => &[_]Enumerant{ - .{ .name = "PackedVectorFormat4x8Bit", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "PackedVectorFormat4x8BitKHR", .value = 0, .parameters = &[_]OperandKind{} }, - }, - .CooperativeMatrixOperands => &[_]Enumerant{ - .{ .name = "NoneKHR", .value = 0x0000, .parameters = &[_]OperandKind{} }, - .{ .name = "MatrixASignedComponentsKHR", .value = 0x0001, .parameters = &[_]OperandKind{} }, - .{ .name = "MatrixBSignedComponentsKHR", .value = 0x0002, .parameters = &[_]OperandKind{} }, - .{ .name = "MatrixCSignedComponentsKHR", .value = 0x0004, .parameters = &[_]OperandKind{} }, - .{ .name = "MatrixResultSignedComponentsKHR", .value = 0x0008, .parameters = &[_]OperandKind{} }, - .{ .name = "SaturatingAccumulationKHR", .value = 0x0010, .parameters = &[_]OperandKind{} }, - }, - .CooperativeMatrixLayout => &[_]Enumerant{ - .{ .name = "RowMajorKHR", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ColumnMajorKHR", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .CooperativeMatrixUse => &[_]Enumerant{ - .{ .name = "MatrixAKHR", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "MatrixBKHR", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "MatrixAccumulatorKHR", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .InitializationModeQualifier => &[_]Enumerant{ - .{ .name = "InitOnDeviceReprogramINTEL", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "InitOnDeviceResetINTEL", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .LoadCacheControl => &[_]Enumerant{ - .{ .name = "UncachedINTEL", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "CachedINTEL", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "StreamingINTEL", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "InvalidateAfterReadINTEL", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "ConstCachedINTEL", .value = 4, .parameters = &[_]OperandKind{} }, - }, - .StoreCacheControl => &[_]Enumerant{ - .{ .name = "UncachedINTEL", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "WriteThroughINTEL", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "WriteBackINTEL", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "StreamingINTEL", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .NamedMaximumNumberOfRegisters => &[_]Enumerant{ - .{ .name = "AutoINTEL", .value = 0, .parameters = &[_]OperandKind{} }, - }, - .IdResultType => unreachable, - .IdResult => unreachable, - .IdMemorySemantics => unreachable, - .IdScope => unreachable, - .IdRef => unreachable, - .LiteralInteger => unreachable, - .LiteralString => unreachable, - .LiteralFloat => unreachable, - .LiteralContextDependentNumber => unreachable, - .LiteralExtInstInteger => unreachable, - .LiteralSpecConstantOpInteger => unreachable, - .PairLiteralIntegerIdRef => unreachable, - .PairIdRefLiteralInteger => unreachable, - .PairIdRefIdRef => unreachable, - .@"OpenCL.DebugInfo.100.DebugInfoFlags" => &[_]Enumerant{ - .{ .name = "FlagIsProtected", .value = 0x01, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsPrivate", .value = 0x02, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsPublic", .value = 0x03, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsLocal", .value = 0x04, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsDefinition", .value = 0x08, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagFwdDecl", .value = 0x10, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagArtificial", .value = 0x20, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagExplicit", .value = 0x40, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagPrototyped", .value = 0x80, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagObjectPointer", .value = 0x100, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagStaticMember", .value = 0x200, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIndirectVariable", .value = 0x400, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagLValueReference", .value = 0x800, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagRValueReference", .value = 0x1000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsOptimized", .value = 0x2000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsEnumClass", .value = 0x4000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagTypePassByValue", .value = 0x8000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagTypePassByReference", .value = 0x10000, .parameters = &[_]OperandKind{} }, - }, - .@"OpenCL.DebugInfo.100.DebugBaseTypeAttributeEncoding" => &[_]Enumerant{ - .{ .name = "Unspecified", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Address", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Boolean", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Float", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Signed", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedChar", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Unsigned", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedChar", .value = 7, .parameters = &[_]OperandKind{} }, - }, - .@"OpenCL.DebugInfo.100.DebugCompositeType" => &[_]Enumerant{ - .{ .name = "Class", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Structure", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Union", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .@"OpenCL.DebugInfo.100.DebugTypeQualifier" => &[_]Enumerant{ - .{ .name = "ConstType", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "VolatileType", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RestrictType", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicType", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .@"OpenCL.DebugInfo.100.DebugOperation" => &[_]Enumerant{ - .{ .name = "Deref", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Plus", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Minus", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "PlusUconst", .value = 3, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "BitPiece", .value = 4, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger } }, - .{ .name = "Swap", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Xderef", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "StackValue", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "Constu", .value = 8, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "Fragment", .value = 9, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger } }, - }, - .@"OpenCL.DebugInfo.100.DebugImportedEntity" => &[_]Enumerant{ - .{ .name = "ImportedModule", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ImportedDeclaration", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.Shader.DebugInfo.100.DebugInfoFlags" => &[_]Enumerant{ - .{ .name = "FlagIsProtected", .value = 0x01, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsPrivate", .value = 0x02, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsPublic", .value = 0x03, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsLocal", .value = 0x04, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsDefinition", .value = 0x08, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagFwdDecl", .value = 0x10, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagArtificial", .value = 0x20, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagExplicit", .value = 0x40, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagPrototyped", .value = 0x80, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagObjectPointer", .value = 0x100, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagStaticMember", .value = 0x200, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIndirectVariable", .value = 0x400, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagLValueReference", .value = 0x800, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagRValueReference", .value = 0x1000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsOptimized", .value = 0x2000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsEnumClass", .value = 0x4000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagTypePassByValue", .value = 0x8000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagTypePassByReference", .value = 0x10000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagUnknownPhysicalLayout", .value = 0x20000, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.Shader.DebugInfo.100.BuildIdentifierFlags" => &[_]Enumerant{ - .{ .name = "IdentifierPossibleDuplicates", .value = 0x01, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.Shader.DebugInfo.100.DebugBaseTypeAttributeEncoding" => &[_]Enumerant{ - .{ .name = "Unspecified", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Address", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Boolean", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Float", .value = 3, .parameters = &[_]OperandKind{} }, - .{ .name = "Signed", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedChar", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Unsigned", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedChar", .value = 7, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.Shader.DebugInfo.100.DebugCompositeType" => &[_]Enumerant{ - .{ .name = "Class", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Structure", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Union", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.Shader.DebugInfo.100.DebugTypeQualifier" => &[_]Enumerant{ - .{ .name = "ConstType", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "VolatileType", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RestrictType", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "AtomicType", .value = 3, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.Shader.DebugInfo.100.DebugOperation" => &[_]Enumerant{ - .{ .name = "Deref", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Plus", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Minus", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "PlusUconst", .value = 3, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "BitPiece", .value = 4, .parameters = &[_]OperandKind{ .IdRef, .IdRef } }, - .{ .name = "Swap", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Xderef", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "StackValue", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "Constu", .value = 8, .parameters = &[_]OperandKind{.IdRef} }, - .{ .name = "Fragment", .value = 9, .parameters = &[_]OperandKind{ .IdRef, .IdRef } }, - }, - .@"NonSemantic.Shader.DebugInfo.100.DebugImportedEntity" => &[_]Enumerant{ - .{ .name = "ImportedModule", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "ImportedDeclaration", .value = 1, .parameters = &[_]OperandKind{} }, - }, - .@"NonSemantic.ClspvReflection.6.KernelPropertyFlags" => &[_]Enumerant{ - .{ .name = "MayUsePrintf", .value = 0x1, .parameters = &[_]OperandKind{} }, - }, - .@"DebugInfo.DebugInfoFlags" => &[_]Enumerant{ - .{ .name = "FlagIsProtected", .value = 0x01, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsPrivate", .value = 0x02, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsPublic", .value = 0x03, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsLocal", .value = 0x04, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsDefinition", .value = 0x08, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagFwdDecl", .value = 0x10, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagArtificial", .value = 0x20, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagExplicit", .value = 0x40, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagPrototyped", .value = 0x80, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagObjectPointer", .value = 0x100, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagStaticMember", .value = 0x200, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIndirectVariable", .value = 0x400, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagLValueReference", .value = 0x800, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagRValueReference", .value = 0x1000, .parameters = &[_]OperandKind{} }, - .{ .name = "FlagIsOptimized", .value = 0x2000, .parameters = &[_]OperandKind{} }, - }, - .@"DebugInfo.DebugBaseTypeAttributeEncoding" => &[_]Enumerant{ - .{ .name = "Unspecified", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Address", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Boolean", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "Float", .value = 4, .parameters = &[_]OperandKind{} }, - .{ .name = "Signed", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "SignedChar", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "Unsigned", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "UnsignedChar", .value = 8, .parameters = &[_]OperandKind{} }, - }, - .@"DebugInfo.DebugCompositeType" => &[_]Enumerant{ - .{ .name = "Class", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Structure", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Union", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .@"DebugInfo.DebugTypeQualifier" => &[_]Enumerant{ - .{ .name = "ConstType", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "VolatileType", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "RestrictType", .value = 2, .parameters = &[_]OperandKind{} }, - }, - .@"DebugInfo.DebugOperation" => &[_]Enumerant{ - .{ .name = "Deref", .value = 0, .parameters = &[_]OperandKind{} }, - .{ .name = "Plus", .value = 1, .parameters = &[_]OperandKind{} }, - .{ .name = "Minus", .value = 2, .parameters = &[_]OperandKind{} }, - .{ .name = "PlusUconst", .value = 3, .parameters = &[_]OperandKind{.LiteralInteger} }, - .{ .name = "BitPiece", .value = 4, .parameters = &[_]OperandKind{ .LiteralInteger, .LiteralInteger } }, - .{ .name = "Swap", .value = 5, .parameters = &[_]OperandKind{} }, - .{ .name = "Xderef", .value = 6, .parameters = &[_]OperandKind{} }, - .{ .name = "StackValue", .value = 7, .parameters = &[_]OperandKind{} }, - .{ .name = "Constu", .value = 8, .parameters = &[_]OperandKind{.LiteralInteger} }, + .opcode => unreachable, + .image_operands => &.{ + .{ .name = "Bias", .value = 0x0001, .parameters = &.{.id_ref} }, + .{ .name = "Lod", .value = 0x0002, .parameters = &.{.id_ref} }, + .{ .name = "Grad", .value = 0x0004, .parameters = &.{ .id_ref, .id_ref } }, + .{ .name = "ConstOffset", .value = 0x0008, .parameters = &.{.id_ref} }, + .{ .name = "Offset", .value = 0x0010, .parameters = &.{.id_ref} }, + .{ .name = "ConstOffsets", .value = 0x0020, .parameters = &.{.id_ref} }, + .{ .name = "Sample", .value = 0x0040, .parameters = &.{.id_ref} }, + .{ .name = "MinLod", .value = 0x0080, .parameters = &.{.id_ref} }, + .{ .name = "MakeTexelAvailable", .value = 0x0100, .parameters = &.{.id_scope} }, + .{ .name = "MakeTexelVisible", .value = 0x0200, .parameters = &.{.id_scope} }, + .{ .name = "NonPrivateTexel", .value = 0x0400, .parameters = &.{} }, + .{ .name = "VolatileTexel", .value = 0x0800, .parameters = &.{} }, + .{ .name = "SignExtend", .value = 0x1000, .parameters = &.{} }, + .{ .name = "ZeroExtend", .value = 0x2000, .parameters = &.{} }, + .{ .name = "Nontemporal", .value = 0x4000, .parameters = &.{} }, + .{ .name = "Offsets", .value = 0x10000, .parameters = &.{.id_ref} }, + }, + .fp_fast_math_mode => &.{ + .{ .name = "NotNaN", .value = 0x0001, .parameters = &.{} }, + .{ .name = "NotInf", .value = 0x0002, .parameters = &.{} }, + .{ .name = "NSZ", .value = 0x0004, .parameters = &.{} }, + .{ .name = "AllowRecip", .value = 0x0008, .parameters = &.{} }, + .{ .name = "Fast", .value = 0x0010, .parameters = &.{} }, + .{ .name = "AllowContract", .value = 0x10000, .parameters = &.{} }, + .{ .name = "AllowReassoc", .value = 0x20000, .parameters = &.{} }, + .{ .name = "AllowTransform", .value = 0x40000, .parameters = &.{} }, + }, + .selection_control => &.{ + .{ .name = "Flatten", .value = 0x0001, .parameters = &.{} }, + .{ .name = "DontFlatten", .value = 0x0002, .parameters = &.{} }, + }, + .loop_control => &.{ + .{ .name = "Unroll", .value = 0x0001, .parameters = &.{} }, + .{ .name = "DontUnroll", .value = 0x0002, .parameters = &.{} }, + .{ .name = "DependencyInfinite", .value = 0x0004, .parameters = &.{} }, + .{ .name = "DependencyLength", .value = 0x0008, .parameters = &.{.literal_integer} }, + .{ .name = "MinIterations", .value = 0x0010, .parameters = &.{.literal_integer} }, + .{ .name = "MaxIterations", .value = 0x0020, .parameters = &.{.literal_integer} }, + .{ .name = "IterationMultiple", .value = 0x0040, .parameters = &.{.literal_integer} }, + .{ .name = "PeelCount", .value = 0x0080, .parameters = &.{.literal_integer} }, + .{ .name = "PartialCount", .value = 0x0100, .parameters = &.{.literal_integer} }, + .{ .name = "InitiationIntervalINTEL", .value = 0x10000, .parameters = &.{.literal_integer} }, + .{ .name = "MaxConcurrencyINTEL", .value = 0x20000, .parameters = &.{.literal_integer} }, + .{ .name = "DependencyArrayINTEL", .value = 0x40000, .parameters = &.{.literal_integer} }, + .{ .name = "PipelineEnableINTEL", .value = 0x80000, .parameters = &.{.literal_integer} }, + .{ .name = "LoopCoalesceINTEL", .value = 0x100000, .parameters = &.{.literal_integer} }, + .{ .name = "MaxInterleavingINTEL", .value = 0x200000, .parameters = &.{.literal_integer} }, + .{ .name = "SpeculatedIterationsINTEL", .value = 0x400000, .parameters = &.{.literal_integer} }, + .{ .name = "NoFusionINTEL", .value = 0x800000, .parameters = &.{} }, + .{ .name = "LoopCountINTEL", .value = 0x1000000, .parameters = &.{.literal_integer} }, + .{ .name = "MaxReinvocationDelayINTEL", .value = 0x2000000, .parameters = &.{.literal_integer} }, + }, + .function_control => &.{ + .{ .name = "Inline", .value = 0x0001, .parameters = &.{} }, + .{ .name = "DontInline", .value = 0x0002, .parameters = &.{} }, + .{ .name = "Pure", .value = 0x0004, .parameters = &.{} }, + .{ .name = "Const", .value = 0x0008, .parameters = &.{} }, + .{ .name = "OptNoneEXT", .value = 0x10000, .parameters = &.{} }, + }, + .memory_semantics => &.{ + .{ .name = "Relaxed", .value = 0x0000, .parameters = &.{} }, + .{ .name = "Acquire", .value = 0x0002, .parameters = &.{} }, + .{ .name = "Release", .value = 0x0004, .parameters = &.{} }, + .{ .name = "AcquireRelease", .value = 0x0008, .parameters = &.{} }, + .{ .name = "SequentiallyConsistent", .value = 0x0010, .parameters = &.{} }, + .{ .name = "UniformMemory", .value = 0x0040, .parameters = &.{} }, + .{ .name = "SubgroupMemory", .value = 0x0080, .parameters = &.{} }, + .{ .name = "WorkgroupMemory", .value = 0x0100, .parameters = &.{} }, + .{ .name = "CrossWorkgroupMemory", .value = 0x0200, .parameters = &.{} }, + .{ .name = "AtomicCounterMemory", .value = 0x0400, .parameters = &.{} }, + .{ .name = "ImageMemory", .value = 0x0800, .parameters = &.{} }, + .{ .name = "OutputMemory", .value = 0x1000, .parameters = &.{} }, + .{ .name = "MakeAvailable", .value = 0x2000, .parameters = &.{} }, + .{ .name = "MakeVisible", .value = 0x4000, .parameters = &.{} }, + .{ .name = "Volatile", .value = 0x8000, .parameters = &.{} }, + }, + .memory_access => &.{ + .{ .name = "Volatile", .value = 0x0001, .parameters = &.{} }, + .{ .name = "Aligned", .value = 0x0002, .parameters = &.{.literal_integer} }, + .{ .name = "Nontemporal", .value = 0x0004, .parameters = &.{} }, + .{ .name = "MakePointerAvailable", .value = 0x0008, .parameters = &.{.id_scope} }, + .{ .name = "MakePointerVisible", .value = 0x0010, .parameters = &.{.id_scope} }, + .{ .name = "NonPrivatePointer", .value = 0x0020, .parameters = &.{} }, + .{ .name = "AliasScopeINTELMask", .value = 0x10000, .parameters = &.{.id_ref} }, + .{ .name = "NoAliasINTELMask", .value = 0x20000, .parameters = &.{.id_ref} }, + }, + .kernel_profiling_info => &.{ + .{ .name = "CmdExecTime", .value = 0x0001, .parameters = &.{} }, + }, + .ray_flags => &.{ + .{ .name = "NoneKHR", .value = 0x0000, .parameters = &.{} }, + .{ .name = "OpaqueKHR", .value = 0x0001, .parameters = &.{} }, + .{ .name = "NoOpaqueKHR", .value = 0x0002, .parameters = &.{} }, + .{ .name = "TerminateOnFirstHitKHR", .value = 0x0004, .parameters = &.{} }, + .{ .name = "SkipClosestHitShaderKHR", .value = 0x0008, .parameters = &.{} }, + .{ .name = "CullBackFacingTrianglesKHR", .value = 0x0010, .parameters = &.{} }, + .{ .name = "CullFrontFacingTrianglesKHR", .value = 0x0020, .parameters = &.{} }, + .{ .name = "CullOpaqueKHR", .value = 0x0040, .parameters = &.{} }, + .{ .name = "CullNoOpaqueKHR", .value = 0x0080, .parameters = &.{} }, + .{ .name = "SkipTrianglesKHR", .value = 0x0100, .parameters = &.{} }, + .{ .name = "SkipAABBsKHR", .value = 0x0200, .parameters = &.{} }, + .{ .name = "ForceOpacityMicromap2StateEXT", .value = 0x0400, .parameters = &.{} }, + }, + .fragment_shading_rate => &.{ + .{ .name = "Vertical2Pixels", .value = 0x0001, .parameters = &.{} }, + .{ .name = "Vertical4Pixels", .value = 0x0002, .parameters = &.{} }, + .{ .name = "Horizontal2Pixels", .value = 0x0004, .parameters = &.{} }, + .{ .name = "Horizontal4Pixels", .value = 0x0008, .parameters = &.{} }, + }, + .raw_access_chain_operands => &.{ + .{ .name = "RobustnessPerComponentNV", .value = 0x0001, .parameters = &.{} }, + .{ .name = "RobustnessPerElementNV", .value = 0x0002, .parameters = &.{} }, + }, + .source_language => &.{ + .{ .name = "Unknown", .value = 0, .parameters = &.{} }, + .{ .name = "ESSL", .value = 1, .parameters = &.{} }, + .{ .name = "GLSL", .value = 2, .parameters = &.{} }, + .{ .name = "OpenCL_C", .value = 3, .parameters = &.{} }, + .{ .name = "OpenCL_CPP", .value = 4, .parameters = &.{} }, + .{ .name = "HLSL", .value = 5, .parameters = &.{} }, + .{ .name = "CPP_for_OpenCL", .value = 6, .parameters = &.{} }, + .{ .name = "SYCL", .value = 7, .parameters = &.{} }, + .{ .name = "HERO_C", .value = 8, .parameters = &.{} }, + .{ .name = "NZSL", .value = 9, .parameters = &.{} }, + .{ .name = "WGSL", .value = 10, .parameters = &.{} }, + .{ .name = "Slang", .value = 11, .parameters = &.{} }, + .{ .name = "Zig", .value = 12, .parameters = &.{} }, + .{ .name = "Rust", .value = 13, .parameters = &.{} }, + }, + .execution_model => &.{ + .{ .name = "Vertex", .value = 0, .parameters = &.{} }, + .{ .name = "TessellationControl", .value = 1, .parameters = &.{} }, + .{ .name = "TessellationEvaluation", .value = 2, .parameters = &.{} }, + .{ .name = "Geometry", .value = 3, .parameters = &.{} }, + .{ .name = "Fragment", .value = 4, .parameters = &.{} }, + .{ .name = "GLCompute", .value = 5, .parameters = &.{} }, + .{ .name = "Kernel", .value = 6, .parameters = &.{} }, + .{ .name = "TaskNV", .value = 5267, .parameters = &.{} }, + .{ .name = "MeshNV", .value = 5268, .parameters = &.{} }, + .{ .name = "RayGenerationKHR", .value = 5313, .parameters = &.{} }, + .{ .name = "IntersectionKHR", .value = 5314, .parameters = &.{} }, + .{ .name = "AnyHitKHR", .value = 5315, .parameters = &.{} }, + .{ .name = "ClosestHitKHR", .value = 5316, .parameters = &.{} }, + .{ .name = "MissKHR", .value = 5317, .parameters = &.{} }, + .{ .name = "CallableKHR", .value = 5318, .parameters = &.{} }, + .{ .name = "TaskEXT", .value = 5364, .parameters = &.{} }, + .{ .name = "MeshEXT", .value = 5365, .parameters = &.{} }, + }, + .addressing_model => &.{ + .{ .name = "Logical", .value = 0, .parameters = &.{} }, + .{ .name = "Physical32", .value = 1, .parameters = &.{} }, + .{ .name = "Physical64", .value = 2, .parameters = &.{} }, + .{ .name = "PhysicalStorageBuffer64", .value = 5348, .parameters = &.{} }, + }, + .memory_model => &.{ + .{ .name = "Simple", .value = 0, .parameters = &.{} }, + .{ .name = "GLSL450", .value = 1, .parameters = &.{} }, + .{ .name = "OpenCL", .value = 2, .parameters = &.{} }, + .{ .name = "Vulkan", .value = 3, .parameters = &.{} }, + }, + .execution_mode => &.{ + .{ .name = "Invocations", .value = 0, .parameters = &.{.literal_integer} }, + .{ .name = "SpacingEqual", .value = 1, .parameters = &.{} }, + .{ .name = "SpacingFractionalEven", .value = 2, .parameters = &.{} }, + .{ .name = "SpacingFractionalOdd", .value = 3, .parameters = &.{} }, + .{ .name = "VertexOrderCw", .value = 4, .parameters = &.{} }, + .{ .name = "VertexOrderCcw", .value = 5, .parameters = &.{} }, + .{ .name = "PixelCenterInteger", .value = 6, .parameters = &.{} }, + .{ .name = "OriginUpperLeft", .value = 7, .parameters = &.{} }, + .{ .name = "OriginLowerLeft", .value = 8, .parameters = &.{} }, + .{ .name = "EarlyFragmentTests", .value = 9, .parameters = &.{} }, + .{ .name = "PointMode", .value = 10, .parameters = &.{} }, + .{ .name = "Xfb", .value = 11, .parameters = &.{} }, + .{ .name = "DepthReplacing", .value = 12, .parameters = &.{} }, + .{ .name = "DepthGreater", .value = 14, .parameters = &.{} }, + .{ .name = "DepthLess", .value = 15, .parameters = &.{} }, + .{ .name = "DepthUnchanged", .value = 16, .parameters = &.{} }, + .{ .name = "LocalSize", .value = 17, .parameters = &.{ .literal_integer, .literal_integer, .literal_integer } }, + .{ .name = "LocalSizeHint", .value = 18, .parameters = &.{ .literal_integer, .literal_integer, .literal_integer } }, + .{ .name = "InputPoints", .value = 19, .parameters = &.{} }, + .{ .name = "InputLines", .value = 20, .parameters = &.{} }, + .{ .name = "InputLinesAdjacency", .value = 21, .parameters = &.{} }, + .{ .name = "Triangles", .value = 22, .parameters = &.{} }, + .{ .name = "InputTrianglesAdjacency", .value = 23, .parameters = &.{} }, + .{ .name = "Quads", .value = 24, .parameters = &.{} }, + .{ .name = "Isolines", .value = 25, .parameters = &.{} }, + .{ .name = "OutputVertices", .value = 26, .parameters = &.{.literal_integer} }, + .{ .name = "OutputPoints", .value = 27, .parameters = &.{} }, + .{ .name = "OutputLineStrip", .value = 28, .parameters = &.{} }, + .{ .name = "OutputTriangleStrip", .value = 29, .parameters = &.{} }, + .{ .name = "VecTypeHint", .value = 30, .parameters = &.{.literal_integer} }, + .{ .name = "ContractionOff", .value = 31, .parameters = &.{} }, + .{ .name = "Initializer", .value = 33, .parameters = &.{} }, + .{ .name = "Finalizer", .value = 34, .parameters = &.{} }, + .{ .name = "SubgroupSize", .value = 35, .parameters = &.{.literal_integer} }, + .{ .name = "SubgroupsPerWorkgroup", .value = 36, .parameters = &.{.literal_integer} }, + .{ .name = "SubgroupsPerWorkgroupId", .value = 37, .parameters = &.{.id_ref} }, + .{ .name = "LocalSizeId", .value = 38, .parameters = &.{ .id_ref, .id_ref, .id_ref } }, + .{ .name = "LocalSizeHintId", .value = 39, .parameters = &.{ .id_ref, .id_ref, .id_ref } }, + .{ .name = "NonCoherentColorAttachmentReadEXT", .value = 4169, .parameters = &.{} }, + .{ .name = "NonCoherentDepthAttachmentReadEXT", .value = 4170, .parameters = &.{} }, + .{ .name = "NonCoherentStencilAttachmentReadEXT", .value = 4171, .parameters = &.{} }, + .{ .name = "SubgroupUniformControlFlowKHR", .value = 4421, .parameters = &.{} }, + .{ .name = "PostDepthCoverage", .value = 4446, .parameters = &.{} }, + .{ .name = "DenormPreserve", .value = 4459, .parameters = &.{.literal_integer} }, + .{ .name = "DenormFlushToZero", .value = 4460, .parameters = &.{.literal_integer} }, + .{ .name = "SignedZeroInfNanPreserve", .value = 4461, .parameters = &.{.literal_integer} }, + .{ .name = "RoundingModeRTE", .value = 4462, .parameters = &.{.literal_integer} }, + .{ .name = "RoundingModeRTZ", .value = 4463, .parameters = &.{.literal_integer} }, + .{ .name = "NonCoherentTileAttachmentReadQCOM", .value = 4489, .parameters = &.{} }, + .{ .name = "TileShadingRateQCOM", .value = 4490, .parameters = &.{ .literal_integer, .literal_integer, .literal_integer } }, + .{ .name = "EarlyAndLateFragmentTestsAMD", .value = 5017, .parameters = &.{} }, + .{ .name = "StencilRefReplacingEXT", .value = 5027, .parameters = &.{} }, + .{ .name = "CoalescingAMDX", .value = 5069, .parameters = &.{} }, + .{ .name = "IsApiEntryAMDX", .value = 5070, .parameters = &.{.id_ref} }, + .{ .name = "MaxNodeRecursionAMDX", .value = 5071, .parameters = &.{.id_ref} }, + .{ .name = "StaticNumWorkgroupsAMDX", .value = 5072, .parameters = &.{ .id_ref, .id_ref, .id_ref } }, + .{ .name = "ShaderIndexAMDX", .value = 5073, .parameters = &.{.id_ref} }, + .{ .name = "MaxNumWorkgroupsAMDX", .value = 5077, .parameters = &.{ .id_ref, .id_ref, .id_ref } }, + .{ .name = "StencilRefUnchangedFrontAMD", .value = 5079, .parameters = &.{} }, + .{ .name = "StencilRefGreaterFrontAMD", .value = 5080, .parameters = &.{} }, + .{ .name = "StencilRefLessFrontAMD", .value = 5081, .parameters = &.{} }, + .{ .name = "StencilRefUnchangedBackAMD", .value = 5082, .parameters = &.{} }, + .{ .name = "StencilRefGreaterBackAMD", .value = 5083, .parameters = &.{} }, + .{ .name = "StencilRefLessBackAMD", .value = 5084, .parameters = &.{} }, + .{ .name = "QuadDerivativesKHR", .value = 5088, .parameters = &.{} }, + .{ .name = "RequireFullQuadsKHR", .value = 5089, .parameters = &.{} }, + .{ .name = "SharesInputWithAMDX", .value = 5102, .parameters = &.{ .id_ref, .id_ref } }, + .{ .name = "OutputLinesEXT", .value = 5269, .parameters = &.{} }, + .{ .name = "OutputPrimitivesEXT", .value = 5270, .parameters = &.{.literal_integer} }, + .{ .name = "DerivativeGroupQuadsKHR", .value = 5289, .parameters = &.{} }, + .{ .name = "DerivativeGroupLinearKHR", .value = 5290, .parameters = &.{} }, + .{ .name = "OutputTrianglesEXT", .value = 5298, .parameters = &.{} }, + .{ .name = "PixelInterlockOrderedEXT", .value = 5366, .parameters = &.{} }, + .{ .name = "PixelInterlockUnorderedEXT", .value = 5367, .parameters = &.{} }, + .{ .name = "SampleInterlockOrderedEXT", .value = 5368, .parameters = &.{} }, + .{ .name = "SampleInterlockUnorderedEXT", .value = 5369, .parameters = &.{} }, + .{ .name = "ShadingRateInterlockOrderedEXT", .value = 5370, .parameters = &.{} }, + .{ .name = "ShadingRateInterlockUnorderedEXT", .value = 5371, .parameters = &.{} }, + .{ .name = "SharedLocalMemorySizeINTEL", .value = 5618, .parameters = &.{.literal_integer} }, + .{ .name = "RoundingModeRTPINTEL", .value = 5620, .parameters = &.{.literal_integer} }, + .{ .name = "RoundingModeRTNINTEL", .value = 5621, .parameters = &.{.literal_integer} }, + .{ .name = "FloatingPointModeALTINTEL", .value = 5622, .parameters = &.{.literal_integer} }, + .{ .name = "FloatingPointModeIEEEINTEL", .value = 5623, .parameters = &.{.literal_integer} }, + .{ .name = "MaxWorkgroupSizeINTEL", .value = 5893, .parameters = &.{ .literal_integer, .literal_integer, .literal_integer } }, + .{ .name = "MaxWorkDimINTEL", .value = 5894, .parameters = &.{.literal_integer} }, + .{ .name = "NoGlobalOffsetINTEL", .value = 5895, .parameters = &.{} }, + .{ .name = "NumSIMDWorkitemsINTEL", .value = 5896, .parameters = &.{.literal_integer} }, + .{ .name = "SchedulerTargetFmaxMhzINTEL", .value = 5903, .parameters = &.{.literal_integer} }, + .{ .name = "MaximallyReconvergesKHR", .value = 6023, .parameters = &.{} }, + .{ .name = "FPFastMathDefault", .value = 6028, .parameters = &.{ .id_ref, .id_ref } }, + .{ .name = "StreamingInterfaceINTEL", .value = 6154, .parameters = &.{.literal_integer} }, + .{ .name = "RegisterMapInterfaceINTEL", .value = 6160, .parameters = &.{.literal_integer} }, + .{ .name = "NamedBarrierCountINTEL", .value = 6417, .parameters = &.{.literal_integer} }, + .{ .name = "MaximumRegistersINTEL", .value = 6461, .parameters = &.{.literal_integer} }, + .{ .name = "MaximumRegistersIdINTEL", .value = 6462, .parameters = &.{.id_ref} }, + .{ .name = "NamedMaximumRegistersINTEL", .value = 6463, .parameters = &.{.named_maximum_number_of_registers} }, + }, + .storage_class => &.{ + .{ .name = "UniformConstant", .value = 0, .parameters = &.{} }, + .{ .name = "Input", .value = 1, .parameters = &.{} }, + .{ .name = "Uniform", .value = 2, .parameters = &.{} }, + .{ .name = "Output", .value = 3, .parameters = &.{} }, + .{ .name = "Workgroup", .value = 4, .parameters = &.{} }, + .{ .name = "CrossWorkgroup", .value = 5, .parameters = &.{} }, + .{ .name = "Private", .value = 6, .parameters = &.{} }, + .{ .name = "Function", .value = 7, .parameters = &.{} }, + .{ .name = "Generic", .value = 8, .parameters = &.{} }, + .{ .name = "PushConstant", .value = 9, .parameters = &.{} }, + .{ .name = "AtomicCounter", .value = 10, .parameters = &.{} }, + .{ .name = "Image", .value = 11, .parameters = &.{} }, + .{ .name = "StorageBuffer", .value = 12, .parameters = &.{} }, + .{ .name = "TileImageEXT", .value = 4172, .parameters = &.{} }, + .{ .name = "TileAttachmentQCOM", .value = 4491, .parameters = &.{} }, + .{ .name = "NodePayloadAMDX", .value = 5068, .parameters = &.{} }, + .{ .name = "CallableDataKHR", .value = 5328, .parameters = &.{} }, + .{ .name = "IncomingCallableDataKHR", .value = 5329, .parameters = &.{} }, + .{ .name = "RayPayloadKHR", .value = 5338, .parameters = &.{} }, + .{ .name = "HitAttributeKHR", .value = 5339, .parameters = &.{} }, + .{ .name = "IncomingRayPayloadKHR", .value = 5342, .parameters = &.{} }, + .{ .name = "ShaderRecordBufferKHR", .value = 5343, .parameters = &.{} }, + .{ .name = "PhysicalStorageBuffer", .value = 5349, .parameters = &.{} }, + .{ .name = "HitObjectAttributeNV", .value = 5385, .parameters = &.{} }, + .{ .name = "TaskPayloadWorkgroupEXT", .value = 5402, .parameters = &.{} }, + .{ .name = "CodeSectionINTEL", .value = 5605, .parameters = &.{} }, + .{ .name = "DeviceOnlyINTEL", .value = 5936, .parameters = &.{} }, + .{ .name = "HostOnlyINTEL", .value = 5937, .parameters = &.{} }, + }, + .dim => &.{ + .{ .name = "1D", .value = 0, .parameters = &.{} }, + .{ .name = "2D", .value = 1, .parameters = &.{} }, + .{ .name = "3D", .value = 2, .parameters = &.{} }, + .{ .name = "Cube", .value = 3, .parameters = &.{} }, + .{ .name = "Rect", .value = 4, .parameters = &.{} }, + .{ .name = "Buffer", .value = 5, .parameters = &.{} }, + .{ .name = "SubpassData", .value = 6, .parameters = &.{} }, + .{ .name = "TileImageDataEXT", .value = 4173, .parameters = &.{} }, + }, + .sampler_addressing_mode => &.{ + .{ .name = "None", .value = 0, .parameters = &.{} }, + .{ .name = "ClampToEdge", .value = 1, .parameters = &.{} }, + .{ .name = "Clamp", .value = 2, .parameters = &.{} }, + .{ .name = "Repeat", .value = 3, .parameters = &.{} }, + .{ .name = "RepeatMirrored", .value = 4, .parameters = &.{} }, + }, + .sampler_filter_mode => &.{ + .{ .name = "Nearest", .value = 0, .parameters = &.{} }, + .{ .name = "Linear", .value = 1, .parameters = &.{} }, + }, + .image_format => &.{ + .{ .name = "Unknown", .value = 0, .parameters = &.{} }, + .{ .name = "Rgba32f", .value = 1, .parameters = &.{} }, + .{ .name = "Rgba16f", .value = 2, .parameters = &.{} }, + .{ .name = "R32f", .value = 3, .parameters = &.{} }, + .{ .name = "Rgba8", .value = 4, .parameters = &.{} }, + .{ .name = "Rgba8Snorm", .value = 5, .parameters = &.{} }, + .{ .name = "Rg32f", .value = 6, .parameters = &.{} }, + .{ .name = "Rg16f", .value = 7, .parameters = &.{} }, + .{ .name = "R11fG11fB10f", .value = 8, .parameters = &.{} }, + .{ .name = "R16f", .value = 9, .parameters = &.{} }, + .{ .name = "Rgba16", .value = 10, .parameters = &.{} }, + .{ .name = "Rgb10A2", .value = 11, .parameters = &.{} }, + .{ .name = "Rg16", .value = 12, .parameters = &.{} }, + .{ .name = "Rg8", .value = 13, .parameters = &.{} }, + .{ .name = "R16", .value = 14, .parameters = &.{} }, + .{ .name = "R8", .value = 15, .parameters = &.{} }, + .{ .name = "Rgba16Snorm", .value = 16, .parameters = &.{} }, + .{ .name = "Rg16Snorm", .value = 17, .parameters = &.{} }, + .{ .name = "Rg8Snorm", .value = 18, .parameters = &.{} }, + .{ .name = "R16Snorm", .value = 19, .parameters = &.{} }, + .{ .name = "R8Snorm", .value = 20, .parameters = &.{} }, + .{ .name = "Rgba32i", .value = 21, .parameters = &.{} }, + .{ .name = "Rgba16i", .value = 22, .parameters = &.{} }, + .{ .name = "Rgba8i", .value = 23, .parameters = &.{} }, + .{ .name = "R32i", .value = 24, .parameters = &.{} }, + .{ .name = "Rg32i", .value = 25, .parameters = &.{} }, + .{ .name = "Rg16i", .value = 26, .parameters = &.{} }, + .{ .name = "Rg8i", .value = 27, .parameters = &.{} }, + .{ .name = "R16i", .value = 28, .parameters = &.{} }, + .{ .name = "R8i", .value = 29, .parameters = &.{} }, + .{ .name = "Rgba32ui", .value = 30, .parameters = &.{} }, + .{ .name = "Rgba16ui", .value = 31, .parameters = &.{} }, + .{ .name = "Rgba8ui", .value = 32, .parameters = &.{} }, + .{ .name = "R32ui", .value = 33, .parameters = &.{} }, + .{ .name = "Rgb10a2ui", .value = 34, .parameters = &.{} }, + .{ .name = "Rg32ui", .value = 35, .parameters = &.{} }, + .{ .name = "Rg16ui", .value = 36, .parameters = &.{} }, + .{ .name = "Rg8ui", .value = 37, .parameters = &.{} }, + .{ .name = "R16ui", .value = 38, .parameters = &.{} }, + .{ .name = "R8ui", .value = 39, .parameters = &.{} }, + .{ .name = "R64ui", .value = 40, .parameters = &.{} }, + .{ .name = "R64i", .value = 41, .parameters = &.{} }, + }, + .image_channel_order => &.{ + .{ .name = "R", .value = 0, .parameters = &.{} }, + .{ .name = "A", .value = 1, .parameters = &.{} }, + .{ .name = "RG", .value = 2, .parameters = &.{} }, + .{ .name = "RA", .value = 3, .parameters = &.{} }, + .{ .name = "RGB", .value = 4, .parameters = &.{} }, + .{ .name = "RGBA", .value = 5, .parameters = &.{} }, + .{ .name = "BGRA", .value = 6, .parameters = &.{} }, + .{ .name = "ARGB", .value = 7, .parameters = &.{} }, + .{ .name = "Intensity", .value = 8, .parameters = &.{} }, + .{ .name = "Luminance", .value = 9, .parameters = &.{} }, + .{ .name = "Rx", .value = 10, .parameters = &.{} }, + .{ .name = "RGx", .value = 11, .parameters = &.{} }, + .{ .name = "RGBx", .value = 12, .parameters = &.{} }, + .{ .name = "Depth", .value = 13, .parameters = &.{} }, + .{ .name = "DepthStencil", .value = 14, .parameters = &.{} }, + .{ .name = "sRGB", .value = 15, .parameters = &.{} }, + .{ .name = "sRGBx", .value = 16, .parameters = &.{} }, + .{ .name = "sRGBA", .value = 17, .parameters = &.{} }, + .{ .name = "sBGRA", .value = 18, .parameters = &.{} }, + .{ .name = "ABGR", .value = 19, .parameters = &.{} }, + }, + .image_channel_data_type => &.{ + .{ .name = "SnormInt8", .value = 0, .parameters = &.{} }, + .{ .name = "SnormInt16", .value = 1, .parameters = &.{} }, + .{ .name = "UnormInt8", .value = 2, .parameters = &.{} }, + .{ .name = "UnormInt16", .value = 3, .parameters = &.{} }, + .{ .name = "UnormShort565", .value = 4, .parameters = &.{} }, + .{ .name = "UnormShort555", .value = 5, .parameters = &.{} }, + .{ .name = "UnormInt101010", .value = 6, .parameters = &.{} }, + .{ .name = "SignedInt8", .value = 7, .parameters = &.{} }, + .{ .name = "SignedInt16", .value = 8, .parameters = &.{} }, + .{ .name = "SignedInt32", .value = 9, .parameters = &.{} }, + .{ .name = "UnsignedInt8", .value = 10, .parameters = &.{} }, + .{ .name = "UnsignedInt16", .value = 11, .parameters = &.{} }, + .{ .name = "UnsignedInt32", .value = 12, .parameters = &.{} }, + .{ .name = "HalfFloat", .value = 13, .parameters = &.{} }, + .{ .name = "Float", .value = 14, .parameters = &.{} }, + .{ .name = "UnormInt24", .value = 15, .parameters = &.{} }, + .{ .name = "UnormInt101010_2", .value = 16, .parameters = &.{} }, + .{ .name = "UnormInt10X6EXT", .value = 17, .parameters = &.{} }, + .{ .name = "UnsignedIntRaw10EXT", .value = 19, .parameters = &.{} }, + .{ .name = "UnsignedIntRaw12EXT", .value = 20, .parameters = &.{} }, + .{ .name = "UnormInt2_101010EXT", .value = 21, .parameters = &.{} }, + .{ .name = "UnsignedInt10X6EXT", .value = 22, .parameters = &.{} }, + .{ .name = "UnsignedInt12X4EXT", .value = 23, .parameters = &.{} }, + .{ .name = "UnsignedInt14X2EXT", .value = 24, .parameters = &.{} }, + .{ .name = "UnormInt12X4EXT", .value = 25, .parameters = &.{} }, + .{ .name = "UnormInt14X2EXT", .value = 26, .parameters = &.{} }, + }, + .fp_rounding_mode => &.{ + .{ .name = "RTE", .value = 0, .parameters = &.{} }, + .{ .name = "RTZ", .value = 1, .parameters = &.{} }, + .{ .name = "RTP", .value = 2, .parameters = &.{} }, + .{ .name = "RTN", .value = 3, .parameters = &.{} }, + }, + .fp_denorm_mode => &.{ + .{ .name = "Preserve", .value = 0, .parameters = &.{} }, + .{ .name = "FlushToZero", .value = 1, .parameters = &.{} }, + }, + .quantization_modes => &.{ + .{ .name = "TRN", .value = 0, .parameters = &.{} }, + .{ .name = "TRN_ZERO", .value = 1, .parameters = &.{} }, + .{ .name = "RND", .value = 2, .parameters = &.{} }, + .{ .name = "RND_ZERO", .value = 3, .parameters = &.{} }, + .{ .name = "RND_INF", .value = 4, .parameters = &.{} }, + .{ .name = "RND_MIN_INF", .value = 5, .parameters = &.{} }, + .{ .name = "RND_CONV", .value = 6, .parameters = &.{} }, + .{ .name = "RND_CONV_ODD", .value = 7, .parameters = &.{} }, + }, + .fp_operation_mode => &.{ + .{ .name = "IEEE", .value = 0, .parameters = &.{} }, + .{ .name = "ALT", .value = 1, .parameters = &.{} }, + }, + .overflow_modes => &.{ + .{ .name = "WRAP", .value = 0, .parameters = &.{} }, + .{ .name = "SAT", .value = 1, .parameters = &.{} }, + .{ .name = "SAT_ZERO", .value = 2, .parameters = &.{} }, + .{ .name = "SAT_SYM", .value = 3, .parameters = &.{} }, + }, + .linkage_type => &.{ + .{ .name = "Export", .value = 0, .parameters = &.{} }, + .{ .name = "Import", .value = 1, .parameters = &.{} }, + .{ .name = "LinkOnceODR", .value = 2, .parameters = &.{} }, + }, + .access_qualifier => &.{ + .{ .name = "ReadOnly", .value = 0, .parameters = &.{} }, + .{ .name = "WriteOnly", .value = 1, .parameters = &.{} }, + .{ .name = "ReadWrite", .value = 2, .parameters = &.{} }, + }, + .host_access_qualifier => &.{ + .{ .name = "NoneINTEL", .value = 0, .parameters = &.{} }, + .{ .name = "ReadINTEL", .value = 1, .parameters = &.{} }, + .{ .name = "WriteINTEL", .value = 2, .parameters = &.{} }, + .{ .name = "ReadWriteINTEL", .value = 3, .parameters = &.{} }, + }, + .function_parameter_attribute => &.{ + .{ .name = "Zext", .value = 0, .parameters = &.{} }, + .{ .name = "Sext", .value = 1, .parameters = &.{} }, + .{ .name = "ByVal", .value = 2, .parameters = &.{} }, + .{ .name = "Sret", .value = 3, .parameters = &.{} }, + .{ .name = "NoAlias", .value = 4, .parameters = &.{} }, + .{ .name = "NoCapture", .value = 5, .parameters = &.{} }, + .{ .name = "NoWrite", .value = 6, .parameters = &.{} }, + .{ .name = "NoReadWrite", .value = 7, .parameters = &.{} }, + .{ .name = "RuntimeAlignedINTEL", .value = 5940, .parameters = &.{} }, + }, + .decoration => &.{ + .{ .name = "RelaxedPrecision", .value = 0, .parameters = &.{} }, + .{ .name = "SpecId", .value = 1, .parameters = &.{.literal_integer} }, + .{ .name = "Block", .value = 2, .parameters = &.{} }, + .{ .name = "BufferBlock", .value = 3, .parameters = &.{} }, + .{ .name = "RowMajor", .value = 4, .parameters = &.{} }, + .{ .name = "ColMajor", .value = 5, .parameters = &.{} }, + .{ .name = "ArrayStride", .value = 6, .parameters = &.{.literal_integer} }, + .{ .name = "MatrixStride", .value = 7, .parameters = &.{.literal_integer} }, + .{ .name = "GLSLShared", .value = 8, .parameters = &.{} }, + .{ .name = "GLSLPacked", .value = 9, .parameters = &.{} }, + .{ .name = "CPacked", .value = 10, .parameters = &.{} }, + .{ .name = "BuiltIn", .value = 11, .parameters = &.{.built_in} }, + .{ .name = "NoPerspective", .value = 13, .parameters = &.{} }, + .{ .name = "Flat", .value = 14, .parameters = &.{} }, + .{ .name = "Patch", .value = 15, .parameters = &.{} }, + .{ .name = "Centroid", .value = 16, .parameters = &.{} }, + .{ .name = "Sample", .value = 17, .parameters = &.{} }, + .{ .name = "Invariant", .value = 18, .parameters = &.{} }, + .{ .name = "Restrict", .value = 19, .parameters = &.{} }, + .{ .name = "Aliased", .value = 20, .parameters = &.{} }, + .{ .name = "Volatile", .value = 21, .parameters = &.{} }, + .{ .name = "Constant", .value = 22, .parameters = &.{} }, + .{ .name = "Coherent", .value = 23, .parameters = &.{} }, + .{ .name = "NonWritable", .value = 24, .parameters = &.{} }, + .{ .name = "NonReadable", .value = 25, .parameters = &.{} }, + .{ .name = "Uniform", .value = 26, .parameters = &.{} }, + .{ .name = "UniformId", .value = 27, .parameters = &.{.id_scope} }, + .{ .name = "SaturatedConversion", .value = 28, .parameters = &.{} }, + .{ .name = "Stream", .value = 29, .parameters = &.{.literal_integer} }, + .{ .name = "Location", .value = 30, .parameters = &.{.literal_integer} }, + .{ .name = "Component", .value = 31, .parameters = &.{.literal_integer} }, + .{ .name = "Index", .value = 32, .parameters = &.{.literal_integer} }, + .{ .name = "Binding", .value = 33, .parameters = &.{.literal_integer} }, + .{ .name = "DescriptorSet", .value = 34, .parameters = &.{.literal_integer} }, + .{ .name = "Offset", .value = 35, .parameters = &.{.literal_integer} }, + .{ .name = "XfbBuffer", .value = 36, .parameters = &.{.literal_integer} }, + .{ .name = "XfbStride", .value = 37, .parameters = &.{.literal_integer} }, + .{ .name = "FuncParamAttr", .value = 38, .parameters = &.{.function_parameter_attribute} }, + .{ .name = "FPRoundingMode", .value = 39, .parameters = &.{.fp_rounding_mode} }, + .{ .name = "FPFastMathMode", .value = 40, .parameters = &.{.fp_fast_math_mode} }, + .{ .name = "LinkageAttributes", .value = 41, .parameters = &.{ .literal_string, .linkage_type } }, + .{ .name = "NoContraction", .value = 42, .parameters = &.{} }, + .{ .name = "InputAttachmentIndex", .value = 43, .parameters = &.{.literal_integer} }, + .{ .name = "Alignment", .value = 44, .parameters = &.{.literal_integer} }, + .{ .name = "MaxByteOffset", .value = 45, .parameters = &.{.literal_integer} }, + .{ .name = "AlignmentId", .value = 46, .parameters = &.{.id_ref} }, + .{ .name = "MaxByteOffsetId", .value = 47, .parameters = &.{.id_ref} }, + .{ .name = "SaturatedToLargestFloat8NormalConversionEXT", .value = 4216, .parameters = &.{} }, + .{ .name = "NoSignedWrap", .value = 4469, .parameters = &.{} }, + .{ .name = "NoUnsignedWrap", .value = 4470, .parameters = &.{} }, + .{ .name = "WeightTextureQCOM", .value = 4487, .parameters = &.{} }, + .{ .name = "BlockMatchTextureQCOM", .value = 4488, .parameters = &.{} }, + .{ .name = "BlockMatchSamplerQCOM", .value = 4499, .parameters = &.{} }, + .{ .name = "ExplicitInterpAMD", .value = 4999, .parameters = &.{} }, + .{ .name = "NodeSharesPayloadLimitsWithAMDX", .value = 5019, .parameters = &.{.id_ref} }, + .{ .name = "NodeMaxPayloadsAMDX", .value = 5020, .parameters = &.{.id_ref} }, + .{ .name = "TrackFinishWritingAMDX", .value = 5078, .parameters = &.{} }, + .{ .name = "PayloadNodeNameAMDX", .value = 5091, .parameters = &.{.id_ref} }, + .{ .name = "PayloadNodeBaseIndexAMDX", .value = 5098, .parameters = &.{.id_ref} }, + .{ .name = "PayloadNodeSparseArrayAMDX", .value = 5099, .parameters = &.{} }, + .{ .name = "PayloadNodeArraySizeAMDX", .value = 5100, .parameters = &.{.id_ref} }, + .{ .name = "PayloadDispatchIndirectAMDX", .value = 5105, .parameters = &.{} }, + .{ .name = "OverrideCoverageNV", .value = 5248, .parameters = &.{} }, + .{ .name = "PassthroughNV", .value = 5250, .parameters = &.{} }, + .{ .name = "ViewportRelativeNV", .value = 5252, .parameters = &.{} }, + .{ .name = "SecondaryViewportRelativeNV", .value = 5256, .parameters = &.{.literal_integer} }, + .{ .name = "PerPrimitiveEXT", .value = 5271, .parameters = &.{} }, + .{ .name = "PerViewNV", .value = 5272, .parameters = &.{} }, + .{ .name = "PerTaskNV", .value = 5273, .parameters = &.{} }, + .{ .name = "PerVertexKHR", .value = 5285, .parameters = &.{} }, + .{ .name = "NonUniform", .value = 5300, .parameters = &.{} }, + .{ .name = "RestrictPointer", .value = 5355, .parameters = &.{} }, + .{ .name = "AliasedPointer", .value = 5356, .parameters = &.{} }, + .{ .name = "HitObjectShaderRecordBufferNV", .value = 5386, .parameters = &.{} }, + .{ .name = "BindlessSamplerNV", .value = 5398, .parameters = &.{} }, + .{ .name = "BindlessImageNV", .value = 5399, .parameters = &.{} }, + .{ .name = "BoundSamplerNV", .value = 5400, .parameters = &.{} }, + .{ .name = "BoundImageNV", .value = 5401, .parameters = &.{} }, + .{ .name = "SIMTCallINTEL", .value = 5599, .parameters = &.{.literal_integer} }, + .{ .name = "ReferencedIndirectlyINTEL", .value = 5602, .parameters = &.{} }, + .{ .name = "ClobberINTEL", .value = 5607, .parameters = &.{.literal_string} }, + .{ .name = "SideEffectsINTEL", .value = 5608, .parameters = &.{} }, + .{ .name = "VectorComputeVariableINTEL", .value = 5624, .parameters = &.{} }, + .{ .name = "FuncParamIOKindINTEL", .value = 5625, .parameters = &.{.literal_integer} }, + .{ .name = "VectorComputeFunctionINTEL", .value = 5626, .parameters = &.{} }, + .{ .name = "StackCallINTEL", .value = 5627, .parameters = &.{} }, + .{ .name = "GlobalVariableOffsetINTEL", .value = 5628, .parameters = &.{.literal_integer} }, + .{ .name = "CounterBuffer", .value = 5634, .parameters = &.{.id_ref} }, + .{ .name = "UserSemantic", .value = 5635, .parameters = &.{.literal_string} }, + .{ .name = "UserTypeGOOGLE", .value = 5636, .parameters = &.{.literal_string} }, + .{ .name = "FunctionRoundingModeINTEL", .value = 5822, .parameters = &.{ .literal_integer, .fp_rounding_mode } }, + .{ .name = "FunctionDenormModeINTEL", .value = 5823, .parameters = &.{ .literal_integer, .fp_denorm_mode } }, + .{ .name = "RegisterINTEL", .value = 5825, .parameters = &.{} }, + .{ .name = "MemoryINTEL", .value = 5826, .parameters = &.{.literal_string} }, + .{ .name = "NumbanksINTEL", .value = 5827, .parameters = &.{.literal_integer} }, + .{ .name = "BankwidthINTEL", .value = 5828, .parameters = &.{.literal_integer} }, + .{ .name = "MaxPrivateCopiesINTEL", .value = 5829, .parameters = &.{.literal_integer} }, + .{ .name = "SinglepumpINTEL", .value = 5830, .parameters = &.{} }, + .{ .name = "DoublepumpINTEL", .value = 5831, .parameters = &.{} }, + .{ .name = "MaxReplicatesINTEL", .value = 5832, .parameters = &.{.literal_integer} }, + .{ .name = "SimpleDualPortINTEL", .value = 5833, .parameters = &.{} }, + .{ .name = "MergeINTEL", .value = 5834, .parameters = &.{ .literal_string, .literal_string } }, + .{ .name = "BankBitsINTEL", .value = 5835, .parameters = &.{.literal_integer} }, + .{ .name = "ForcePow2DepthINTEL", .value = 5836, .parameters = &.{.literal_integer} }, + .{ .name = "StridesizeINTEL", .value = 5883, .parameters = &.{.literal_integer} }, + .{ .name = "WordsizeINTEL", .value = 5884, .parameters = &.{.literal_integer} }, + .{ .name = "TrueDualPortINTEL", .value = 5885, .parameters = &.{} }, + .{ .name = "BurstCoalesceINTEL", .value = 5899, .parameters = &.{} }, + .{ .name = "CacheSizeINTEL", .value = 5900, .parameters = &.{.literal_integer} }, + .{ .name = "DontStaticallyCoalesceINTEL", .value = 5901, .parameters = &.{} }, + .{ .name = "PrefetchINTEL", .value = 5902, .parameters = &.{.literal_integer} }, + .{ .name = "StallEnableINTEL", .value = 5905, .parameters = &.{} }, + .{ .name = "FuseLoopsInFunctionINTEL", .value = 5907, .parameters = &.{} }, + .{ .name = "MathOpDSPModeINTEL", .value = 5909, .parameters = &.{ .literal_integer, .literal_integer } }, + .{ .name = "AliasScopeINTEL", .value = 5914, .parameters = &.{.id_ref} }, + .{ .name = "NoAliasINTEL", .value = 5915, .parameters = &.{.id_ref} }, + .{ .name = "InitiationIntervalINTEL", .value = 5917, .parameters = &.{.literal_integer} }, + .{ .name = "MaxConcurrencyINTEL", .value = 5918, .parameters = &.{.literal_integer} }, + .{ .name = "PipelineEnableINTEL", .value = 5919, .parameters = &.{.literal_integer} }, + .{ .name = "BufferLocationINTEL", .value = 5921, .parameters = &.{.literal_integer} }, + .{ .name = "IOPipeStorageINTEL", .value = 5944, .parameters = &.{.literal_integer} }, + .{ .name = "FunctionFloatingPointModeINTEL", .value = 6080, .parameters = &.{ .literal_integer, .fp_operation_mode } }, + .{ .name = "SingleElementVectorINTEL", .value = 6085, .parameters = &.{} }, + .{ .name = "VectorComputeCallableFunctionINTEL", .value = 6087, .parameters = &.{} }, + .{ .name = "MediaBlockIOINTEL", .value = 6140, .parameters = &.{} }, + .{ .name = "StallFreeINTEL", .value = 6151, .parameters = &.{} }, + .{ .name = "FPMaxErrorDecorationINTEL", .value = 6170, .parameters = &.{.literal_float} }, + .{ .name = "LatencyControlLabelINTEL", .value = 6172, .parameters = &.{.literal_integer} }, + .{ .name = "LatencyControlConstraintINTEL", .value = 6173, .parameters = &.{ .literal_integer, .literal_integer, .literal_integer } }, + .{ .name = "ConduitKernelArgumentINTEL", .value = 6175, .parameters = &.{} }, + .{ .name = "RegisterMapKernelArgumentINTEL", .value = 6176, .parameters = &.{} }, + .{ .name = "MMHostInterfaceAddressWidthINTEL", .value = 6177, .parameters = &.{.literal_integer} }, + .{ .name = "MMHostInterfaceDataWidthINTEL", .value = 6178, .parameters = &.{.literal_integer} }, + .{ .name = "MMHostInterfaceLatencyINTEL", .value = 6179, .parameters = &.{.literal_integer} }, + .{ .name = "MMHostInterfaceReadWriteModeINTEL", .value = 6180, .parameters = &.{.access_qualifier} }, + .{ .name = "MMHostInterfaceMaxBurstINTEL", .value = 6181, .parameters = &.{.literal_integer} }, + .{ .name = "MMHostInterfaceWaitRequestINTEL", .value = 6182, .parameters = &.{.literal_integer} }, + .{ .name = "StableKernelArgumentINTEL", .value = 6183, .parameters = &.{} }, + .{ .name = "HostAccessINTEL", .value = 6188, .parameters = &.{ .host_access_qualifier, .literal_string } }, + .{ .name = "InitModeINTEL", .value = 6190, .parameters = &.{.initialization_mode_qualifier} }, + .{ .name = "ImplementInRegisterMapINTEL", .value = 6191, .parameters = &.{.literal_integer} }, + .{ .name = "CacheControlLoadINTEL", .value = 6442, .parameters = &.{ .literal_integer, .load_cache_control } }, + .{ .name = "CacheControlStoreINTEL", .value = 6443, .parameters = &.{ .literal_integer, .store_cache_control } }, + }, + .built_in => &.{ + .{ .name = "Position", .value = 0, .parameters = &.{} }, + .{ .name = "PointSize", .value = 1, .parameters = &.{} }, + .{ .name = "ClipDistance", .value = 3, .parameters = &.{} }, + .{ .name = "CullDistance", .value = 4, .parameters = &.{} }, + .{ .name = "VertexId", .value = 5, .parameters = &.{} }, + .{ .name = "InstanceId", .value = 6, .parameters = &.{} }, + .{ .name = "PrimitiveId", .value = 7, .parameters = &.{} }, + .{ .name = "InvocationId", .value = 8, .parameters = &.{} }, + .{ .name = "Layer", .value = 9, .parameters = &.{} }, + .{ .name = "ViewportIndex", .value = 10, .parameters = &.{} }, + .{ .name = "TessLevelOuter", .value = 11, .parameters = &.{} }, + .{ .name = "TessLevelInner", .value = 12, .parameters = &.{} }, + .{ .name = "TessCoord", .value = 13, .parameters = &.{} }, + .{ .name = "PatchVertices", .value = 14, .parameters = &.{} }, + .{ .name = "FragCoord", .value = 15, .parameters = &.{} }, + .{ .name = "PointCoord", .value = 16, .parameters = &.{} }, + .{ .name = "FrontFacing", .value = 17, .parameters = &.{} }, + .{ .name = "SampleId", .value = 18, .parameters = &.{} }, + .{ .name = "SamplePosition", .value = 19, .parameters = &.{} }, + .{ .name = "SampleMask", .value = 20, .parameters = &.{} }, + .{ .name = "FragDepth", .value = 22, .parameters = &.{} }, + .{ .name = "HelperInvocation", .value = 23, .parameters = &.{} }, + .{ .name = "NumWorkgroups", .value = 24, .parameters = &.{} }, + .{ .name = "WorkgroupSize", .value = 25, .parameters = &.{} }, + .{ .name = "WorkgroupId", .value = 26, .parameters = &.{} }, + .{ .name = "LocalInvocationId", .value = 27, .parameters = &.{} }, + .{ .name = "GlobalInvocationId", .value = 28, .parameters = &.{} }, + .{ .name = "LocalInvocationIndex", .value = 29, .parameters = &.{} }, + .{ .name = "WorkDim", .value = 30, .parameters = &.{} }, + .{ .name = "GlobalSize", .value = 31, .parameters = &.{} }, + .{ .name = "EnqueuedWorkgroupSize", .value = 32, .parameters = &.{} }, + .{ .name = "GlobalOffset", .value = 33, .parameters = &.{} }, + .{ .name = "GlobalLinearId", .value = 34, .parameters = &.{} }, + .{ .name = "SubgroupSize", .value = 36, .parameters = &.{} }, + .{ .name = "SubgroupMaxSize", .value = 37, .parameters = &.{} }, + .{ .name = "NumSubgroups", .value = 38, .parameters = &.{} }, + .{ .name = "NumEnqueuedSubgroups", .value = 39, .parameters = &.{} }, + .{ .name = "SubgroupId", .value = 40, .parameters = &.{} }, + .{ .name = "SubgroupLocalInvocationId", .value = 41, .parameters = &.{} }, + .{ .name = "VertexIndex", .value = 42, .parameters = &.{} }, + .{ .name = "InstanceIndex", .value = 43, .parameters = &.{} }, + .{ .name = "CoreIDARM", .value = 4160, .parameters = &.{} }, + .{ .name = "CoreCountARM", .value = 4161, .parameters = &.{} }, + .{ .name = "CoreMaxIDARM", .value = 4162, .parameters = &.{} }, + .{ .name = "WarpIDARM", .value = 4163, .parameters = &.{} }, + .{ .name = "WarpMaxIDARM", .value = 4164, .parameters = &.{} }, + .{ .name = "SubgroupEqMask", .value = 4416, .parameters = &.{} }, + .{ .name = "SubgroupGeMask", .value = 4417, .parameters = &.{} }, + .{ .name = "SubgroupGtMask", .value = 4418, .parameters = &.{} }, + .{ .name = "SubgroupLeMask", .value = 4419, .parameters = &.{} }, + .{ .name = "SubgroupLtMask", .value = 4420, .parameters = &.{} }, + .{ .name = "BaseVertex", .value = 4424, .parameters = &.{} }, + .{ .name = "BaseInstance", .value = 4425, .parameters = &.{} }, + .{ .name = "DrawIndex", .value = 4426, .parameters = &.{} }, + .{ .name = "PrimitiveShadingRateKHR", .value = 4432, .parameters = &.{} }, + .{ .name = "DeviceIndex", .value = 4438, .parameters = &.{} }, + .{ .name = "ViewIndex", .value = 4440, .parameters = &.{} }, + .{ .name = "ShadingRateKHR", .value = 4444, .parameters = &.{} }, + .{ .name = "TileOffsetQCOM", .value = 4492, .parameters = &.{} }, + .{ .name = "TileDimensionQCOM", .value = 4493, .parameters = &.{} }, + .{ .name = "TileApronSizeQCOM", .value = 4494, .parameters = &.{} }, + .{ .name = "BaryCoordNoPerspAMD", .value = 4992, .parameters = &.{} }, + .{ .name = "BaryCoordNoPerspCentroidAMD", .value = 4993, .parameters = &.{} }, + .{ .name = "BaryCoordNoPerspSampleAMD", .value = 4994, .parameters = &.{} }, + .{ .name = "BaryCoordSmoothAMD", .value = 4995, .parameters = &.{} }, + .{ .name = "BaryCoordSmoothCentroidAMD", .value = 4996, .parameters = &.{} }, + .{ .name = "BaryCoordSmoothSampleAMD", .value = 4997, .parameters = &.{} }, + .{ .name = "BaryCoordPullModelAMD", .value = 4998, .parameters = &.{} }, + .{ .name = "FragStencilRefEXT", .value = 5014, .parameters = &.{} }, + .{ .name = "RemainingRecursionLevelsAMDX", .value = 5021, .parameters = &.{} }, + .{ .name = "ShaderIndexAMDX", .value = 5073, .parameters = &.{} }, + .{ .name = "ViewportMaskNV", .value = 5253, .parameters = &.{} }, + .{ .name = "SecondaryPositionNV", .value = 5257, .parameters = &.{} }, + .{ .name = "SecondaryViewportMaskNV", .value = 5258, .parameters = &.{} }, + .{ .name = "PositionPerViewNV", .value = 5261, .parameters = &.{} }, + .{ .name = "ViewportMaskPerViewNV", .value = 5262, .parameters = &.{} }, + .{ .name = "FullyCoveredEXT", .value = 5264, .parameters = &.{} }, + .{ .name = "TaskCountNV", .value = 5274, .parameters = &.{} }, + .{ .name = "PrimitiveCountNV", .value = 5275, .parameters = &.{} }, + .{ .name = "PrimitiveIndicesNV", .value = 5276, .parameters = &.{} }, + .{ .name = "ClipDistancePerViewNV", .value = 5277, .parameters = &.{} }, + .{ .name = "CullDistancePerViewNV", .value = 5278, .parameters = &.{} }, + .{ .name = "LayerPerViewNV", .value = 5279, .parameters = &.{} }, + .{ .name = "MeshViewCountNV", .value = 5280, .parameters = &.{} }, + .{ .name = "MeshViewIndicesNV", .value = 5281, .parameters = &.{} }, + .{ .name = "BaryCoordKHR", .value = 5286, .parameters = &.{} }, + .{ .name = "BaryCoordNoPerspKHR", .value = 5287, .parameters = &.{} }, + .{ .name = "FragSizeEXT", .value = 5292, .parameters = &.{} }, + .{ .name = "FragInvocationCountEXT", .value = 5293, .parameters = &.{} }, + .{ .name = "PrimitivePointIndicesEXT", .value = 5294, .parameters = &.{} }, + .{ .name = "PrimitiveLineIndicesEXT", .value = 5295, .parameters = &.{} }, + .{ .name = "PrimitiveTriangleIndicesEXT", .value = 5296, .parameters = &.{} }, + .{ .name = "CullPrimitiveEXT", .value = 5299, .parameters = &.{} }, + .{ .name = "LaunchIdKHR", .value = 5319, .parameters = &.{} }, + .{ .name = "LaunchSizeKHR", .value = 5320, .parameters = &.{} }, + .{ .name = "WorldRayOriginKHR", .value = 5321, .parameters = &.{} }, + .{ .name = "WorldRayDirectionKHR", .value = 5322, .parameters = &.{} }, + .{ .name = "ObjectRayOriginKHR", .value = 5323, .parameters = &.{} }, + .{ .name = "ObjectRayDirectionKHR", .value = 5324, .parameters = &.{} }, + .{ .name = "RayTminKHR", .value = 5325, .parameters = &.{} }, + .{ .name = "RayTmaxKHR", .value = 5326, .parameters = &.{} }, + .{ .name = "InstanceCustomIndexKHR", .value = 5327, .parameters = &.{} }, + .{ .name = "ObjectToWorldKHR", .value = 5330, .parameters = &.{} }, + .{ .name = "WorldToObjectKHR", .value = 5331, .parameters = &.{} }, + .{ .name = "HitTNV", .value = 5332, .parameters = &.{} }, + .{ .name = "HitKindKHR", .value = 5333, .parameters = &.{} }, + .{ .name = "CurrentRayTimeNV", .value = 5334, .parameters = &.{} }, + .{ .name = "HitTriangleVertexPositionsKHR", .value = 5335, .parameters = &.{} }, + .{ .name = "HitMicroTriangleVertexPositionsNV", .value = 5337, .parameters = &.{} }, + .{ .name = "HitMicroTriangleVertexBarycentricsNV", .value = 5344, .parameters = &.{} }, + .{ .name = "IncomingRayFlagsKHR", .value = 5351, .parameters = &.{} }, + .{ .name = "RayGeometryIndexKHR", .value = 5352, .parameters = &.{} }, + .{ .name = "HitIsSphereNV", .value = 5359, .parameters = &.{} }, + .{ .name = "HitIsLSSNV", .value = 5360, .parameters = &.{} }, + .{ .name = "HitSpherePositionNV", .value = 5361, .parameters = &.{} }, + .{ .name = "WarpsPerSMNV", .value = 5374, .parameters = &.{} }, + .{ .name = "SMCountNV", .value = 5375, .parameters = &.{} }, + .{ .name = "WarpIDNV", .value = 5376, .parameters = &.{} }, + .{ .name = "SMIDNV", .value = 5377, .parameters = &.{} }, + .{ .name = "HitLSSPositionsNV", .value = 5396, .parameters = &.{} }, + .{ .name = "HitKindFrontFacingMicroTriangleNV", .value = 5405, .parameters = &.{} }, + .{ .name = "HitKindBackFacingMicroTriangleNV", .value = 5406, .parameters = &.{} }, + .{ .name = "HitSphereRadiusNV", .value = 5420, .parameters = &.{} }, + .{ .name = "HitLSSRadiiNV", .value = 5421, .parameters = &.{} }, + .{ .name = "ClusterIDNV", .value = 5436, .parameters = &.{} }, + .{ .name = "CullMaskKHR", .value = 6021, .parameters = &.{} }, + }, + .scope => &.{ + .{ .name = "CrossDevice", .value = 0, .parameters = &.{} }, + .{ .name = "Device", .value = 1, .parameters = &.{} }, + .{ .name = "Workgroup", .value = 2, .parameters = &.{} }, + .{ .name = "Subgroup", .value = 3, .parameters = &.{} }, + .{ .name = "Invocation", .value = 4, .parameters = &.{} }, + .{ .name = "QueueFamily", .value = 5, .parameters = &.{} }, + .{ .name = "ShaderCallKHR", .value = 6, .parameters = &.{} }, + }, + .group_operation => &.{ + .{ .name = "Reduce", .value = 0, .parameters = &.{} }, + .{ .name = "InclusiveScan", .value = 1, .parameters = &.{} }, + .{ .name = "ExclusiveScan", .value = 2, .parameters = &.{} }, + .{ .name = "ClusteredReduce", .value = 3, .parameters = &.{} }, + .{ .name = "PartitionedReduceNV", .value = 6, .parameters = &.{} }, + .{ .name = "PartitionedInclusiveScanNV", .value = 7, .parameters = &.{} }, + .{ .name = "PartitionedExclusiveScanNV", .value = 8, .parameters = &.{} }, + }, + .kernel_enqueue_flags => &.{ + .{ .name = "NoWait", .value = 0, .parameters = &.{} }, + .{ .name = "WaitKernel", .value = 1, .parameters = &.{} }, + .{ .name = "WaitWorkGroup", .value = 2, .parameters = &.{} }, + }, + .capability => &.{ + .{ .name = "Matrix", .value = 0, .parameters = &.{} }, + .{ .name = "Shader", .value = 1, .parameters = &.{} }, + .{ .name = "Geometry", .value = 2, .parameters = &.{} }, + .{ .name = "Tessellation", .value = 3, .parameters = &.{} }, + .{ .name = "Addresses", .value = 4, .parameters = &.{} }, + .{ .name = "Linkage", .value = 5, .parameters = &.{} }, + .{ .name = "Kernel", .value = 6, .parameters = &.{} }, + .{ .name = "Vector16", .value = 7, .parameters = &.{} }, + .{ .name = "Float16Buffer", .value = 8, .parameters = &.{} }, + .{ .name = "Float16", .value = 9, .parameters = &.{} }, + .{ .name = "Float64", .value = 10, .parameters = &.{} }, + .{ .name = "Int64", .value = 11, .parameters = &.{} }, + .{ .name = "Int64Atomics", .value = 12, .parameters = &.{} }, + .{ .name = "ImageBasic", .value = 13, .parameters = &.{} }, + .{ .name = "ImageReadWrite", .value = 14, .parameters = &.{} }, + .{ .name = "ImageMipmap", .value = 15, .parameters = &.{} }, + .{ .name = "Pipes", .value = 17, .parameters = &.{} }, + .{ .name = "Groups", .value = 18, .parameters = &.{} }, + .{ .name = "DeviceEnqueue", .value = 19, .parameters = &.{} }, + .{ .name = "LiteralSampler", .value = 20, .parameters = &.{} }, + .{ .name = "AtomicStorage", .value = 21, .parameters = &.{} }, + .{ .name = "Int16", .value = 22, .parameters = &.{} }, + .{ .name = "TessellationPointSize", .value = 23, .parameters = &.{} }, + .{ .name = "GeometryPointSize", .value = 24, .parameters = &.{} }, + .{ .name = "ImageGatherExtended", .value = 25, .parameters = &.{} }, + .{ .name = "StorageImageMultisample", .value = 27, .parameters = &.{} }, + .{ .name = "UniformBufferArrayDynamicIndexing", .value = 28, .parameters = &.{} }, + .{ .name = "SampledImageArrayDynamicIndexing", .value = 29, .parameters = &.{} }, + .{ .name = "StorageBufferArrayDynamicIndexing", .value = 30, .parameters = &.{} }, + .{ .name = "StorageImageArrayDynamicIndexing", .value = 31, .parameters = &.{} }, + .{ .name = "ClipDistance", .value = 32, .parameters = &.{} }, + .{ .name = "CullDistance", .value = 33, .parameters = &.{} }, + .{ .name = "ImageCubeArray", .value = 34, .parameters = &.{} }, + .{ .name = "SampleRateShading", .value = 35, .parameters = &.{} }, + .{ .name = "ImageRect", .value = 36, .parameters = &.{} }, + .{ .name = "SampledRect", .value = 37, .parameters = &.{} }, + .{ .name = "GenericPointer", .value = 38, .parameters = &.{} }, + .{ .name = "Int8", .value = 39, .parameters = &.{} }, + .{ .name = "InputAttachment", .value = 40, .parameters = &.{} }, + .{ .name = "SparseResidency", .value = 41, .parameters = &.{} }, + .{ .name = "MinLod", .value = 42, .parameters = &.{} }, + .{ .name = "Sampled1D", .value = 43, .parameters = &.{} }, + .{ .name = "Image1D", .value = 44, .parameters = &.{} }, + .{ .name = "SampledCubeArray", .value = 45, .parameters = &.{} }, + .{ .name = "SampledBuffer", .value = 46, .parameters = &.{} }, + .{ .name = "ImageBuffer", .value = 47, .parameters = &.{} }, + .{ .name = "ImageMSArray", .value = 48, .parameters = &.{} }, + .{ .name = "StorageImageExtendedFormats", .value = 49, .parameters = &.{} }, + .{ .name = "ImageQuery", .value = 50, .parameters = &.{} }, + .{ .name = "DerivativeControl", .value = 51, .parameters = &.{} }, + .{ .name = "InterpolationFunction", .value = 52, .parameters = &.{} }, + .{ .name = "TransformFeedback", .value = 53, .parameters = &.{} }, + .{ .name = "GeometryStreams", .value = 54, .parameters = &.{} }, + .{ .name = "StorageImageReadWithoutFormat", .value = 55, .parameters = &.{} }, + .{ .name = "StorageImageWriteWithoutFormat", .value = 56, .parameters = &.{} }, + .{ .name = "MultiViewport", .value = 57, .parameters = &.{} }, + .{ .name = "SubgroupDispatch", .value = 58, .parameters = &.{} }, + .{ .name = "NamedBarrier", .value = 59, .parameters = &.{} }, + .{ .name = "PipeStorage", .value = 60, .parameters = &.{} }, + .{ .name = "GroupNonUniform", .value = 61, .parameters = &.{} }, + .{ .name = "GroupNonUniformVote", .value = 62, .parameters = &.{} }, + .{ .name = "GroupNonUniformArithmetic", .value = 63, .parameters = &.{} }, + .{ .name = "GroupNonUniformBallot", .value = 64, .parameters = &.{} }, + .{ .name = "GroupNonUniformShuffle", .value = 65, .parameters = &.{} }, + .{ .name = "GroupNonUniformShuffleRelative", .value = 66, .parameters = &.{} }, + .{ .name = "GroupNonUniformClustered", .value = 67, .parameters = &.{} }, + .{ .name = "GroupNonUniformQuad", .value = 68, .parameters = &.{} }, + .{ .name = "ShaderLayer", .value = 69, .parameters = &.{} }, + .{ .name = "ShaderViewportIndex", .value = 70, .parameters = &.{} }, + .{ .name = "UniformDecoration", .value = 71, .parameters = &.{} }, + .{ .name = "CoreBuiltinsARM", .value = 4165, .parameters = &.{} }, + .{ .name = "TileImageColorReadAccessEXT", .value = 4166, .parameters = &.{} }, + .{ .name = "TileImageDepthReadAccessEXT", .value = 4167, .parameters = &.{} }, + .{ .name = "TileImageStencilReadAccessEXT", .value = 4168, .parameters = &.{} }, + .{ .name = "TensorsARM", .value = 4174, .parameters = &.{} }, + .{ .name = "StorageTensorArrayDynamicIndexingARM", .value = 4175, .parameters = &.{} }, + .{ .name = "StorageTensorArrayNonUniformIndexingARM", .value = 4176, .parameters = &.{} }, + .{ .name = "GraphARM", .value = 4191, .parameters = &.{} }, + .{ .name = "CooperativeMatrixLayoutsARM", .value = 4201, .parameters = &.{} }, + .{ .name = "Float8EXT", .value = 4212, .parameters = &.{} }, + .{ .name = "Float8CooperativeMatrixEXT", .value = 4213, .parameters = &.{} }, + .{ .name = "FragmentShadingRateKHR", .value = 4422, .parameters = &.{} }, + .{ .name = "SubgroupBallotKHR", .value = 4423, .parameters = &.{} }, + .{ .name = "DrawParameters", .value = 4427, .parameters = &.{} }, + .{ .name = "WorkgroupMemoryExplicitLayoutKHR", .value = 4428, .parameters = &.{} }, + .{ .name = "WorkgroupMemoryExplicitLayout8BitAccessKHR", .value = 4429, .parameters = &.{} }, + .{ .name = "WorkgroupMemoryExplicitLayout16BitAccessKHR", .value = 4430, .parameters = &.{} }, + .{ .name = "SubgroupVoteKHR", .value = 4431, .parameters = &.{} }, + .{ .name = "StorageBuffer16BitAccess", .value = 4433, .parameters = &.{} }, + .{ .name = "UniformAndStorageBuffer16BitAccess", .value = 4434, .parameters = &.{} }, + .{ .name = "StoragePushConstant16", .value = 4435, .parameters = &.{} }, + .{ .name = "StorageInputOutput16", .value = 4436, .parameters = &.{} }, + .{ .name = "DeviceGroup", .value = 4437, .parameters = &.{} }, + .{ .name = "MultiView", .value = 4439, .parameters = &.{} }, + .{ .name = "VariablePointersStorageBuffer", .value = 4441, .parameters = &.{} }, + .{ .name = "VariablePointers", .value = 4442, .parameters = &.{} }, + .{ .name = "AtomicStorageOps", .value = 4445, .parameters = &.{} }, + .{ .name = "SampleMaskPostDepthCoverage", .value = 4447, .parameters = &.{} }, + .{ .name = "StorageBuffer8BitAccess", .value = 4448, .parameters = &.{} }, + .{ .name = "UniformAndStorageBuffer8BitAccess", .value = 4449, .parameters = &.{} }, + .{ .name = "StoragePushConstant8", .value = 4450, .parameters = &.{} }, + .{ .name = "DenormPreserve", .value = 4464, .parameters = &.{} }, + .{ .name = "DenormFlushToZero", .value = 4465, .parameters = &.{} }, + .{ .name = "SignedZeroInfNanPreserve", .value = 4466, .parameters = &.{} }, + .{ .name = "RoundingModeRTE", .value = 4467, .parameters = &.{} }, + .{ .name = "RoundingModeRTZ", .value = 4468, .parameters = &.{} }, + .{ .name = "RayQueryProvisionalKHR", .value = 4471, .parameters = &.{} }, + .{ .name = "RayQueryKHR", .value = 4472, .parameters = &.{} }, + .{ .name = "UntypedPointersKHR", .value = 4473, .parameters = &.{} }, + .{ .name = "RayTraversalPrimitiveCullingKHR", .value = 4478, .parameters = &.{} }, + .{ .name = "RayTracingKHR", .value = 4479, .parameters = &.{} }, + .{ .name = "TextureSampleWeightedQCOM", .value = 4484, .parameters = &.{} }, + .{ .name = "TextureBoxFilterQCOM", .value = 4485, .parameters = &.{} }, + .{ .name = "TextureBlockMatchQCOM", .value = 4486, .parameters = &.{} }, + .{ .name = "TileShadingQCOM", .value = 4495, .parameters = &.{} }, + .{ .name = "TextureBlockMatch2QCOM", .value = 4498, .parameters = &.{} }, + .{ .name = "Float16ImageAMD", .value = 5008, .parameters = &.{} }, + .{ .name = "ImageGatherBiasLodAMD", .value = 5009, .parameters = &.{} }, + .{ .name = "FragmentMaskAMD", .value = 5010, .parameters = &.{} }, + .{ .name = "StencilExportEXT", .value = 5013, .parameters = &.{} }, + .{ .name = "ImageReadWriteLodAMD", .value = 5015, .parameters = &.{} }, + .{ .name = "Int64ImageEXT", .value = 5016, .parameters = &.{} }, + .{ .name = "ShaderClockKHR", .value = 5055, .parameters = &.{} }, + .{ .name = "ShaderEnqueueAMDX", .value = 5067, .parameters = &.{} }, + .{ .name = "QuadControlKHR", .value = 5087, .parameters = &.{} }, + .{ .name = "Int4TypeINTEL", .value = 5112, .parameters = &.{} }, + .{ .name = "Int4CooperativeMatrixINTEL", .value = 5114, .parameters = &.{} }, + .{ .name = "BFloat16TypeKHR", .value = 5116, .parameters = &.{} }, + .{ .name = "BFloat16DotProductKHR", .value = 5117, .parameters = &.{} }, + .{ .name = "BFloat16CooperativeMatrixKHR", .value = 5118, .parameters = &.{} }, + .{ .name = "SampleMaskOverrideCoverageNV", .value = 5249, .parameters = &.{} }, + .{ .name = "GeometryShaderPassthroughNV", .value = 5251, .parameters = &.{} }, + .{ .name = "ShaderViewportIndexLayerEXT", .value = 5254, .parameters = &.{} }, + .{ .name = "ShaderViewportMaskNV", .value = 5255, .parameters = &.{} }, + .{ .name = "ShaderStereoViewNV", .value = 5259, .parameters = &.{} }, + .{ .name = "PerViewAttributesNV", .value = 5260, .parameters = &.{} }, + .{ .name = "FragmentFullyCoveredEXT", .value = 5265, .parameters = &.{} }, + .{ .name = "MeshShadingNV", .value = 5266, .parameters = &.{} }, + .{ .name = "ImageFootprintNV", .value = 5282, .parameters = &.{} }, + .{ .name = "MeshShadingEXT", .value = 5283, .parameters = &.{} }, + .{ .name = "FragmentBarycentricKHR", .value = 5284, .parameters = &.{} }, + .{ .name = "ComputeDerivativeGroupQuadsKHR", .value = 5288, .parameters = &.{} }, + .{ .name = "FragmentDensityEXT", .value = 5291, .parameters = &.{} }, + .{ .name = "GroupNonUniformPartitionedNV", .value = 5297, .parameters = &.{} }, + .{ .name = "ShaderNonUniform", .value = 5301, .parameters = &.{} }, + .{ .name = "RuntimeDescriptorArray", .value = 5302, .parameters = &.{} }, + .{ .name = "InputAttachmentArrayDynamicIndexing", .value = 5303, .parameters = &.{} }, + .{ .name = "UniformTexelBufferArrayDynamicIndexing", .value = 5304, .parameters = &.{} }, + .{ .name = "StorageTexelBufferArrayDynamicIndexing", .value = 5305, .parameters = &.{} }, + .{ .name = "UniformBufferArrayNonUniformIndexing", .value = 5306, .parameters = &.{} }, + .{ .name = "SampledImageArrayNonUniformIndexing", .value = 5307, .parameters = &.{} }, + .{ .name = "StorageBufferArrayNonUniformIndexing", .value = 5308, .parameters = &.{} }, + .{ .name = "StorageImageArrayNonUniformIndexing", .value = 5309, .parameters = &.{} }, + .{ .name = "InputAttachmentArrayNonUniformIndexing", .value = 5310, .parameters = &.{} }, + .{ .name = "UniformTexelBufferArrayNonUniformIndexing", .value = 5311, .parameters = &.{} }, + .{ .name = "StorageTexelBufferArrayNonUniformIndexing", .value = 5312, .parameters = &.{} }, + .{ .name = "RayTracingPositionFetchKHR", .value = 5336, .parameters = &.{} }, + .{ .name = "RayTracingNV", .value = 5340, .parameters = &.{} }, + .{ .name = "RayTracingMotionBlurNV", .value = 5341, .parameters = &.{} }, + .{ .name = "VulkanMemoryModel", .value = 5345, .parameters = &.{} }, + .{ .name = "VulkanMemoryModelDeviceScope", .value = 5346, .parameters = &.{} }, + .{ .name = "PhysicalStorageBufferAddresses", .value = 5347, .parameters = &.{} }, + .{ .name = "ComputeDerivativeGroupLinearKHR", .value = 5350, .parameters = &.{} }, + .{ .name = "RayTracingProvisionalKHR", .value = 5353, .parameters = &.{} }, + .{ .name = "CooperativeMatrixNV", .value = 5357, .parameters = &.{} }, + .{ .name = "FragmentShaderSampleInterlockEXT", .value = 5363, .parameters = &.{} }, + .{ .name = "FragmentShaderShadingRateInterlockEXT", .value = 5372, .parameters = &.{} }, + .{ .name = "ShaderSMBuiltinsNV", .value = 5373, .parameters = &.{} }, + .{ .name = "FragmentShaderPixelInterlockEXT", .value = 5378, .parameters = &.{} }, + .{ .name = "DemoteToHelperInvocation", .value = 5379, .parameters = &.{} }, + .{ .name = "DisplacementMicromapNV", .value = 5380, .parameters = &.{} }, + .{ .name = "RayTracingOpacityMicromapEXT", .value = 5381, .parameters = &.{} }, + .{ .name = "ShaderInvocationReorderNV", .value = 5383, .parameters = &.{} }, + .{ .name = "BindlessTextureNV", .value = 5390, .parameters = &.{} }, + .{ .name = "RayQueryPositionFetchKHR", .value = 5391, .parameters = &.{} }, + .{ .name = "CooperativeVectorNV", .value = 5394, .parameters = &.{} }, + .{ .name = "AtomicFloat16VectorNV", .value = 5404, .parameters = &.{} }, + .{ .name = "RayTracingDisplacementMicromapNV", .value = 5409, .parameters = &.{} }, + .{ .name = "RawAccessChainsNV", .value = 5414, .parameters = &.{} }, + .{ .name = "RayTracingSpheresGeometryNV", .value = 5418, .parameters = &.{} }, + .{ .name = "RayTracingLinearSweptSpheresGeometryNV", .value = 5419, .parameters = &.{} }, + .{ .name = "CooperativeMatrixReductionsNV", .value = 5430, .parameters = &.{} }, + .{ .name = "CooperativeMatrixConversionsNV", .value = 5431, .parameters = &.{} }, + .{ .name = "CooperativeMatrixPerElementOperationsNV", .value = 5432, .parameters = &.{} }, + .{ .name = "CooperativeMatrixTensorAddressingNV", .value = 5433, .parameters = &.{} }, + .{ .name = "CooperativeMatrixBlockLoadsNV", .value = 5434, .parameters = &.{} }, + .{ .name = "CooperativeVectorTrainingNV", .value = 5435, .parameters = &.{} }, + .{ .name = "RayTracingClusterAccelerationStructureNV", .value = 5437, .parameters = &.{} }, + .{ .name = "TensorAddressingNV", .value = 5439, .parameters = &.{} }, + .{ .name = "SubgroupShuffleINTEL", .value = 5568, .parameters = &.{} }, + .{ .name = "SubgroupBufferBlockIOINTEL", .value = 5569, .parameters = &.{} }, + .{ .name = "SubgroupImageBlockIOINTEL", .value = 5570, .parameters = &.{} }, + .{ .name = "SubgroupImageMediaBlockIOINTEL", .value = 5579, .parameters = &.{} }, + .{ .name = "RoundToInfinityINTEL", .value = 5582, .parameters = &.{} }, + .{ .name = "FloatingPointModeINTEL", .value = 5583, .parameters = &.{} }, + .{ .name = "IntegerFunctions2INTEL", .value = 5584, .parameters = &.{} }, + .{ .name = "FunctionPointersINTEL", .value = 5603, .parameters = &.{} }, + .{ .name = "IndirectReferencesINTEL", .value = 5604, .parameters = &.{} }, + .{ .name = "AsmINTEL", .value = 5606, .parameters = &.{} }, + .{ .name = "AtomicFloat32MinMaxEXT", .value = 5612, .parameters = &.{} }, + .{ .name = "AtomicFloat64MinMaxEXT", .value = 5613, .parameters = &.{} }, + .{ .name = "AtomicFloat16MinMaxEXT", .value = 5616, .parameters = &.{} }, + .{ .name = "VectorComputeINTEL", .value = 5617, .parameters = &.{} }, + .{ .name = "VectorAnyINTEL", .value = 5619, .parameters = &.{} }, + .{ .name = "ExpectAssumeKHR", .value = 5629, .parameters = &.{} }, + .{ .name = "SubgroupAvcMotionEstimationINTEL", .value = 5696, .parameters = &.{} }, + .{ .name = "SubgroupAvcMotionEstimationIntraINTEL", .value = 5697, .parameters = &.{} }, + .{ .name = "SubgroupAvcMotionEstimationChromaINTEL", .value = 5698, .parameters = &.{} }, + .{ .name = "VariableLengthArrayINTEL", .value = 5817, .parameters = &.{} }, + .{ .name = "FunctionFloatControlINTEL", .value = 5821, .parameters = &.{} }, + .{ .name = "FPGAMemoryAttributesINTEL", .value = 5824, .parameters = &.{} }, + .{ .name = "FPFastMathModeINTEL", .value = 5837, .parameters = &.{} }, + .{ .name = "ArbitraryPrecisionIntegersINTEL", .value = 5844, .parameters = &.{} }, + .{ .name = "ArbitraryPrecisionFloatingPointINTEL", .value = 5845, .parameters = &.{} }, + .{ .name = "UnstructuredLoopControlsINTEL", .value = 5886, .parameters = &.{} }, + .{ .name = "FPGALoopControlsINTEL", .value = 5888, .parameters = &.{} }, + .{ .name = "KernelAttributesINTEL", .value = 5892, .parameters = &.{} }, + .{ .name = "FPGAKernelAttributesINTEL", .value = 5897, .parameters = &.{} }, + .{ .name = "FPGAMemoryAccessesINTEL", .value = 5898, .parameters = &.{} }, + .{ .name = "FPGAClusterAttributesINTEL", .value = 5904, .parameters = &.{} }, + .{ .name = "LoopFuseINTEL", .value = 5906, .parameters = &.{} }, + .{ .name = "FPGADSPControlINTEL", .value = 5908, .parameters = &.{} }, + .{ .name = "MemoryAccessAliasingINTEL", .value = 5910, .parameters = &.{} }, + .{ .name = "FPGAInvocationPipeliningAttributesINTEL", .value = 5916, .parameters = &.{} }, + .{ .name = "FPGABufferLocationINTEL", .value = 5920, .parameters = &.{} }, + .{ .name = "ArbitraryPrecisionFixedPointINTEL", .value = 5922, .parameters = &.{} }, + .{ .name = "USMStorageClassesINTEL", .value = 5935, .parameters = &.{} }, + .{ .name = "RuntimeAlignedAttributeINTEL", .value = 5939, .parameters = &.{} }, + .{ .name = "IOPipesINTEL", .value = 5943, .parameters = &.{} }, + .{ .name = "BlockingPipesINTEL", .value = 5945, .parameters = &.{} }, + .{ .name = "FPGARegINTEL", .value = 5948, .parameters = &.{} }, + .{ .name = "DotProductInputAll", .value = 6016, .parameters = &.{} }, + .{ .name = "DotProductInput4x8Bit", .value = 6017, .parameters = &.{} }, + .{ .name = "DotProductInput4x8BitPacked", .value = 6018, .parameters = &.{} }, + .{ .name = "DotProduct", .value = 6019, .parameters = &.{} }, + .{ .name = "RayCullMaskKHR", .value = 6020, .parameters = &.{} }, + .{ .name = "CooperativeMatrixKHR", .value = 6022, .parameters = &.{} }, + .{ .name = "ReplicatedCompositesEXT", .value = 6024, .parameters = &.{} }, + .{ .name = "BitInstructions", .value = 6025, .parameters = &.{} }, + .{ .name = "GroupNonUniformRotateKHR", .value = 6026, .parameters = &.{} }, + .{ .name = "FloatControls2", .value = 6029, .parameters = &.{} }, + .{ .name = "AtomicFloat32AddEXT", .value = 6033, .parameters = &.{} }, + .{ .name = "AtomicFloat64AddEXT", .value = 6034, .parameters = &.{} }, + .{ .name = "LongCompositesINTEL", .value = 6089, .parameters = &.{} }, + .{ .name = "OptNoneEXT", .value = 6094, .parameters = &.{} }, + .{ .name = "AtomicFloat16AddEXT", .value = 6095, .parameters = &.{} }, + .{ .name = "DebugInfoModuleINTEL", .value = 6114, .parameters = &.{} }, + .{ .name = "BFloat16ConversionINTEL", .value = 6115, .parameters = &.{} }, + .{ .name = "SplitBarrierINTEL", .value = 6141, .parameters = &.{} }, + .{ .name = "ArithmeticFenceEXT", .value = 6144, .parameters = &.{} }, + .{ .name = "FPGAClusterAttributesV2INTEL", .value = 6150, .parameters = &.{} }, + .{ .name = "FPGAKernelAttributesv2INTEL", .value = 6161, .parameters = &.{} }, + .{ .name = "TaskSequenceINTEL", .value = 6162, .parameters = &.{} }, + .{ .name = "FPMaxErrorINTEL", .value = 6169, .parameters = &.{} }, + .{ .name = "FPGALatencyControlINTEL", .value = 6171, .parameters = &.{} }, + .{ .name = "FPGAArgumentInterfacesINTEL", .value = 6174, .parameters = &.{} }, + .{ .name = "GlobalVariableHostAccessINTEL", .value = 6187, .parameters = &.{} }, + .{ .name = "GlobalVariableFPGADecorationsINTEL", .value = 6189, .parameters = &.{} }, + .{ .name = "SubgroupBufferPrefetchINTEL", .value = 6220, .parameters = &.{} }, + .{ .name = "Subgroup2DBlockIOINTEL", .value = 6228, .parameters = &.{} }, + .{ .name = "Subgroup2DBlockTransformINTEL", .value = 6229, .parameters = &.{} }, + .{ .name = "Subgroup2DBlockTransposeINTEL", .value = 6230, .parameters = &.{} }, + .{ .name = "SubgroupMatrixMultiplyAccumulateINTEL", .value = 6236, .parameters = &.{} }, + .{ .name = "TernaryBitwiseFunctionINTEL", .value = 6241, .parameters = &.{} }, + .{ .name = "GroupUniformArithmeticKHR", .value = 6400, .parameters = &.{} }, + .{ .name = "TensorFloat32RoundingINTEL", .value = 6425, .parameters = &.{} }, + .{ .name = "MaskedGatherScatterINTEL", .value = 6427, .parameters = &.{} }, + .{ .name = "CacheControlsINTEL", .value = 6441, .parameters = &.{} }, + .{ .name = "RegisterLimitsINTEL", .value = 6460, .parameters = &.{} }, + .{ .name = "BindlessImagesINTEL", .value = 6528, .parameters = &.{} }, + }, + .ray_query_intersection => &.{ + .{ .name = "RayQueryCandidateIntersectionKHR", .value = 0, .parameters = &.{} }, + .{ .name = "RayQueryCommittedIntersectionKHR", .value = 1, .parameters = &.{} }, + }, + .ray_query_committed_intersection_type => &.{ + .{ .name = "RayQueryCommittedIntersectionNoneKHR", .value = 0, .parameters = &.{} }, + .{ .name = "RayQueryCommittedIntersectionTriangleKHR", .value = 1, .parameters = &.{} }, + .{ .name = "RayQueryCommittedIntersectionGeneratedKHR", .value = 2, .parameters = &.{} }, + }, + .ray_query_candidate_intersection_type => &.{ + .{ .name = "RayQueryCandidateIntersectionTriangleKHR", .value = 0, .parameters = &.{} }, + .{ .name = "RayQueryCandidateIntersectionAABBKHR", .value = 1, .parameters = &.{} }, + }, + .packed_vector_format => &.{ + .{ .name = "PackedVectorFormat4x8Bit", .value = 0, .parameters = &.{} }, + }, + .cooperative_matrix_operands => &.{ + .{ .name = "NoneKHR", .value = 0x0000, .parameters = &.{} }, + .{ .name = "MatrixASignedComponentsKHR", .value = 0x0001, .parameters = &.{} }, + .{ .name = "MatrixBSignedComponentsKHR", .value = 0x0002, .parameters = &.{} }, + .{ .name = "MatrixCSignedComponentsKHR", .value = 0x0004, .parameters = &.{} }, + .{ .name = "MatrixResultSignedComponentsKHR", .value = 0x0008, .parameters = &.{} }, + .{ .name = "SaturatingAccumulationKHR", .value = 0x0010, .parameters = &.{} }, + }, + .cooperative_matrix_layout => &.{ + .{ .name = "RowMajorKHR", .value = 0, .parameters = &.{} }, + .{ .name = "ColumnMajorKHR", .value = 1, .parameters = &.{} }, + .{ .name = "RowBlockedInterleavedARM", .value = 4202, .parameters = &.{} }, + .{ .name = "ColumnBlockedInterleavedARM", .value = 4203, .parameters = &.{} }, + }, + .cooperative_matrix_use => &.{ + .{ .name = "MatrixAKHR", .value = 0, .parameters = &.{} }, + .{ .name = "MatrixBKHR", .value = 1, .parameters = &.{} }, + .{ .name = "MatrixAccumulatorKHR", .value = 2, .parameters = &.{} }, + }, + .cooperative_matrix_reduce => &.{ + .{ .name = "Row", .value = 0x0001, .parameters = &.{} }, + .{ .name = "Column", .value = 0x0002, .parameters = &.{} }, + .{ .name = "2x2", .value = 0x0004, .parameters = &.{} }, + }, + .tensor_clamp_mode => &.{ + .{ .name = "Undefined", .value = 0, .parameters = &.{} }, + .{ .name = "Constant", .value = 1, .parameters = &.{} }, + .{ .name = "ClampToEdge", .value = 2, .parameters = &.{} }, + .{ .name = "Repeat", .value = 3, .parameters = &.{} }, + .{ .name = "RepeatMirrored", .value = 4, .parameters = &.{} }, + }, + .tensor_addressing_operands => &.{ + .{ .name = "TensorView", .value = 0x0001, .parameters = &.{.id_ref} }, + .{ .name = "DecodeFunc", .value = 0x0002, .parameters = &.{.id_ref} }, + }, + .initialization_mode_qualifier => &.{ + .{ .name = "InitOnDeviceReprogramINTEL", .value = 0, .parameters = &.{} }, + .{ .name = "InitOnDeviceResetINTEL", .value = 1, .parameters = &.{} }, + }, + .load_cache_control => &.{ + .{ .name = "UncachedINTEL", .value = 0, .parameters = &.{} }, + .{ .name = "CachedINTEL", .value = 1, .parameters = &.{} }, + .{ .name = "StreamingINTEL", .value = 2, .parameters = &.{} }, + .{ .name = "InvalidateAfterReadINTEL", .value = 3, .parameters = &.{} }, + .{ .name = "ConstCachedINTEL", .value = 4, .parameters = &.{} }, + }, + .store_cache_control => &.{ + .{ .name = "UncachedINTEL", .value = 0, .parameters = &.{} }, + .{ .name = "WriteThroughINTEL", .value = 1, .parameters = &.{} }, + .{ .name = "WriteBackINTEL", .value = 2, .parameters = &.{} }, + .{ .name = "StreamingINTEL", .value = 3, .parameters = &.{} }, + }, + .named_maximum_number_of_registers => &.{ + .{ .name = "AutoINTEL", .value = 0, .parameters = &.{} }, + }, + .matrix_multiply_accumulate_operands => &.{ + .{ .name = "MatrixASignedComponentsINTEL", .value = 0x1, .parameters = &.{} }, + .{ .name = "MatrixBSignedComponentsINTEL", .value = 0x2, .parameters = &.{} }, + .{ .name = "MatrixCBFloat16INTEL", .value = 0x4, .parameters = &.{} }, + .{ .name = "MatrixResultBFloat16INTEL", .value = 0x8, .parameters = &.{} }, + .{ .name = "MatrixAPackedInt8INTEL", .value = 0x10, .parameters = &.{} }, + .{ .name = "MatrixBPackedInt8INTEL", .value = 0x20, .parameters = &.{} }, + .{ .name = "MatrixAPackedInt4INTEL", .value = 0x40, .parameters = &.{} }, + .{ .name = "MatrixBPackedInt4INTEL", .value = 0x80, .parameters = &.{} }, + .{ .name = "MatrixATF32INTEL", .value = 0x100, .parameters = &.{} }, + .{ .name = "MatrixBTF32INTEL", .value = 0x200, .parameters = &.{} }, + .{ .name = "MatrixAPackedFloat16INTEL", .value = 0x400, .parameters = &.{} }, + .{ .name = "MatrixBPackedFloat16INTEL", .value = 0x800, .parameters = &.{} }, + .{ .name = "MatrixAPackedBFloat16INTEL", .value = 0x1000, .parameters = &.{} }, + .{ .name = "MatrixBPackedBFloat16INTEL", .value = 0x2000, .parameters = &.{} }, + }, + .fp_encoding => &.{ + .{ .name = "BFloat16KHR", .value = 0, .parameters = &.{} }, + .{ .name = "Float8E4M3EXT", .value = 4214, .parameters = &.{} }, + .{ .name = "Float8E5M2EXT", .value = 4215, .parameters = &.{} }, + }, + .cooperative_vector_matrix_layout => &.{ + .{ .name = "RowMajorNV", .value = 0, .parameters = &.{} }, + .{ .name = "ColumnMajorNV", .value = 1, .parameters = &.{} }, + .{ .name = "InferencingOptimalNV", .value = 2, .parameters = &.{} }, + .{ .name = "TrainingOptimalNV", .value = 3, .parameters = &.{} }, + }, + .component_type => &.{ + .{ .name = "Float16NV", .value = 0, .parameters = &.{} }, + .{ .name = "Float32NV", .value = 1, .parameters = &.{} }, + .{ .name = "Float64NV", .value = 2, .parameters = &.{} }, + .{ .name = "SignedInt8NV", .value = 3, .parameters = &.{} }, + .{ .name = "SignedInt16NV", .value = 4, .parameters = &.{} }, + .{ .name = "SignedInt32NV", .value = 5, .parameters = &.{} }, + .{ .name = "SignedInt64NV", .value = 6, .parameters = &.{} }, + .{ .name = "UnsignedInt8NV", .value = 7, .parameters = &.{} }, + .{ .name = "UnsignedInt16NV", .value = 8, .parameters = &.{} }, + .{ .name = "UnsignedInt32NV", .value = 9, .parameters = &.{} }, + .{ .name = "UnsignedInt64NV", .value = 10, .parameters = &.{} }, + .{ .name = "SignedInt8PackedNV", .value = 1000491000, .parameters = &.{} }, + .{ .name = "UnsignedInt8PackedNV", .value = 1000491001, .parameters = &.{} }, + .{ .name = "FloatE4M3NV", .value = 1000491002, .parameters = &.{} }, + .{ .name = "FloatE5M2NV", .value = 1000491003, .parameters = &.{} }, + }, + .id_result_type => unreachable, + .id_result => unreachable, + .id_memory_semantics => unreachable, + .id_scope => unreachable, + .id_ref => unreachable, + .literal_integer => unreachable, + .literal_string => unreachable, + .literal_float => unreachable, + .literal_context_dependent_number => unreachable, + .literal_ext_inst_integer => unreachable, + .literal_spec_constant_op_integer => unreachable, + .pair_literal_integer_id_ref => unreachable, + .pair_id_ref_literal_integer => unreachable, + .pair_id_ref_id_ref => unreachable, + .tensor_operands => &.{ + .{ .name = "NoneARM", .value = 0x0000, .parameters = &.{} }, + .{ .name = "NontemporalARM", .value = 0x0001, .parameters = &.{} }, + .{ .name = "OutOfBoundsValueARM", .value = 0x0002, .parameters = &.{.id_ref} }, + .{ .name = "MakeElementAvailableARM", .value = 0x0004, .parameters = &.{.id_ref} }, + .{ .name = "MakeElementVisibleARM", .value = 0x0008, .parameters = &.{.id_ref} }, + .{ .name = "NonPrivateElementARM", .value = 0x0010, .parameters = &.{} }, + }, + .debug_info_debug_info_flags => &.{ + .{ .name = "FlagIsProtected", .value = 0x01, .parameters = &.{} }, + .{ .name = "FlagIsPrivate", .value = 0x02, .parameters = &.{} }, + .{ .name = "FlagIsPublic", .value = 0x03, .parameters = &.{} }, + .{ .name = "FlagIsLocal", .value = 0x04, .parameters = &.{} }, + .{ .name = "FlagIsDefinition", .value = 0x08, .parameters = &.{} }, + .{ .name = "FlagFwdDecl", .value = 0x10, .parameters = &.{} }, + .{ .name = "FlagArtificial", .value = 0x20, .parameters = &.{} }, + .{ .name = "FlagExplicit", .value = 0x40, .parameters = &.{} }, + .{ .name = "FlagPrototyped", .value = 0x80, .parameters = &.{} }, + .{ .name = "FlagObjectPointer", .value = 0x100, .parameters = &.{} }, + .{ .name = "FlagStaticMember", .value = 0x200, .parameters = &.{} }, + .{ .name = "FlagIndirectVariable", .value = 0x400, .parameters = &.{} }, + .{ .name = "FlagLValueReference", .value = 0x800, .parameters = &.{} }, + .{ .name = "FlagRValueReference", .value = 0x1000, .parameters = &.{} }, + .{ .name = "FlagIsOptimized", .value = 0x2000, .parameters = &.{} }, + }, + .debug_info_debug_base_type_attribute_encoding => &.{ + .{ .name = "Unspecified", .value = 0, .parameters = &.{} }, + .{ .name = "Address", .value = 1, .parameters = &.{} }, + .{ .name = "Boolean", .value = 2, .parameters = &.{} }, + .{ .name = "Float", .value = 4, .parameters = &.{} }, + .{ .name = "Signed", .value = 5, .parameters = &.{} }, + .{ .name = "SignedChar", .value = 6, .parameters = &.{} }, + .{ .name = "Unsigned", .value = 7, .parameters = &.{} }, + .{ .name = "UnsignedChar", .value = 8, .parameters = &.{} }, + }, + .debug_info_debug_composite_type => &.{ + .{ .name = "Class", .value = 0, .parameters = &.{} }, + .{ .name = "Structure", .value = 1, .parameters = &.{} }, + .{ .name = "Union", .value = 2, .parameters = &.{} }, + }, + .debug_info_debug_type_qualifier => &.{ + .{ .name = "ConstType", .value = 0, .parameters = &.{} }, + .{ .name = "VolatileType", .value = 1, .parameters = &.{} }, + .{ .name = "RestrictType", .value = 2, .parameters = &.{} }, + }, + .debug_info_debug_operation => &.{ + .{ .name = "Deref", .value = 0, .parameters = &.{} }, + .{ .name = "Plus", .value = 1, .parameters = &.{} }, + .{ .name = "Minus", .value = 2, .parameters = &.{} }, + .{ .name = "PlusUconst", .value = 3, .parameters = &.{.literal_integer} }, + .{ .name = "BitPiece", .value = 4, .parameters = &.{ .literal_integer, .literal_integer } }, + .{ .name = "Swap", .value = 5, .parameters = &.{} }, + .{ .name = "Xderef", .value = 6, .parameters = &.{} }, + .{ .name = "StackValue", .value = 7, .parameters = &.{} }, + .{ .name = "Constu", .value = 8, .parameters = &.{.literal_integer} }, + }, + .open_cl_debug_info_100_debug_info_flags => &.{ + .{ .name = "FlagIsProtected", .value = 0x01, .parameters = &.{} }, + .{ .name = "FlagIsPrivate", .value = 0x02, .parameters = &.{} }, + .{ .name = "FlagIsPublic", .value = 0x03, .parameters = &.{} }, + .{ .name = "FlagIsLocal", .value = 0x04, .parameters = &.{} }, + .{ .name = "FlagIsDefinition", .value = 0x08, .parameters = &.{} }, + .{ .name = "FlagFwdDecl", .value = 0x10, .parameters = &.{} }, + .{ .name = "FlagArtificial", .value = 0x20, .parameters = &.{} }, + .{ .name = "FlagExplicit", .value = 0x40, .parameters = &.{} }, + .{ .name = "FlagPrototyped", .value = 0x80, .parameters = &.{} }, + .{ .name = "FlagObjectPointer", .value = 0x100, .parameters = &.{} }, + .{ .name = "FlagStaticMember", .value = 0x200, .parameters = &.{} }, + .{ .name = "FlagIndirectVariable", .value = 0x400, .parameters = &.{} }, + .{ .name = "FlagLValueReference", .value = 0x800, .parameters = &.{} }, + .{ .name = "FlagRValueReference", .value = 0x1000, .parameters = &.{} }, + .{ .name = "FlagIsOptimized", .value = 0x2000, .parameters = &.{} }, + .{ .name = "FlagIsEnumClass", .value = 0x4000, .parameters = &.{} }, + .{ .name = "FlagTypePassByValue", .value = 0x8000, .parameters = &.{} }, + .{ .name = "FlagTypePassByReference", .value = 0x10000, .parameters = &.{} }, + }, + .open_cl_debug_info_100_debug_base_type_attribute_encoding => &.{ + .{ .name = "Unspecified", .value = 0, .parameters = &.{} }, + .{ .name = "Address", .value = 1, .parameters = &.{} }, + .{ .name = "Boolean", .value = 2, .parameters = &.{} }, + .{ .name = "Float", .value = 3, .parameters = &.{} }, + .{ .name = "Signed", .value = 4, .parameters = &.{} }, + .{ .name = "SignedChar", .value = 5, .parameters = &.{} }, + .{ .name = "Unsigned", .value = 6, .parameters = &.{} }, + .{ .name = "UnsignedChar", .value = 7, .parameters = &.{} }, + }, + .open_cl_debug_info_100_debug_composite_type => &.{ + .{ .name = "Class", .value = 0, .parameters = &.{} }, + .{ .name = "Structure", .value = 1, .parameters = &.{} }, + .{ .name = "Union", .value = 2, .parameters = &.{} }, + }, + .open_cl_debug_info_100_debug_type_qualifier => &.{ + .{ .name = "ConstType", .value = 0, .parameters = &.{} }, + .{ .name = "VolatileType", .value = 1, .parameters = &.{} }, + .{ .name = "RestrictType", .value = 2, .parameters = &.{} }, + .{ .name = "AtomicType", .value = 3, .parameters = &.{} }, + }, + .open_cl_debug_info_100_debug_operation => &.{ + .{ .name = "Deref", .value = 0, .parameters = &.{} }, + .{ .name = "Plus", .value = 1, .parameters = &.{} }, + .{ .name = "Minus", .value = 2, .parameters = &.{} }, + .{ .name = "PlusUconst", .value = 3, .parameters = &.{.literal_integer} }, + .{ .name = "BitPiece", .value = 4, .parameters = &.{ .literal_integer, .literal_integer } }, + .{ .name = "Swap", .value = 5, .parameters = &.{} }, + .{ .name = "Xderef", .value = 6, .parameters = &.{} }, + .{ .name = "StackValue", .value = 7, .parameters = &.{} }, + .{ .name = "Constu", .value = 8, .parameters = &.{.literal_integer} }, + .{ .name = "Fragment", .value = 9, .parameters = &.{ .literal_integer, .literal_integer } }, + }, + .open_cl_debug_info_100_debug_imported_entity => &.{ + .{ .name = "ImportedModule", .value = 0, .parameters = &.{} }, + .{ .name = "ImportedDeclaration", .value = 1, .parameters = &.{} }, + }, + .non_semantic_clspv_reflection_6_kernel_property_flags => &.{ + .{ .name = "MayUsePrintf", .value = 0x1, .parameters = &.{} }, + }, + .non_semantic_shader_debug_info_100_debug_info_flags => &.{ + .{ .name = "FlagIsProtected", .value = 0x01, .parameters = &.{} }, + .{ .name = "FlagIsPrivate", .value = 0x02, .parameters = &.{} }, + .{ .name = "FlagIsPublic", .value = 0x03, .parameters = &.{} }, + .{ .name = "FlagIsLocal", .value = 0x04, .parameters = &.{} }, + .{ .name = "FlagIsDefinition", .value = 0x08, .parameters = &.{} }, + .{ .name = "FlagFwdDecl", .value = 0x10, .parameters = &.{} }, + .{ .name = "FlagArtificial", .value = 0x20, .parameters = &.{} }, + .{ .name = "FlagExplicit", .value = 0x40, .parameters = &.{} }, + .{ .name = "FlagPrototyped", .value = 0x80, .parameters = &.{} }, + .{ .name = "FlagObjectPointer", .value = 0x100, .parameters = &.{} }, + .{ .name = "FlagStaticMember", .value = 0x200, .parameters = &.{} }, + .{ .name = "FlagIndirectVariable", .value = 0x400, .parameters = &.{} }, + .{ .name = "FlagLValueReference", .value = 0x800, .parameters = &.{} }, + .{ .name = "FlagRValueReference", .value = 0x1000, .parameters = &.{} }, + .{ .name = "FlagIsOptimized", .value = 0x2000, .parameters = &.{} }, + .{ .name = "FlagIsEnumClass", .value = 0x4000, .parameters = &.{} }, + .{ .name = "FlagTypePassByValue", .value = 0x8000, .parameters = &.{} }, + .{ .name = "FlagTypePassByReference", .value = 0x10000, .parameters = &.{} }, + .{ .name = "FlagUnknownPhysicalLayout", .value = 0x20000, .parameters = &.{} }, + }, + .non_semantic_shader_debug_info_100_build_identifier_flags => &.{ + .{ .name = "IdentifierPossibleDuplicates", .value = 0x01, .parameters = &.{} }, + }, + .non_semantic_shader_debug_info_100_debug_base_type_attribute_encoding => &.{ + .{ .name = "Unspecified", .value = 0, .parameters = &.{} }, + .{ .name = "Address", .value = 1, .parameters = &.{} }, + .{ .name = "Boolean", .value = 2, .parameters = &.{} }, + .{ .name = "Float", .value = 3, .parameters = &.{} }, + .{ .name = "Signed", .value = 4, .parameters = &.{} }, + .{ .name = "SignedChar", .value = 5, .parameters = &.{} }, + .{ .name = "Unsigned", .value = 6, .parameters = &.{} }, + .{ .name = "UnsignedChar", .value = 7, .parameters = &.{} }, + }, + .non_semantic_shader_debug_info_100_debug_composite_type => &.{ + .{ .name = "Class", .value = 0, .parameters = &.{} }, + .{ .name = "Structure", .value = 1, .parameters = &.{} }, + .{ .name = "Union", .value = 2, .parameters = &.{} }, + }, + .non_semantic_shader_debug_info_100_debug_type_qualifier => &.{ + .{ .name = "ConstType", .value = 0, .parameters = &.{} }, + .{ .name = "VolatileType", .value = 1, .parameters = &.{} }, + .{ .name = "RestrictType", .value = 2, .parameters = &.{} }, + .{ .name = "AtomicType", .value = 3, .parameters = &.{} }, + }, + .non_semantic_shader_debug_info_100_debug_operation => &.{ + .{ .name = "Deref", .value = 0, .parameters = &.{} }, + .{ .name = "Plus", .value = 1, .parameters = &.{} }, + .{ .name = "Minus", .value = 2, .parameters = &.{} }, + .{ .name = "PlusUconst", .value = 3, .parameters = &.{.id_ref} }, + .{ .name = "BitPiece", .value = 4, .parameters = &.{ .id_ref, .id_ref } }, + .{ .name = "Swap", .value = 5, .parameters = &.{} }, + .{ .name = "Xderef", .value = 6, .parameters = &.{} }, + .{ .name = "StackValue", .value = 7, .parameters = &.{} }, + .{ .name = "Constu", .value = 8, .parameters = &.{.id_ref} }, + .{ .name = "Fragment", .value = 9, .parameters = &.{ .id_ref, .id_ref } }, + }, + .non_semantic_shader_debug_info_100_debug_imported_entity => &.{ + .{ .name = "ImportedModule", .value = 0, .parameters = &.{} }, + .{ .name = "ImportedDeclaration", .value = 1, .parameters = &.{} }, }, }; } @@ -1926,14 +1985,34 @@ pub const Opcode = enum(u16) { OpColorAttachmentReadEXT = 4160, OpDepthAttachmentReadEXT = 4161, OpStencilAttachmentReadEXT = 4162, + OpTypeTensorARM = 4163, + OpTensorReadARM = 4164, + OpTensorWriteARM = 4165, + OpTensorQuerySizeARM = 4166, + OpGraphConstantARM = 4181, + OpGraphEntryPointARM = 4182, + OpGraphARM = 4183, + OpGraphInputARM = 4184, + OpGraphSetOutputARM = 4185, + OpGraphEndARM = 4186, + OpTypeGraphARM = 4190, OpTerminateInvocation = 4416, + OpTypeUntypedPointerKHR = 4417, + OpUntypedVariableKHR = 4418, + OpUntypedAccessChainKHR = 4419, + OpUntypedInBoundsAccessChainKHR = 4420, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, + OpUntypedPtrAccessChainKHR = 4423, + OpUntypedInBoundsPtrAccessChainKHR = 4424, + OpUntypedArrayLengthKHR = 4425, + OpUntypedPrefetchKHR = 4426, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefsKHR = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -1950,6 +2029,9 @@ pub const Opcode = enum(u16) { OpCooperativeMatrixStoreKHR = 4458, OpCooperativeMatrixMulAddKHR = 4459, OpCooperativeMatrixLengthKHR = 4460, + OpConstantCompositeReplicateEXT = 4461, + OpSpecConstantCompositeReplicateEXT = 4462, + OpCompositeConstructReplicateEXT = 4463, OpTypeRayQueryKHR = 4472, OpRayQueryInitializeKHR = 4473, OpRayQueryTerminateKHR = 4474, @@ -1976,9 +2058,14 @@ pub const Opcode = enum(u16) { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, - OpFinalizeNodePayloadsAMDX = 5075, + OpAllocateNodePayloadsAMDX = 5074, + OpEnqueueNodePayloadsAMDX = 5075, + OpTypeNodePayloadArrayAMDX = 5076, OpFinishWritingNodePayloadAMDX = 5078, - OpInitializeNodePayloadsAMDX = 5090, + OpNodePayloadArrayLengthAMDX = 5090, + OpIsNodePayloadValidAMDX = 5101, + OpConstantStringAMDX = 5103, + OpSpecConstantStringAMDX = 5104, OpGroupNonUniformQuadAllKHR = 5110, OpGroupNonUniformQuadAnyKHR = 5111, OpHitObjectRecordHitMotionNV = 5249, @@ -2015,12 +2102,20 @@ pub const Opcode = enum(u16) { OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpTypeCooperativeVectorNV = 5288, + OpCooperativeVectorMatrixMulNV = 5289, + OpCooperativeVectorOuterProductAccumulateNV = 5290, + OpCooperativeVectorReduceSumAccumulateNV = 5291, + OpCooperativeVectorMatrixMulAddNV = 5292, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, OpWritePackedPrimitiveIndices4x8NV = 5299, OpFetchMicroTriangleVertexPositionNV = 5300, OpFetchMicroTriangleVertexBarycentricNV = 5301, + OpCooperativeVectorLoadNV = 5302, + OpCooperativeVectorStoreNV = 5303, OpReportIntersectionKHR = 5334, OpIgnoreIntersectionNV = 5335, OpTerminateRayNV = 5336, @@ -2030,6 +2125,8 @@ pub const Opcode = enum(u16) { OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, OpTypeAccelerationStructureKHR = 5341, OpExecuteCallableNV = 5344, + OpRayQueryGetClusterIdNV = 5345, + OpHitObjectGetClusterIdNV = 5346, OpTypeCooperativeMatrixNV = 5358, OpCooperativeMatrixLoadNV = 5359, OpCooperativeMatrixStoreNV = 5360, @@ -2037,8 +2134,25 @@ pub const Opcode = enum(u16) { OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, @@ -2047,6 +2161,19 @@ pub const Opcode = enum(u16) { OpConvertSampledImageToUNV = 5396, OpSamplerImageAddressingModeNV = 5397, OpRawAccessChainNV = 5398, + OpRayQueryGetIntersectionSpherePositionNV = 5427, + OpRayQueryGetIntersectionSphereRadiusNV = 5428, + OpRayQueryGetIntersectionLSSPositionsNV = 5429, + OpRayQueryGetIntersectionLSSRadiiNV = 5430, + OpRayQueryGetIntersectionLSSHitValueNV = 5431, + OpHitObjectGetSpherePositionNV = 5432, + OpHitObjectGetSphereRadiusNV = 5433, + OpHitObjectGetLSSPositionsNV = 5434, + OpHitObjectGetLSSRadiiNV = 5435, + OpHitObjectIsSphereHitNV = 5436, + OpHitObjectIsLSSHitNV = 5437, + OpRayQueryIsSphereHitNV = 5438, + OpRayQueryIsLSSHitNV = 5439, OpSubgroupShuffleINTEL = 5571, OpSubgroupShuffleDownINTEL = 5572, OpSubgroupShuffleUpINTEL = 5573, @@ -2108,6 +2235,20 @@ pub const Opcode = enum(u16) { OpConvertBF16ToFINTEL = 6117, OpControlBarrierArriveINTEL = 6142, OpControlBarrierWaitINTEL = 6143, + OpArithmeticFenceEXT = 6145, + OpTaskSequenceCreateINTEL = 6163, + OpTaskSequenceAsyncINTEL = 6164, + OpTaskSequenceGetINTEL = 6165, + OpTaskSequenceReleaseINTEL = 6166, + OpTypeTaskSequenceINTEL = 6199, + OpSubgroupBlockPrefetchINTEL = 6221, + OpSubgroup2DBlockLoadINTEL = 6231, + OpSubgroup2DBlockLoadTransformINTEL = 6232, + OpSubgroup2DBlockLoadTransposeINTEL = 6233, + OpSubgroup2DBlockPrefetchINTEL = 6234, + OpSubgroup2DBlockStoreINTEL = 6235, + OpSubgroupMatrixMultiplyAccumulateINTEL = 6237, + OpBitwiseFunctionINTEL = 6242, OpGroupIMulKHR = 6401, OpGroupFMulKHR = 6402, OpGroupBitwiseAndKHR = 6403, @@ -2116,1125 +2257,1290 @@ pub const Opcode = enum(u16) { OpGroupLogicalAndKHR = 6406, OpGroupLogicalOrKHR = 6407, OpGroupLogicalXorKHR = 6408, + OpRoundFToTF32INTEL = 6426, OpMaskedGatherINTEL = 6428, OpMaskedScatterINTEL = 6429, - pub const OpSDotKHR = Opcode.OpSDot; - pub const OpUDotKHR = Opcode.OpUDot; - pub const OpSUDotKHR = Opcode.OpSUDot; - pub const OpSDotAccSatKHR = Opcode.OpSDotAccSat; - pub const OpUDotAccSatKHR = Opcode.OpUDotAccSat; - pub const OpSUDotAccSatKHR = Opcode.OpSUDotAccSat; - pub const OpReportIntersectionNV = Opcode.OpReportIntersectionKHR; - pub const OpTypeAccelerationStructureNV = Opcode.OpTypeAccelerationStructureKHR; - pub const OpDemoteToHelperInvocationEXT = Opcode.OpDemoteToHelperInvocation; - pub const OpDecorateStringGOOGLE = Opcode.OpDecorateString; - pub const OpMemberDecorateStringGOOGLE = Opcode.OpMemberDecorateString; + OpConvertHandleToImageINTEL = 6529, + OpConvertHandleToSamplerINTEL = 6530, + OpConvertHandleToSampledImageINTEL = 6531, pub fn Operands(comptime self: Opcode) type { return switch (self) { .OpNop => void, - .OpUndef => struct { id_result_type: IdResultType, id_result: IdResult }, + .OpUndef => struct { id_result_type: Id, id_result: Id }, .OpSourceContinued => struct { continued_source: LiteralString }, - .OpSource => struct { source_language: SourceLanguage, version: LiteralInteger, file: ?IdRef = null, source: ?LiteralString = null }, + .OpSource => struct { source_language: SourceLanguage, version: LiteralInteger, file: ?Id = null, source: ?LiteralString = null }, .OpSourceExtension => struct { extension: LiteralString }, - .OpName => struct { target: IdRef, name: LiteralString }, - .OpMemberName => struct { type: IdRef, member: LiteralInteger, name: LiteralString }, - .OpString => struct { id_result: IdResult, string: LiteralString }, - .OpLine => struct { file: IdRef, line: LiteralInteger, column: LiteralInteger }, + .OpName => struct { target: Id, name: LiteralString }, + .OpMemberName => struct { type: Id, member: LiteralInteger, name: LiteralString }, + .OpString => struct { id_result: Id, string: LiteralString }, + .OpLine => struct { file: Id, line: LiteralInteger, column: LiteralInteger }, .OpExtension => struct { name: LiteralString }, - .OpExtInstImport => struct { id_result: IdResult, name: LiteralString }, - .OpExtInst => struct { id_result_type: IdResultType, id_result: IdResult, set: IdRef, instruction: LiteralExtInstInteger, id_ref_4: []const IdRef = &.{} }, + .OpExtInstImport => struct { id_result: Id, name: LiteralString }, + .OpExtInst => struct { id_result_type: Id, id_result: Id, set: Id, instruction: LiteralExtInstInteger, id_ref_4: []const Id = &.{} }, .OpMemoryModel => struct { addressing_model: AddressingModel, memory_model: MemoryModel }, - .OpEntryPoint => struct { execution_model: ExecutionModel, entry_point: IdRef, name: LiteralString, interface: []const IdRef = &.{} }, - .OpExecutionMode => struct { entry_point: IdRef, mode: ExecutionMode.Extended }, + .OpEntryPoint => struct { execution_model: ExecutionModel, entry_point: Id, name: LiteralString, interface: []const Id = &.{} }, + .OpExecutionMode => struct { entry_point: Id, mode: ExecutionMode.Extended }, .OpCapability => struct { capability: Capability }, - .OpTypeVoid => struct { id_result: IdResult }, - .OpTypeBool => struct { id_result: IdResult }, - .OpTypeInt => struct { id_result: IdResult, width: LiteralInteger, signedness: LiteralInteger }, - .OpTypeFloat => struct { id_result: IdResult, width: LiteralInteger }, - .OpTypeVector => struct { id_result: IdResult, component_type: IdRef, component_count: LiteralInteger }, - .OpTypeMatrix => struct { id_result: IdResult, column_type: IdRef, column_count: LiteralInteger }, - .OpTypeImage => struct { id_result: IdResult, sampled_type: IdRef, dim: Dim, depth: LiteralInteger, arrayed: LiteralInteger, ms: LiteralInteger, sampled: LiteralInteger, image_format: ImageFormat, access_qualifier: ?AccessQualifier = null }, - .OpTypeSampler => struct { id_result: IdResult }, - .OpTypeSampledImage => struct { id_result: IdResult, image_type: IdRef }, - .OpTypeArray => struct { id_result: IdResult, element_type: IdRef, length: IdRef }, - .OpTypeRuntimeArray => struct { id_result: IdResult, element_type: IdRef }, - .OpTypeStruct => struct { id_result: IdResult, id_ref: []const IdRef = &.{} }, - .OpTypeOpaque => struct { id_result: IdResult, literal_string: LiteralString }, - .OpTypePointer => struct { id_result: IdResult, storage_class: StorageClass, type: IdRef }, - .OpTypeFunction => struct { id_result: IdResult, return_type: IdRef, id_ref_2: []const IdRef = &.{} }, - .OpTypeEvent => struct { id_result: IdResult }, - .OpTypeDeviceEvent => struct { id_result: IdResult }, - .OpTypeReserveId => struct { id_result: IdResult }, - .OpTypeQueue => struct { id_result: IdResult }, - .OpTypePipe => struct { id_result: IdResult, qualifier: AccessQualifier }, - .OpTypeForwardPointer => struct { pointer_type: IdRef, storage_class: StorageClass }, - .OpConstantTrue => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpConstantFalse => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpConstant => struct { id_result_type: IdResultType, id_result: IdResult, value: LiteralContextDependentNumber }, - .OpConstantComposite => struct { id_result_type: IdResultType, id_result: IdResult, constituents: []const IdRef = &.{} }, - .OpConstantSampler => struct { id_result_type: IdResultType, id_result: IdResult, sampler_addressing_mode: SamplerAddressingMode, param: LiteralInteger, sampler_filter_mode: SamplerFilterMode }, - .OpConstantNull => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpSpecConstantTrue => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpSpecConstantFalse => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpSpecConstant => struct { id_result_type: IdResultType, id_result: IdResult, value: LiteralContextDependentNumber }, - .OpSpecConstantComposite => struct { id_result_type: IdResultType, id_result: IdResult, constituents: []const IdRef = &.{} }, - .OpSpecConstantOp => struct { id_result_type: IdResultType, id_result: IdResult, opcode: LiteralSpecConstantOpInteger }, - .OpFunction => struct { id_result_type: IdResultType, id_result: IdResult, function_control: FunctionControl, function_type: IdRef }, - .OpFunctionParameter => struct { id_result_type: IdResultType, id_result: IdResult }, + .OpTypeVoid => struct { id_result: Id }, + .OpTypeBool => struct { id_result: Id }, + .OpTypeInt => struct { id_result: Id, width: LiteralInteger, signedness: LiteralInteger }, + .OpTypeFloat => struct { id_result: Id, width: LiteralInteger, floating_point_encoding: ?FPEncoding = null }, + .OpTypeVector => struct { id_result: Id, component_type: Id, component_count: LiteralInteger }, + .OpTypeMatrix => struct { id_result: Id, column_type: Id, column_count: LiteralInteger }, + .OpTypeImage => struct { id_result: Id, sampled_type: Id, dim: Dim, depth: LiteralInteger, arrayed: LiteralInteger, ms: LiteralInteger, sampled: LiteralInteger, image_format: ImageFormat, access_qualifier: ?AccessQualifier = null }, + .OpTypeSampler => struct { id_result: Id }, + .OpTypeSampledImage => struct { id_result: Id, image_type: Id }, + .OpTypeArray => struct { id_result: Id, element_type: Id, length: Id }, + .OpTypeRuntimeArray => struct { id_result: Id, element_type: Id }, + .OpTypeStruct => struct { id_result: Id, id_ref: []const Id = &.{} }, + .OpTypeOpaque => struct { id_result: Id, literal_string: LiteralString }, + .OpTypePointer => struct { id_result: Id, storage_class: StorageClass, type: Id }, + .OpTypeFunction => struct { id_result: Id, return_type: Id, id_ref_2: []const Id = &.{} }, + .OpTypeEvent => struct { id_result: Id }, + .OpTypeDeviceEvent => struct { id_result: Id }, + .OpTypeReserveId => struct { id_result: Id }, + .OpTypeQueue => struct { id_result: Id }, + .OpTypePipe => struct { id_result: Id, qualifier: AccessQualifier }, + .OpTypeForwardPointer => struct { pointer_type: Id, storage_class: StorageClass }, + .OpConstantTrue => struct { id_result_type: Id, id_result: Id }, + .OpConstantFalse => struct { id_result_type: Id, id_result: Id }, + .OpConstant => struct { id_result_type: Id, id_result: Id, value: LiteralContextDependentNumber }, + .OpConstantComposite => struct { id_result_type: Id, id_result: Id, constituents: []const Id = &.{} }, + .OpConstantSampler => struct { id_result_type: Id, id_result: Id, sampler_addressing_mode: SamplerAddressingMode, param: LiteralInteger, sampler_filter_mode: SamplerFilterMode }, + .OpConstantNull => struct { id_result_type: Id, id_result: Id }, + .OpSpecConstantTrue => struct { id_result_type: Id, id_result: Id }, + .OpSpecConstantFalse => struct { id_result_type: Id, id_result: Id }, + .OpSpecConstant => struct { id_result_type: Id, id_result: Id, value: LiteralContextDependentNumber }, + .OpSpecConstantComposite => struct { id_result_type: Id, id_result: Id, constituents: []const Id = &.{} }, + .OpSpecConstantOp => struct { id_result_type: Id, id_result: Id, opcode: LiteralSpecConstantOpInteger }, + .OpFunction => struct { id_result_type: Id, id_result: Id, function_control: FunctionControl, function_type: Id }, + .OpFunctionParameter => struct { id_result_type: Id, id_result: Id }, .OpFunctionEnd => void, - .OpFunctionCall => struct { id_result_type: IdResultType, id_result: IdResult, function: IdRef, id_ref_3: []const IdRef = &.{} }, - .OpVariable => struct { id_result_type: IdResultType, id_result: IdResult, storage_class: StorageClass, initializer: ?IdRef = null }, - .OpImageTexelPointer => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, sample: IdRef }, - .OpLoad => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory_access: ?MemoryAccess.Extended = null }, - .OpStore => struct { pointer: IdRef, object: IdRef, memory_access: ?MemoryAccess.Extended = null }, - .OpCopyMemory => struct { target: IdRef, source: IdRef, memory_access_2: ?MemoryAccess.Extended = null, memory_access_3: ?MemoryAccess.Extended = null }, - .OpCopyMemorySized => struct { target: IdRef, source: IdRef, size: IdRef, memory_access_3: ?MemoryAccess.Extended = null, memory_access_4: ?MemoryAccess.Extended = null }, - .OpAccessChain => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, indexes: []const IdRef = &.{} }, - .OpInBoundsAccessChain => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, indexes: []const IdRef = &.{} }, - .OpPtrAccessChain => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, element: IdRef, indexes: []const IdRef = &.{} }, - .OpArrayLength => struct { id_result_type: IdResultType, id_result: IdResult, structure: IdRef, array_member: LiteralInteger }, - .OpGenericPtrMemSemantics => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef }, - .OpInBoundsPtrAccessChain => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, element: IdRef, indexes: []const IdRef = &.{} }, - .OpDecorate => struct { target: IdRef, decoration: Decoration.Extended }, - .OpMemberDecorate => struct { structure_type: IdRef, member: LiteralInteger, decoration: Decoration.Extended }, - .OpDecorationGroup => struct { id_result: IdResult }, - .OpGroupDecorate => struct { decoration_group: IdRef, targets: []const IdRef = &.{} }, - .OpGroupMemberDecorate => struct { decoration_group: IdRef, targets: []const PairIdRefLiteralInteger = &.{} }, - .OpVectorExtractDynamic => struct { id_result_type: IdResultType, id_result: IdResult, vector: IdRef, index: IdRef }, - .OpVectorInsertDynamic => struct { id_result_type: IdResultType, id_result: IdResult, vector: IdRef, component: IdRef, index: IdRef }, - .OpVectorShuffle => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, components: []const LiteralInteger = &.{} }, - .OpCompositeConstruct => struct { id_result_type: IdResultType, id_result: IdResult, constituents: []const IdRef = &.{} }, - .OpCompositeExtract => struct { id_result_type: IdResultType, id_result: IdResult, composite: IdRef, indexes: []const LiteralInteger = &.{} }, - .OpCompositeInsert => struct { id_result_type: IdResultType, id_result: IdResult, object: IdRef, composite: IdRef, indexes: []const LiteralInteger = &.{} }, - .OpCopyObject => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpTranspose => struct { id_result_type: IdResultType, id_result: IdResult, matrix: IdRef }, - .OpSampledImage => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, sampler: IdRef }, - .OpImageSampleImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSampleExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSampleDrefImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSampleDrefExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSampleProjImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSampleProjExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSampleProjDrefImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSampleProjDrefExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ImageOperands.Extended }, - .OpImageFetch => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageGather => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, component: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageDrefGather => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageRead => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageWrite => struct { image: IdRef, coordinate: IdRef, texel: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImage => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef }, - .OpImageQueryFormat => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef }, - .OpImageQueryOrder => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef }, - .OpImageQuerySizeLod => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, level_of_detail: IdRef }, - .OpImageQuerySize => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef }, - .OpImageQueryLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef }, - .OpImageQueryLevels => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef }, - .OpImageQuerySamples => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef }, - .OpConvertFToU => struct { id_result_type: IdResultType, id_result: IdResult, float_value: IdRef }, - .OpConvertFToS => struct { id_result_type: IdResultType, id_result: IdResult, float_value: IdRef }, - .OpConvertSToF => struct { id_result_type: IdResultType, id_result: IdResult, signed_value: IdRef }, - .OpConvertUToF => struct { id_result_type: IdResultType, id_result: IdResult, unsigned_value: IdRef }, - .OpUConvert => struct { id_result_type: IdResultType, id_result: IdResult, unsigned_value: IdRef }, - .OpSConvert => struct { id_result_type: IdResultType, id_result: IdResult, signed_value: IdRef }, - .OpFConvert => struct { id_result_type: IdResultType, id_result: IdResult, float_value: IdRef }, - .OpQuantizeToF16 => struct { id_result_type: IdResultType, id_result: IdResult, value: IdRef }, - .OpConvertPtrToU => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef }, - .OpSatConvertSToU => struct { id_result_type: IdResultType, id_result: IdResult, signed_value: IdRef }, - .OpSatConvertUToS => struct { id_result_type: IdResultType, id_result: IdResult, unsigned_value: IdRef }, - .OpConvertUToPtr => struct { id_result_type: IdResultType, id_result: IdResult, integer_value: IdRef }, - .OpPtrCastToGeneric => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef }, - .OpGenericCastToPtr => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef }, - .OpGenericCastToPtrExplicit => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, storage: StorageClass }, - .OpBitcast => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpSNegate => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpFNegate => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpIAdd => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFAdd => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpISub => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFSub => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpIMul => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFMul => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUDiv => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSDiv => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFDiv => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUMod => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSRem => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSMod => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFRem => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFMod => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpVectorTimesScalar => struct { id_result_type: IdResultType, id_result: IdResult, vector: IdRef, scalar: IdRef }, - .OpMatrixTimesScalar => struct { id_result_type: IdResultType, id_result: IdResult, matrix: IdRef, scalar: IdRef }, - .OpVectorTimesMatrix => struct { id_result_type: IdResultType, id_result: IdResult, vector: IdRef, matrix: IdRef }, - .OpMatrixTimesVector => struct { id_result_type: IdResultType, id_result: IdResult, matrix: IdRef, vector: IdRef }, - .OpMatrixTimesMatrix => struct { id_result_type: IdResultType, id_result: IdResult, leftmatrix: IdRef, rightmatrix: IdRef }, - .OpOuterProduct => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef }, - .OpDot => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef }, - .OpIAddCarry => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpISubBorrow => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUMulExtended => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSMulExtended => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpAny => struct { id_result_type: IdResultType, id_result: IdResult, vector: IdRef }, - .OpAll => struct { id_result_type: IdResultType, id_result: IdResult, vector: IdRef }, - .OpIsNan => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef }, - .OpIsInf => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef }, - .OpIsFinite => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef }, - .OpIsNormal => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef }, - .OpSignBitSet => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef }, - .OpLessOrGreater => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef, y: IdRef }, - .OpOrdered => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef, y: IdRef }, - .OpUnordered => struct { id_result_type: IdResultType, id_result: IdResult, x: IdRef, y: IdRef }, - .OpLogicalEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpLogicalNotEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpLogicalOr => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpLogicalAnd => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpLogicalNot => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpSelect => struct { id_result_type: IdResultType, id_result: IdResult, condition: IdRef, object_1: IdRef, object_2: IdRef }, - .OpIEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpINotEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUGreaterThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSGreaterThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUGreaterThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSGreaterThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpULessThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSLessThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpULessThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpSLessThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFOrdEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFUnordEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFOrdNotEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFUnordNotEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFOrdLessThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFUnordLessThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFOrdGreaterThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFUnordGreaterThan => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFOrdLessThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFUnordLessThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFOrdGreaterThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpFUnordGreaterThanEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpShiftRightLogical => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, shift: IdRef }, - .OpShiftRightArithmetic => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, shift: IdRef }, - .OpShiftLeftLogical => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, shift: IdRef }, - .OpBitwiseOr => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpBitwiseXor => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpBitwiseAnd => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpNot => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpBitFieldInsert => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, insert: IdRef, offset: IdRef, count: IdRef }, - .OpBitFieldSExtract => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, offset: IdRef, count: IdRef }, - .OpBitFieldUExtract => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, offset: IdRef, count: IdRef }, - .OpBitReverse => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef }, - .OpBitCount => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef }, - .OpDPdx => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpDPdy => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpFwidth => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpDPdxFine => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpDPdyFine => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpFwidthFine => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpDPdxCoarse => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpDPdyCoarse => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, - .OpFwidthCoarse => struct { id_result_type: IdResultType, id_result: IdResult, p: IdRef }, + .OpFunctionCall => struct { id_result_type: Id, id_result: Id, function: Id, id_ref_3: []const Id = &.{} }, + .OpVariable => struct { id_result_type: Id, id_result: Id, storage_class: StorageClass, initializer: ?Id = null }, + .OpImageTexelPointer => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, sample: Id }, + .OpLoad => struct { id_result_type: Id, id_result: Id, pointer: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpStore => struct { pointer: Id, object: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpCopyMemory => struct { target: Id, source: Id, memory_access_2: ?MemoryAccess.Extended = null, memory_access_3: ?MemoryAccess.Extended = null }, + .OpCopyMemorySized => struct { target: Id, source: Id, size: Id, memory_access_3: ?MemoryAccess.Extended = null, memory_access_4: ?MemoryAccess.Extended = null }, + .OpAccessChain => struct { id_result_type: Id, id_result: Id, base: Id, indexes: []const Id = &.{} }, + .OpInBoundsAccessChain => struct { id_result_type: Id, id_result: Id, base: Id, indexes: []const Id = &.{} }, + .OpPtrAccessChain => struct { id_result_type: Id, id_result: Id, base: Id, element: Id, indexes: []const Id = &.{} }, + .OpArrayLength => struct { id_result_type: Id, id_result: Id, structure: Id, array_member: LiteralInteger }, + .OpGenericPtrMemSemantics => struct { id_result_type: Id, id_result: Id, pointer: Id }, + .OpInBoundsPtrAccessChain => struct { id_result_type: Id, id_result: Id, base: Id, element: Id, indexes: []const Id = &.{} }, + .OpDecorate => struct { target: Id, decoration: Decoration.Extended }, + .OpMemberDecorate => struct { structure_type: Id, member: LiteralInteger, decoration: Decoration.Extended }, + .OpDecorationGroup => struct { id_result: Id }, + .OpGroupDecorate => struct { decoration_group: Id, targets: []const Id = &.{} }, + .OpGroupMemberDecorate => struct { decoration_group: Id, targets: []const PairIdRefLiteralInteger = &.{} }, + .OpVectorExtractDynamic => struct { id_result_type: Id, id_result: Id, vector: Id, index: Id }, + .OpVectorInsertDynamic => struct { id_result_type: Id, id_result: Id, vector: Id, component: Id, index: Id }, + .OpVectorShuffle => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, components: []const LiteralInteger = &.{} }, + .OpCompositeConstruct => struct { id_result_type: Id, id_result: Id, constituents: []const Id = &.{} }, + .OpCompositeExtract => struct { id_result_type: Id, id_result: Id, composite: Id, indexes: []const LiteralInteger = &.{} }, + .OpCompositeInsert => struct { id_result_type: Id, id_result: Id, object: Id, composite: Id, indexes: []const LiteralInteger = &.{} }, + .OpCopyObject => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpTranspose => struct { id_result_type: Id, id_result: Id, matrix: Id }, + .OpSampledImage => struct { id_result_type: Id, id_result: Id, image: Id, sampler: Id }, + .OpImageSampleImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSampleExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ImageOperands.Extended }, + .OpImageSampleDrefImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSampleDrefExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ImageOperands.Extended }, + .OpImageSampleProjImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSampleProjExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ImageOperands.Extended }, + .OpImageSampleProjDrefImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSampleProjDrefExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ImageOperands.Extended }, + .OpImageFetch => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageGather => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, component: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageDrefGather => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageRead => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageWrite => struct { image: Id, coordinate: Id, texel: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImage => struct { id_result_type: Id, id_result: Id, sampled_image: Id }, + .OpImageQueryFormat => struct { id_result_type: Id, id_result: Id, image: Id }, + .OpImageQueryOrder => struct { id_result_type: Id, id_result: Id, image: Id }, + .OpImageQuerySizeLod => struct { id_result_type: Id, id_result: Id, image: Id, level_of_detail: Id }, + .OpImageQuerySize => struct { id_result_type: Id, id_result: Id, image: Id }, + .OpImageQueryLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id }, + .OpImageQueryLevels => struct { id_result_type: Id, id_result: Id, image: Id }, + .OpImageQuerySamples => struct { id_result_type: Id, id_result: Id, image: Id }, + .OpConvertFToU => struct { id_result_type: Id, id_result: Id, float_value: Id }, + .OpConvertFToS => struct { id_result_type: Id, id_result: Id, float_value: Id }, + .OpConvertSToF => struct { id_result_type: Id, id_result: Id, signed_value: Id }, + .OpConvertUToF => struct { id_result_type: Id, id_result: Id, unsigned_value: Id }, + .OpUConvert => struct { id_result_type: Id, id_result: Id, unsigned_value: Id }, + .OpSConvert => struct { id_result_type: Id, id_result: Id, signed_value: Id }, + .OpFConvert => struct { id_result_type: Id, id_result: Id, float_value: Id }, + .OpQuantizeToF16 => struct { id_result_type: Id, id_result: Id, value: Id }, + .OpConvertPtrToU => struct { id_result_type: Id, id_result: Id, pointer: Id }, + .OpSatConvertSToU => struct { id_result_type: Id, id_result: Id, signed_value: Id }, + .OpSatConvertUToS => struct { id_result_type: Id, id_result: Id, unsigned_value: Id }, + .OpConvertUToPtr => struct { id_result_type: Id, id_result: Id, integer_value: Id }, + .OpPtrCastToGeneric => struct { id_result_type: Id, id_result: Id, pointer: Id }, + .OpGenericCastToPtr => struct { id_result_type: Id, id_result: Id, pointer: Id }, + .OpGenericCastToPtrExplicit => struct { id_result_type: Id, id_result: Id, pointer: Id, storage: StorageClass }, + .OpBitcast => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpSNegate => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpFNegate => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpIAdd => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFAdd => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpISub => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFSub => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpIMul => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFMul => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUDiv => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSDiv => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFDiv => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUMod => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSRem => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSMod => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFRem => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFMod => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpVectorTimesScalar => struct { id_result_type: Id, id_result: Id, vector: Id, scalar: Id }, + .OpMatrixTimesScalar => struct { id_result_type: Id, id_result: Id, matrix: Id, scalar: Id }, + .OpVectorTimesMatrix => struct { id_result_type: Id, id_result: Id, vector: Id, matrix: Id }, + .OpMatrixTimesVector => struct { id_result_type: Id, id_result: Id, matrix: Id, vector: Id }, + .OpMatrixTimesMatrix => struct { id_result_type: Id, id_result: Id, left_matrix: Id, right_matrix: Id }, + .OpOuterProduct => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id }, + .OpDot => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id }, + .OpIAddCarry => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpISubBorrow => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUMulExtended => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSMulExtended => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpAny => struct { id_result_type: Id, id_result: Id, vector: Id }, + .OpAll => struct { id_result_type: Id, id_result: Id, vector: Id }, + .OpIsNan => struct { id_result_type: Id, id_result: Id, x: Id }, + .OpIsInf => struct { id_result_type: Id, id_result: Id, x: Id }, + .OpIsFinite => struct { id_result_type: Id, id_result: Id, x: Id }, + .OpIsNormal => struct { id_result_type: Id, id_result: Id, x: Id }, + .OpSignBitSet => struct { id_result_type: Id, id_result: Id, x: Id }, + .OpLessOrGreater => struct { id_result_type: Id, id_result: Id, x: Id, y: Id }, + .OpOrdered => struct { id_result_type: Id, id_result: Id, x: Id, y: Id }, + .OpUnordered => struct { id_result_type: Id, id_result: Id, x: Id, y: Id }, + .OpLogicalEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpLogicalNotEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpLogicalOr => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpLogicalAnd => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpLogicalNot => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpSelect => struct { id_result_type: Id, id_result: Id, condition: Id, object_1: Id, object_2: Id }, + .OpIEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpINotEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUGreaterThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSGreaterThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUGreaterThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSGreaterThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpULessThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSLessThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpULessThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpSLessThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFOrdEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFUnordEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFOrdNotEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFUnordNotEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFOrdLessThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFUnordLessThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFOrdGreaterThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFUnordGreaterThan => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFOrdLessThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFUnordLessThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFOrdGreaterThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpFUnordGreaterThanEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpShiftRightLogical => struct { id_result_type: Id, id_result: Id, base: Id, shift: Id }, + .OpShiftRightArithmetic => struct { id_result_type: Id, id_result: Id, base: Id, shift: Id }, + .OpShiftLeftLogical => struct { id_result_type: Id, id_result: Id, base: Id, shift: Id }, + .OpBitwiseOr => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpBitwiseXor => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpBitwiseAnd => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpNot => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpBitFieldInsert => struct { id_result_type: Id, id_result: Id, base: Id, insert: Id, offset: Id, count: Id }, + .OpBitFieldSExtract => struct { id_result_type: Id, id_result: Id, base: Id, offset: Id, count: Id }, + .OpBitFieldUExtract => struct { id_result_type: Id, id_result: Id, base: Id, offset: Id, count: Id }, + .OpBitReverse => struct { id_result_type: Id, id_result: Id, base: Id }, + .OpBitCount => struct { id_result_type: Id, id_result: Id, base: Id }, + .OpDPdx => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpDPdy => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpFwidth => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpDPdxFine => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpDPdyFine => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpFwidthFine => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpDPdxCoarse => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpDPdyCoarse => struct { id_result_type: Id, id_result: Id, p: Id }, + .OpFwidthCoarse => struct { id_result_type: Id, id_result: Id, p: Id }, .OpEmitVertex => void, .OpEndPrimitive => void, - .OpEmitStreamVertex => struct { stream: IdRef }, - .OpEndStreamPrimitive => struct { stream: IdRef }, - .OpControlBarrier => struct { execution: IdScope, memory: IdScope, semantics: IdMemorySemantics }, - .OpMemoryBarrier => struct { memory: IdScope, semantics: IdMemorySemantics }, - .OpAtomicLoad => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics }, - .OpAtomicStore => struct { pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicExchange => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicCompareExchange => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, equal: IdMemorySemantics, unequal: IdMemorySemantics, value: IdRef, comparator: IdRef }, - .OpAtomicCompareExchangeWeak => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, equal: IdMemorySemantics, unequal: IdMemorySemantics, value: IdRef, comparator: IdRef }, - .OpAtomicIIncrement => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics }, - .OpAtomicIDecrement => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics }, - .OpAtomicIAdd => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicISub => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicSMin => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicUMin => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicSMax => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicUMax => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicAnd => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicOr => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicXor => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpPhi => struct { id_result_type: IdResultType, id_result: IdResult, pair_id_ref_id_ref: []const PairIdRefIdRef = &.{} }, - .OpLoopMerge => struct { merge_block: IdRef, continue_target: IdRef, loop_control: LoopControl.Extended }, - .OpSelectionMerge => struct { merge_block: IdRef, selection_control: SelectionControl }, - .OpLabel => struct { id_result: IdResult }, - .OpBranch => struct { target_label: IdRef }, - .OpBranchConditional => struct { condition: IdRef, true_label: IdRef, false_label: IdRef, branch_weights: []const LiteralInteger = &.{} }, - .OpSwitch => struct { selector: IdRef, default: IdRef, target: []const PairLiteralIntegerIdRef = &.{} }, + .OpEmitStreamVertex => struct { stream: Id }, + .OpEndStreamPrimitive => struct { stream: Id }, + .OpControlBarrier => struct { execution: Id, memory: Id, semantics: Id }, + .OpMemoryBarrier => struct { memory: Id, semantics: Id }, + .OpAtomicLoad => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id }, + .OpAtomicStore => struct { pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicExchange => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicCompareExchange => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, equal: Id, unequal: Id, value: Id, comparator: Id }, + .OpAtomicCompareExchangeWeak => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, equal: Id, unequal: Id, value: Id, comparator: Id }, + .OpAtomicIIncrement => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id }, + .OpAtomicIDecrement => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id }, + .OpAtomicIAdd => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicISub => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicSMin => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicUMin => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicSMax => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicUMax => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicAnd => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicOr => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicXor => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpPhi => struct { id_result_type: Id, id_result: Id, pair_id_ref_id_ref: []const PairIdRefIdRef = &.{} }, + .OpLoopMerge => struct { merge_block: Id, continue_target: Id, loop_control: LoopControl.Extended }, + .OpSelectionMerge => struct { merge_block: Id, selection_control: SelectionControl }, + .OpLabel => struct { id_result: Id }, + .OpBranch => struct { target_label: Id }, + .OpBranchConditional => struct { condition: Id, true_label: Id, false_label: Id, branch_weights: []const LiteralInteger = &.{} }, + .OpSwitch => struct { selector: Id, default: Id, target: []const PairLiteralIntegerIdRef = &.{} }, .OpKill => void, .OpReturn => void, - .OpReturnValue => struct { value: IdRef }, + .OpReturnValue => struct { value: Id }, .OpUnreachable => void, - .OpLifetimeStart => struct { pointer: IdRef, size: LiteralInteger }, - .OpLifetimeStop => struct { pointer: IdRef, size: LiteralInteger }, - .OpGroupAsyncCopy => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, destination: IdRef, source: IdRef, num_elements: IdRef, stride: IdRef, event: IdRef }, - .OpGroupWaitEvents => struct { execution: IdScope, num_events: IdRef, events_list: IdRef }, - .OpGroupAll => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, predicate: IdRef }, - .OpGroupAny => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, predicate: IdRef }, - .OpGroupBroadcast => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, localid: IdRef }, - .OpGroupIAdd => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFAdd => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFMin => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupUMin => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupSMin => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFMax => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupUMax => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupSMax => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpReadPipe => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, pointer: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpWritePipe => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, pointer: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpReservedReadPipe => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, reserve_id: IdRef, index: IdRef, pointer: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpReservedWritePipe => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, reserve_id: IdRef, index: IdRef, pointer: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpReserveReadPipePackets => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, num_packets: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpReserveWritePipePackets => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, num_packets: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpCommitReadPipe => struct { pipe: IdRef, reserve_id: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpCommitWritePipe => struct { pipe: IdRef, reserve_id: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpIsValidReserveId => struct { id_result_type: IdResultType, id_result: IdResult, reserve_id: IdRef }, - .OpGetNumPipePackets => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpGetMaxPipePackets => struct { id_result_type: IdResultType, id_result: IdResult, pipe: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpGroupReserveReadPipePackets => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, pipe: IdRef, num_packets: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpGroupReserveWritePipePackets => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, pipe: IdRef, num_packets: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpGroupCommitReadPipe => struct { execution: IdScope, pipe: IdRef, reserve_id: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpGroupCommitWritePipe => struct { execution: IdScope, pipe: IdRef, reserve_id: IdRef, packet_size: IdRef, packet_alignment: IdRef }, - .OpEnqueueMarker => struct { id_result_type: IdResultType, id_result: IdResult, queue: IdRef, num_events: IdRef, wait_events: IdRef, ret_event: IdRef }, - .OpEnqueueKernel => struct { id_result_type: IdResultType, id_result: IdResult, queue: IdRef, flags: IdRef, nd_range: IdRef, num_events: IdRef, wait_events: IdRef, ret_event: IdRef, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef, local_size: []const IdRef = &.{} }, - .OpGetKernelNDrangeSubGroupCount => struct { id_result_type: IdResultType, id_result: IdResult, nd_range: IdRef, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef }, - .OpGetKernelNDrangeMaxSubGroupSize => struct { id_result_type: IdResultType, id_result: IdResult, nd_range: IdRef, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef }, - .OpGetKernelWorkGroupSize => struct { id_result_type: IdResultType, id_result: IdResult, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef }, - .OpGetKernelPreferredWorkGroupSizeMultiple => struct { id_result_type: IdResultType, id_result: IdResult, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef }, - .OpRetainEvent => struct { event: IdRef }, - .OpReleaseEvent => struct { event: IdRef }, - .OpCreateUserEvent => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpIsValidEvent => struct { id_result_type: IdResultType, id_result: IdResult, event: IdRef }, - .OpSetUserEventStatus => struct { event: IdRef, status: IdRef }, - .OpCaptureEventProfilingInfo => struct { event: IdRef, profiling_info: IdRef, value: IdRef }, - .OpGetDefaultQueue => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpBuildNDRange => struct { id_result_type: IdResultType, id_result: IdResult, globalworksize: IdRef, localworksize: IdRef, globalworkoffset: IdRef }, - .OpImageSparseSampleImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseSampleExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSparseSampleDrefImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseSampleDrefExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSparseSampleProjImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseSampleProjExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSparseSampleProjDrefImplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseSampleProjDrefExplicitLod => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ImageOperands.Extended }, - .OpImageSparseFetch => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseGather => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, component: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseDrefGather => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, d_ref: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpImageSparseTexelsResident => struct { id_result_type: IdResultType, id_result: IdResult, resident_code: IdRef }, + .OpLifetimeStart => struct { pointer: Id, size: LiteralInteger }, + .OpLifetimeStop => struct { pointer: Id, size: LiteralInteger }, + .OpGroupAsyncCopy => struct { id_result_type: Id, id_result: Id, execution: Id, destination: Id, source: Id, num_elements: Id, stride: Id, event: Id }, + .OpGroupWaitEvents => struct { execution: Id, num_events: Id, events_list: Id }, + .OpGroupAll => struct { id_result_type: Id, id_result: Id, execution: Id, predicate: Id }, + .OpGroupAny => struct { id_result_type: Id, id_result: Id, execution: Id, predicate: Id }, + .OpGroupBroadcast => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, local_id: Id }, + .OpGroupIAdd => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFAdd => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFMin => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupUMin => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupSMin => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFMax => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupUMax => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupSMax => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpReadPipe => struct { id_result_type: Id, id_result: Id, pipe: Id, pointer: Id, packet_size: Id, packet_alignment: Id }, + .OpWritePipe => struct { id_result_type: Id, id_result: Id, pipe: Id, pointer: Id, packet_size: Id, packet_alignment: Id }, + .OpReservedReadPipe => struct { id_result_type: Id, id_result: Id, pipe: Id, reserve_id: Id, index: Id, pointer: Id, packet_size: Id, packet_alignment: Id }, + .OpReservedWritePipe => struct { id_result_type: Id, id_result: Id, pipe: Id, reserve_id: Id, index: Id, pointer: Id, packet_size: Id, packet_alignment: Id }, + .OpReserveReadPipePackets => struct { id_result_type: Id, id_result: Id, pipe: Id, num_packets: Id, packet_size: Id, packet_alignment: Id }, + .OpReserveWritePipePackets => struct { id_result_type: Id, id_result: Id, pipe: Id, num_packets: Id, packet_size: Id, packet_alignment: Id }, + .OpCommitReadPipe => struct { pipe: Id, reserve_id: Id, packet_size: Id, packet_alignment: Id }, + .OpCommitWritePipe => struct { pipe: Id, reserve_id: Id, packet_size: Id, packet_alignment: Id }, + .OpIsValidReserveId => struct { id_result_type: Id, id_result: Id, reserve_id: Id }, + .OpGetNumPipePackets => struct { id_result_type: Id, id_result: Id, pipe: Id, packet_size: Id, packet_alignment: Id }, + .OpGetMaxPipePackets => struct { id_result_type: Id, id_result: Id, pipe: Id, packet_size: Id, packet_alignment: Id }, + .OpGroupReserveReadPipePackets => struct { id_result_type: Id, id_result: Id, execution: Id, pipe: Id, num_packets: Id, packet_size: Id, packet_alignment: Id }, + .OpGroupReserveWritePipePackets => struct { id_result_type: Id, id_result: Id, execution: Id, pipe: Id, num_packets: Id, packet_size: Id, packet_alignment: Id }, + .OpGroupCommitReadPipe => struct { execution: Id, pipe: Id, reserve_id: Id, packet_size: Id, packet_alignment: Id }, + .OpGroupCommitWritePipe => struct { execution: Id, pipe: Id, reserve_id: Id, packet_size: Id, packet_alignment: Id }, + .OpEnqueueMarker => struct { id_result_type: Id, id_result: Id, queue: Id, num_events: Id, wait_events: Id, ret_event: Id }, + .OpEnqueueKernel => struct { id_result_type: Id, id_result: Id, queue: Id, flags: Id, nd_range: Id, num_events: Id, wait_events: Id, ret_event: Id, invoke: Id, param: Id, param_size: Id, param_align: Id, local_size: []const Id = &.{} }, + .OpGetKernelNDrangeSubGroupCount => struct { id_result_type: Id, id_result: Id, nd_range: Id, invoke: Id, param: Id, param_size: Id, param_align: Id }, + .OpGetKernelNDrangeMaxSubGroupSize => struct { id_result_type: Id, id_result: Id, nd_range: Id, invoke: Id, param: Id, param_size: Id, param_align: Id }, + .OpGetKernelWorkGroupSize => struct { id_result_type: Id, id_result: Id, invoke: Id, param: Id, param_size: Id, param_align: Id }, + .OpGetKernelPreferredWorkGroupSizeMultiple => struct { id_result_type: Id, id_result: Id, invoke: Id, param: Id, param_size: Id, param_align: Id }, + .OpRetainEvent => struct { event: Id }, + .OpReleaseEvent => struct { event: Id }, + .OpCreateUserEvent => struct { id_result_type: Id, id_result: Id }, + .OpIsValidEvent => struct { id_result_type: Id, id_result: Id, event: Id }, + .OpSetUserEventStatus => struct { event: Id, status: Id }, + .OpCaptureEventProfilingInfo => struct { event: Id, profiling_info: Id, value: Id }, + .OpGetDefaultQueue => struct { id_result_type: Id, id_result: Id }, + .OpBuildNDRange => struct { id_result_type: Id, id_result: Id, global_work_size: Id, local_work_size: Id, global_work_offset: Id }, + .OpImageSparseSampleImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseSampleExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ImageOperands.Extended }, + .OpImageSparseSampleDrefImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseSampleDrefExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ImageOperands.Extended }, + .OpImageSparseSampleProjImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseSampleProjExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, image_operands: ImageOperands.Extended }, + .OpImageSparseSampleProjDrefImplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseSampleProjDrefExplicitLod => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ImageOperands.Extended }, + .OpImageSparseFetch => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseGather => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, component: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseDrefGather => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, d_ref: Id, image_operands: ?ImageOperands.Extended = null }, + .OpImageSparseTexelsResident => struct { id_result_type: Id, id_result: Id, resident_code: Id }, .OpNoLine => void, - .OpAtomicFlagTestAndSet => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics }, - .OpAtomicFlagClear => struct { pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics }, - .OpImageSparseRead => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpSizeOf => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef }, - .OpTypePipeStorage => struct { id_result: IdResult }, - .OpConstantPipeStorage => struct { id_result_type: IdResultType, id_result: IdResult, packet_size: LiteralInteger, packet_alignment: LiteralInteger, capacity: LiteralInteger }, - .OpCreatePipeFromPipeStorage => struct { id_result_type: IdResultType, id_result: IdResult, pipe_storage: IdRef }, - .OpGetKernelLocalSizeForSubgroupCount => struct { id_result_type: IdResultType, id_result: IdResult, subgroup_count: IdRef, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef }, - .OpGetKernelMaxNumSubgroups => struct { id_result_type: IdResultType, id_result: IdResult, invoke: IdRef, param: IdRef, param_size: IdRef, param_align: IdRef }, - .OpTypeNamedBarrier => struct { id_result: IdResult }, - .OpNamedBarrierInitialize => struct { id_result_type: IdResultType, id_result: IdResult, subgroup_count: IdRef }, - .OpMemoryNamedBarrier => struct { named_barrier: IdRef, memory: IdScope, semantics: IdMemorySemantics }, + .OpAtomicFlagTestAndSet => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id }, + .OpAtomicFlagClear => struct { pointer: Id, memory: Id, semantics: Id }, + .OpImageSparseRead => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, image_operands: ?ImageOperands.Extended = null }, + .OpSizeOf => struct { id_result_type: Id, id_result: Id, pointer: Id }, + .OpTypePipeStorage => struct { id_result: Id }, + .OpConstantPipeStorage => struct { id_result_type: Id, id_result: Id, packet_size: LiteralInteger, packet_alignment: LiteralInteger, capacity: LiteralInteger }, + .OpCreatePipeFromPipeStorage => struct { id_result_type: Id, id_result: Id, pipe_storage: Id }, + .OpGetKernelLocalSizeForSubgroupCount => struct { id_result_type: Id, id_result: Id, subgroup_count: Id, invoke: Id, param: Id, param_size: Id, param_align: Id }, + .OpGetKernelMaxNumSubgroups => struct { id_result_type: Id, id_result: Id, invoke: Id, param: Id, param_size: Id, param_align: Id }, + .OpTypeNamedBarrier => struct { id_result: Id }, + .OpNamedBarrierInitialize => struct { id_result_type: Id, id_result: Id, subgroup_count: Id }, + .OpMemoryNamedBarrier => struct { named_barrier: Id, memory: Id, semantics: Id }, .OpModuleProcessed => struct { process: LiteralString }, - .OpExecutionModeId => struct { entry_point: IdRef, mode: ExecutionMode.Extended }, - .OpDecorateId => struct { target: IdRef, decoration: Decoration.Extended }, - .OpGroupNonUniformElect => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope }, - .OpGroupNonUniformAll => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, predicate: IdRef }, - .OpGroupNonUniformAny => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, predicate: IdRef }, - .OpGroupNonUniformAllEqual => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef }, - .OpGroupNonUniformBroadcast => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, id: IdRef }, - .OpGroupNonUniformBroadcastFirst => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef }, - .OpGroupNonUniformBallot => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, predicate: IdRef }, - .OpGroupNonUniformInverseBallot => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef }, - .OpGroupNonUniformBallotBitExtract => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, index: IdRef }, - .OpGroupNonUniformBallotBitCount => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef }, - .OpGroupNonUniformBallotFindLSB => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef }, - .OpGroupNonUniformBallotFindMSB => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef }, - .OpGroupNonUniformShuffle => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, id: IdRef }, - .OpGroupNonUniformShuffleXor => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, mask: IdRef }, - .OpGroupNonUniformShuffleUp => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, delta: IdRef }, - .OpGroupNonUniformShuffleDown => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, delta: IdRef }, - .OpGroupNonUniformIAdd => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformFAdd => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformIMul => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformFMul => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformSMin => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformUMin => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformFMin => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformSMax => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformUMax => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformFMax => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformBitwiseAnd => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformBitwiseOr => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformBitwiseXor => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformLogicalAnd => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformLogicalOr => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformLogicalXor => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, value: IdRef, clustersize: ?IdRef = null }, - .OpGroupNonUniformQuadBroadcast => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, index: IdRef }, - .OpGroupNonUniformQuadSwap => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, direction: IdRef }, - .OpCopyLogical => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpPtrEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpPtrNotEqual => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpPtrDiff => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpColorAttachmentReadEXT => struct { id_result_type: IdResultType, id_result: IdResult, attachment: IdRef, sample: ?IdRef = null }, - .OpDepthAttachmentReadEXT => struct { id_result_type: IdResultType, id_result: IdResult, sample: ?IdRef = null }, - .OpStencilAttachmentReadEXT => struct { id_result_type: IdResultType, id_result: IdResult, sample: ?IdRef = null }, + .OpExecutionModeId => struct { entry_point: Id, mode: ExecutionMode.Extended }, + .OpDecorateId => struct { target: Id, decoration: Decoration.Extended }, + .OpGroupNonUniformElect => struct { id_result_type: Id, id_result: Id, execution: Id }, + .OpGroupNonUniformAll => struct { id_result_type: Id, id_result: Id, execution: Id, predicate: Id }, + .OpGroupNonUniformAny => struct { id_result_type: Id, id_result: Id, execution: Id, predicate: Id }, + .OpGroupNonUniformAllEqual => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id }, + .OpGroupNonUniformBroadcast => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, id: Id }, + .OpGroupNonUniformBroadcastFirst => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id }, + .OpGroupNonUniformBallot => struct { id_result_type: Id, id_result: Id, execution: Id, predicate: Id }, + .OpGroupNonUniformInverseBallot => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id }, + .OpGroupNonUniformBallotBitExtract => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, index: Id }, + .OpGroupNonUniformBallotBitCount => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id }, + .OpGroupNonUniformBallotFindLSB => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id }, + .OpGroupNonUniformBallotFindMSB => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id }, + .OpGroupNonUniformShuffle => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, id: Id }, + .OpGroupNonUniformShuffleXor => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, mask: Id }, + .OpGroupNonUniformShuffleUp => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, delta: Id }, + .OpGroupNonUniformShuffleDown => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, delta: Id }, + .OpGroupNonUniformIAdd => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformFAdd => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformIMul => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformFMul => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformSMin => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformUMin => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformFMin => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformSMax => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformUMax => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformFMax => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformBitwiseAnd => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformBitwiseOr => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformBitwiseXor => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformLogicalAnd => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformLogicalOr => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformLogicalXor => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, value: Id, cluster_size: ?Id = null }, + .OpGroupNonUniformQuadBroadcast => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, index: Id }, + .OpGroupNonUniformQuadSwap => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, direction: Id }, + .OpCopyLogical => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpPtrEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpPtrNotEqual => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpPtrDiff => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpColorAttachmentReadEXT => struct { id_result_type: Id, id_result: Id, attachment: Id, sample: ?Id = null }, + .OpDepthAttachmentReadEXT => struct { id_result_type: Id, id_result: Id, sample: ?Id = null }, + .OpStencilAttachmentReadEXT => struct { id_result_type: Id, id_result: Id, sample: ?Id = null }, + .OpTypeTensorARM => struct { id_result: Id, element_type: Id, rank: ?Id = null, shape: ?Id = null }, + .OpTensorReadARM => struct { id_result_type: Id, id_result: Id, tensor: Id, coordinates: Id, tensor_operands: ?TensorOperands.Extended = null }, + .OpTensorWriteARM => struct { tensor: Id, coordinates: Id, object: Id, tensor_operands: ?TensorOperands.Extended = null }, + .OpTensorQuerySizeARM => struct { id_result_type: Id, id_result: Id, tensor: Id, dimension: Id }, + .OpGraphConstantARM => struct { id_result_type: Id, id_result: Id, graph_constant_id: LiteralInteger }, + .OpGraphEntryPointARM => struct { graph: Id, name: LiteralString, interface: []const Id = &.{} }, + .OpGraphARM => struct { id_result_type: Id, id_result: Id }, + .OpGraphInputARM => struct { id_result_type: Id, id_result: Id, input_index: Id, element_index: []const Id = &.{} }, + .OpGraphSetOutputARM => struct { value: Id, output_index: Id, element_index: []const Id = &.{} }, + .OpGraphEndARM => void, + .OpTypeGraphARM => struct { id_result: Id, num_inputs: LiteralInteger, in_out_types: []const Id = &.{} }, .OpTerminateInvocation => void, - .OpSubgroupBallotKHR => struct { id_result_type: IdResultType, id_result: IdResult, predicate: IdRef }, - .OpSubgroupFirstInvocationKHR => struct { id_result_type: IdResultType, id_result: IdResult, value: IdRef }, - .OpSubgroupAllKHR => struct { id_result_type: IdResultType, id_result: IdResult, predicate: IdRef }, - .OpSubgroupAnyKHR => struct { id_result_type: IdResultType, id_result: IdResult, predicate: IdRef }, - .OpSubgroupAllEqualKHR => struct { id_result_type: IdResultType, id_result: IdResult, predicate: IdRef }, - .OpGroupNonUniformRotateKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, value: IdRef, delta: IdRef, clustersize: ?IdRef = null }, - .OpSubgroupReadInvocationKHR => struct { id_result_type: IdResultType, id_result: IdResult, value: IdRef, index: IdRef }, - .OpTraceRayKHR => struct { accel: IdRef, ray_flags: IdRef, cull_mask: IdRef, sbt_offset: IdRef, sbt_stride: IdRef, miss_index: IdRef, ray_origin: IdRef, ray_tmin: IdRef, ray_direction: IdRef, ray_tmax: IdRef, payload: IdRef }, - .OpExecuteCallableKHR => struct { sbt_index: IdRef, callable_data: IdRef }, - .OpConvertUToAccelerationStructureKHR => struct { id_result_type: IdResultType, id_result: IdResult, accel: IdRef }, + .OpTypeUntypedPointerKHR => struct { id_result: Id, storage_class: StorageClass }, + .OpUntypedVariableKHR => struct { id_result_type: Id, id_result: Id, storage_class: StorageClass, data_type: ?Id = null, initializer: ?Id = null }, + .OpUntypedAccessChainKHR => struct { id_result_type: Id, id_result: Id, base_type: Id, base: Id, indexes: []const Id = &.{} }, + .OpUntypedInBoundsAccessChainKHR => struct { id_result_type: Id, id_result: Id, base_type: Id, base: Id, indexes: []const Id = &.{} }, + .OpSubgroupBallotKHR => struct { id_result_type: Id, id_result: Id, predicate: Id }, + .OpSubgroupFirstInvocationKHR => struct { id_result_type: Id, id_result: Id, value: Id }, + .OpUntypedPtrAccessChainKHR => struct { id_result_type: Id, id_result: Id, base_type: Id, base: Id, element: Id, indexes: []const Id = &.{} }, + .OpUntypedInBoundsPtrAccessChainKHR => struct { id_result_type: Id, id_result: Id, base_type: Id, base: Id, element: Id, indexes: []const Id = &.{} }, + .OpUntypedArrayLengthKHR => struct { id_result_type: Id, id_result: Id, structure: Id, pointer: Id, array_member: LiteralInteger }, + .OpUntypedPrefetchKHR => struct { pointer_type: Id, num_bytes: Id, rw: ?Id = null, locality: ?Id = null, cache_type: ?Id = null }, + .OpSubgroupAllKHR => struct { id_result_type: Id, id_result: Id, predicate: Id }, + .OpSubgroupAnyKHR => struct { id_result_type: Id, id_result: Id, predicate: Id }, + .OpSubgroupAllEqualKHR => struct { id_result_type: Id, id_result: Id, predicate: Id }, + .OpGroupNonUniformRotateKHR => struct { id_result_type: Id, id_result: Id, execution: Id, value: Id, delta: Id, cluster_size: ?Id = null }, + .OpSubgroupReadInvocationKHR => struct { id_result_type: Id, id_result: Id, value: Id, index: Id }, + .OpExtInstWithForwardRefsKHR => struct { id_result_type: Id, id_result: Id, set: Id, instruction: LiteralExtInstInteger, id_ref_4: []const Id = &.{} }, + .OpTraceRayKHR => struct { accel: Id, ray_flags: Id, cull_mask: Id, sbt_offset: Id, sbt_stride: Id, miss_index: Id, ray_origin: Id, ray_tmin: Id, ray_direction: Id, ray_tmax: Id, payload: Id }, + .OpExecuteCallableKHR => struct { sbt_index: Id, callable_data: Id }, + .OpConvertUToAccelerationStructureKHR => struct { id_result_type: Id, id_result: Id, accel: Id }, .OpIgnoreIntersectionKHR => void, .OpTerminateRayKHR => void, - .OpSDot => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, packed_vector_format: ?PackedVectorFormat = null }, - .OpUDot => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, packed_vector_format: ?PackedVectorFormat = null }, - .OpSUDot => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, packed_vector_format: ?PackedVectorFormat = null }, - .OpSDotAccSat => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, accumulator: IdRef, packed_vector_format: ?PackedVectorFormat = null }, - .OpUDotAccSat => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, accumulator: IdRef, packed_vector_format: ?PackedVectorFormat = null }, - .OpSUDotAccSat => struct { id_result_type: IdResultType, id_result: IdResult, vector_1: IdRef, vector_2: IdRef, accumulator: IdRef, packed_vector_format: ?PackedVectorFormat = null }, - .OpTypeCooperativeMatrixKHR => struct { id_result: IdResult, component_type: IdRef, scope: IdScope, rows: IdRef, columns: IdRef, use: IdRef }, - .OpCooperativeMatrixLoadKHR => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memorylayout: IdRef, stride: ?IdRef = null, memory_operand: ?MemoryAccess.Extended = null }, - .OpCooperativeMatrixStoreKHR => struct { pointer: IdRef, object: IdRef, memorylayout: IdRef, stride: ?IdRef = null, memory_operand: ?MemoryAccess.Extended = null }, - .OpCooperativeMatrixMulAddKHR => struct { id_result_type: IdResultType, id_result: IdResult, a: IdRef, b: IdRef, c: IdRef, cooperative_matrix_operands: ?CooperativeMatrixOperands = null }, - .OpCooperativeMatrixLengthKHR => struct { id_result_type: IdResultType, id_result: IdResult, type: IdRef }, - .OpTypeRayQueryKHR => struct { id_result: IdResult }, - .OpRayQueryInitializeKHR => struct { rayquery: IdRef, accel: IdRef, rayflags: IdRef, cullmask: IdRef, rayorigin: IdRef, raytmin: IdRef, raydirection: IdRef, raytmax: IdRef }, - .OpRayQueryTerminateKHR => struct { rayquery: IdRef }, - .OpRayQueryGenerateIntersectionKHR => struct { rayquery: IdRef, hitt: IdRef }, - .OpRayQueryConfirmIntersectionKHR => struct { rayquery: IdRef }, - .OpRayQueryProceedKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef }, - .OpRayQueryGetIntersectionTypeKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpImageSampleWeightedQCOM => struct { id_result_type: IdResultType, id_result: IdResult, texture: IdRef, coordinates: IdRef, weights: IdRef }, - .OpImageBoxFilterQCOM => struct { id_result_type: IdResultType, id_result: IdResult, texture: IdRef, coordinates: IdRef, box_size: IdRef }, - .OpImageBlockMatchSSDQCOM => struct { id_result_type: IdResultType, id_result: IdResult, target: IdRef, target_coordinates: IdRef, reference: IdRef, reference_coordinates: IdRef, block_size: IdRef }, - .OpImageBlockMatchSADQCOM => struct { id_result_type: IdResultType, id_result: IdResult, target: IdRef, target_coordinates: IdRef, reference: IdRef, reference_coordinates: IdRef, block_size: IdRef }, - .OpImageBlockMatchWindowSSDQCOM => struct { id_result_type: IdResultType, id_result: IdResult, target_sampled_image: IdRef, target_coordinates: IdRef, reference_sampled_image: IdRef, reference_coordinates: IdRef, block_size: IdRef }, - .OpImageBlockMatchWindowSADQCOM => struct { id_result_type: IdResultType, id_result: IdResult, target_sampled_image: IdRef, target_coordinates: IdRef, reference_sampled_image: IdRef, reference_coordinates: IdRef, block_size: IdRef }, - .OpImageBlockMatchGatherSSDQCOM => struct { id_result_type: IdResultType, id_result: IdResult, target_sampled_image: IdRef, target_coordinates: IdRef, reference_sampled_image: IdRef, reference_coordinates: IdRef, block_size: IdRef }, - .OpImageBlockMatchGatherSADQCOM => struct { id_result_type: IdResultType, id_result: IdResult, target_sampled_image: IdRef, target_coordinates: IdRef, reference_sampled_image: IdRef, reference_coordinates: IdRef, block_size: IdRef }, - .OpGroupIAddNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFAddNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFMinNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupUMinNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupSMinNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFMaxNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupUMaxNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupSMaxNonUniformAMD => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpFragmentMaskFetchAMD => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef }, - .OpFragmentFetchAMD => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, fragment_index: IdRef }, - .OpReadClockKHR => struct { id_result_type: IdResultType, id_result: IdResult, scope: IdScope }, - .OpFinalizeNodePayloadsAMDX => struct { payload_array: IdRef }, - .OpFinishWritingNodePayloadAMDX => struct { id_result_type: IdResultType, id_result: IdResult, payload: IdRef }, - .OpInitializeNodePayloadsAMDX => struct { payload_array: IdRef, visibility: IdScope, payload_count: IdRef, node_index: IdRef }, - .OpGroupNonUniformQuadAllKHR => struct { id_result_type: IdResultType, id_result: IdResult, predicate: IdRef }, - .OpGroupNonUniformQuadAnyKHR => struct { id_result_type: IdResultType, id_result: IdResult, predicate: IdRef }, - .OpHitObjectRecordHitMotionNV => struct { hit_object: IdRef, acceleration_structure: IdRef, instanceid: IdRef, primitiveid: IdRef, geometryindex: IdRef, hit_kind: IdRef, sbt_record_offset: IdRef, sbt_record_stride: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, current_time: IdRef, hitobject_attributes: IdRef }, - .OpHitObjectRecordHitWithIndexMotionNV => struct { hit_object: IdRef, acceleration_structure: IdRef, instanceid: IdRef, primitiveid: IdRef, geometryindex: IdRef, hit_kind: IdRef, sbt_record_index: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, current_time: IdRef, hitobject_attributes: IdRef }, - .OpHitObjectRecordMissMotionNV => struct { hit_object: IdRef, sbt_index: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, current_time: IdRef }, - .OpHitObjectGetWorldToObjectNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetObjectToWorldNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetObjectRayDirectionNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetObjectRayOriginNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectTraceRayMotionNV => struct { hit_object: IdRef, acceleration_structure: IdRef, rayflags: IdRef, cullmask: IdRef, sbt_record_offset: IdRef, sbt_record_stride: IdRef, miss_index: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, time: IdRef, payload: IdRef }, - .OpHitObjectGetShaderRecordBufferHandleNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetShaderBindingTableRecordIndexNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectRecordEmptyNV => struct { hit_object: IdRef }, - .OpHitObjectTraceRayNV => struct { hit_object: IdRef, acceleration_structure: IdRef, rayflags: IdRef, cullmask: IdRef, sbt_record_offset: IdRef, sbt_record_stride: IdRef, miss_index: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, payload: IdRef }, - .OpHitObjectRecordHitNV => struct { hit_object: IdRef, acceleration_structure: IdRef, instanceid: IdRef, primitiveid: IdRef, geometryindex: IdRef, hit_kind: IdRef, sbt_record_offset: IdRef, sbt_record_stride: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, hitobject_attributes: IdRef }, - .OpHitObjectRecordHitWithIndexNV => struct { hit_object: IdRef, acceleration_structure: IdRef, instanceid: IdRef, primitiveid: IdRef, geometryindex: IdRef, hit_kind: IdRef, sbt_record_index: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef, hitobject_attributes: IdRef }, - .OpHitObjectRecordMissNV => struct { hit_object: IdRef, sbt_index: IdRef, origin: IdRef, tmin: IdRef, direction: IdRef, tmax: IdRef }, - .OpHitObjectExecuteShaderNV => struct { hit_object: IdRef, payload: IdRef }, - .OpHitObjectGetCurrentTimeNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetAttributesNV => struct { hit_object: IdRef, hit_object_attribute: IdRef }, - .OpHitObjectGetHitKindNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetPrimitiveIndexNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetGeometryIndexNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetInstanceIdNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetInstanceCustomIndexNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetWorldRayDirectionNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetWorldRayOriginNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetRayTMaxNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectGetRayTMinNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectIsEmptyNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectIsHitNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpHitObjectIsMissNV => struct { id_result_type: IdResultType, id_result: IdResult, hit_object: IdRef }, - .OpReorderThreadWithHitObjectNV => struct { hit_object: IdRef, hint: ?IdRef = null, bits: ?IdRef = null }, - .OpReorderThreadWithHintNV => struct { hint: IdRef, bits: IdRef }, - .OpTypeHitObjectNV => struct { id_result: IdResult }, - .OpImageSampleFootprintNV => struct { id_result_type: IdResultType, id_result: IdResult, sampled_image: IdRef, coordinate: IdRef, granularity: IdRef, coarse: IdRef, image_operands: ?ImageOperands.Extended = null }, - .OpEmitMeshTasksEXT => struct { group_count_x: IdRef, group_count_y: IdRef, group_count_z: IdRef, payload: ?IdRef = null }, - .OpSetMeshOutputsEXT => struct { vertex_count: IdRef, primitive_count: IdRef }, - .OpGroupNonUniformPartitionNV => struct { id_result_type: IdResultType, id_result: IdResult, value: IdRef }, - .OpWritePackedPrimitiveIndices4x8NV => struct { index_offset: IdRef, packed_indices: IdRef }, - .OpFetchMicroTriangleVertexPositionNV => struct { id_result_type: IdResultType, id_result: IdResult, accel: IdRef, instance_id: IdRef, geometry_index: IdRef, primitive_index: IdRef, barycentric: IdRef }, - .OpFetchMicroTriangleVertexBarycentricNV => struct { id_result_type: IdResultType, id_result: IdResult, accel: IdRef, instance_id: IdRef, geometry_index: IdRef, primitive_index: IdRef, barycentric: IdRef }, - .OpReportIntersectionKHR => struct { id_result_type: IdResultType, id_result: IdResult, hit: IdRef, hitkind: IdRef }, + .OpSDot => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, packed_vector_format: ?PackedVectorFormat = null }, + .OpUDot => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, packed_vector_format: ?PackedVectorFormat = null }, + .OpSUDot => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, packed_vector_format: ?PackedVectorFormat = null }, + .OpSDotAccSat => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, accumulator: Id, packed_vector_format: ?PackedVectorFormat = null }, + .OpUDotAccSat => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, accumulator: Id, packed_vector_format: ?PackedVectorFormat = null }, + .OpSUDotAccSat => struct { id_result_type: Id, id_result: Id, vector_1: Id, vector_2: Id, accumulator: Id, packed_vector_format: ?PackedVectorFormat = null }, + .OpTypeCooperativeMatrixKHR => struct { id_result: Id, component_type: Id, scope: Id, rows: Id, columns: Id, use: Id }, + .OpCooperativeMatrixLoadKHR => struct { id_result_type: Id, id_result: Id, pointer: Id, memory_layout: Id, stride: ?Id = null, memory_operand: ?MemoryAccess.Extended = null }, + .OpCooperativeMatrixStoreKHR => struct { pointer: Id, object: Id, memory_layout: Id, stride: ?Id = null, memory_operand: ?MemoryAccess.Extended = null }, + .OpCooperativeMatrixMulAddKHR => struct { id_result_type: Id, id_result: Id, a: Id, b: Id, c: Id, cooperative_matrix_operands: ?CooperativeMatrixOperands = null }, + .OpCooperativeMatrixLengthKHR => struct { id_result_type: Id, id_result: Id, type: Id }, + .OpConstantCompositeReplicateEXT => struct { id_result_type: Id, id_result: Id, value: Id }, + .OpSpecConstantCompositeReplicateEXT => struct { id_result_type: Id, id_result: Id, value: Id }, + .OpCompositeConstructReplicateEXT => struct { id_result_type: Id, id_result: Id, value: Id }, + .OpTypeRayQueryKHR => struct { id_result: Id }, + .OpRayQueryInitializeKHR => struct { ray_query: Id, accel: Id, ray_flags: Id, cull_mask: Id, ray_origin: Id, ray_t_min: Id, ray_direction: Id, ray_t_max: Id }, + .OpRayQueryTerminateKHR => struct { ray_query: Id }, + .OpRayQueryGenerateIntersectionKHR => struct { ray_query: Id, hit_t: Id }, + .OpRayQueryConfirmIntersectionKHR => struct { ray_query: Id }, + .OpRayQueryProceedKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id }, + .OpRayQueryGetIntersectionTypeKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpImageSampleWeightedQCOM => struct { id_result_type: Id, id_result: Id, texture: Id, coordinates: Id, weights: Id }, + .OpImageBoxFilterQCOM => struct { id_result_type: Id, id_result: Id, texture: Id, coordinates: Id, box_size: Id }, + .OpImageBlockMatchSSDQCOM => struct { id_result_type: Id, id_result: Id, target: Id, target_coordinates: Id, reference: Id, reference_coordinates: Id, block_size: Id }, + .OpImageBlockMatchSADQCOM => struct { id_result_type: Id, id_result: Id, target: Id, target_coordinates: Id, reference: Id, reference_coordinates: Id, block_size: Id }, + .OpImageBlockMatchWindowSSDQCOM => struct { id_result_type: Id, id_result: Id, target_sampled_image: Id, target_coordinates: Id, reference_sampled_image: Id, reference_coordinates: Id, block_size: Id }, + .OpImageBlockMatchWindowSADQCOM => struct { id_result_type: Id, id_result: Id, target_sampled_image: Id, target_coordinates: Id, reference_sampled_image: Id, reference_coordinates: Id, block_size: Id }, + .OpImageBlockMatchGatherSSDQCOM => struct { id_result_type: Id, id_result: Id, target_sampled_image: Id, target_coordinates: Id, reference_sampled_image: Id, reference_coordinates: Id, block_size: Id }, + .OpImageBlockMatchGatherSADQCOM => struct { id_result_type: Id, id_result: Id, target_sampled_image: Id, target_coordinates: Id, reference_sampled_image: Id, reference_coordinates: Id, block_size: Id }, + .OpGroupIAddNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFAddNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFMinNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupUMinNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupSMinNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFMaxNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupUMaxNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupSMaxNonUniformAMD => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpFragmentMaskFetchAMD => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id }, + .OpFragmentFetchAMD => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, fragment_index: Id }, + .OpReadClockKHR => struct { id_result_type: Id, id_result: Id, scope: Id }, + .OpAllocateNodePayloadsAMDX => struct { id_result_type: Id, id_result: Id, visibility: Id, payload_count: Id, node_index: Id }, + .OpEnqueueNodePayloadsAMDX => struct { payload_array: Id }, + .OpTypeNodePayloadArrayAMDX => struct { id_result: Id, payload_type: Id }, + .OpFinishWritingNodePayloadAMDX => struct { id_result_type: Id, id_result: Id, payload: Id }, + .OpNodePayloadArrayLengthAMDX => struct { id_result_type: Id, id_result: Id, payload_array: Id }, + .OpIsNodePayloadValidAMDX => struct { id_result_type: Id, id_result: Id, payload_type: Id, node_index: Id }, + .OpConstantStringAMDX => struct { id_result: Id, literal_string: LiteralString }, + .OpSpecConstantStringAMDX => struct { id_result: Id, literal_string: LiteralString }, + .OpGroupNonUniformQuadAllKHR => struct { id_result_type: Id, id_result: Id, predicate: Id }, + .OpGroupNonUniformQuadAnyKHR => struct { id_result_type: Id, id_result: Id, predicate: Id }, + .OpHitObjectRecordHitMotionNV => struct { hit_object: Id, acceleration_structure: Id, instance_id: Id, primitive_id: Id, geometry_index: Id, hit_kind: Id, sbt_record_offset: Id, sbt_record_stride: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, current_time: Id, hit_object_attributes: Id }, + .OpHitObjectRecordHitWithIndexMotionNV => struct { hit_object: Id, acceleration_structure: Id, instance_id: Id, primitive_id: Id, geometry_index: Id, hit_kind: Id, sbt_record_index: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, current_time: Id, hit_object_attributes: Id }, + .OpHitObjectRecordMissMotionNV => struct { hit_object: Id, sbt_index: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, current_time: Id }, + .OpHitObjectGetWorldToObjectNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetObjectToWorldNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetObjectRayDirectionNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetObjectRayOriginNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectTraceRayMotionNV => struct { hit_object: Id, acceleration_structure: Id, ray_flags: Id, cullmask: Id, sbt_record_offset: Id, sbt_record_stride: Id, miss_index: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, time: Id, payload: Id }, + .OpHitObjectGetShaderRecordBufferHandleNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetShaderBindingTableRecordIndexNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectRecordEmptyNV => struct { hit_object: Id }, + .OpHitObjectTraceRayNV => struct { hit_object: Id, acceleration_structure: Id, ray_flags: Id, cullmask: Id, sbt_record_offset: Id, sbt_record_stride: Id, miss_index: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, payload: Id }, + .OpHitObjectRecordHitNV => struct { hit_object: Id, acceleration_structure: Id, instance_id: Id, primitive_id: Id, geometry_index: Id, hit_kind: Id, sbt_record_offset: Id, sbt_record_stride: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, hit_object_attributes: Id }, + .OpHitObjectRecordHitWithIndexNV => struct { hit_object: Id, acceleration_structure: Id, instance_id: Id, primitive_id: Id, geometry_index: Id, hit_kind: Id, sbt_record_index: Id, origin: Id, t_min: Id, direction: Id, t_max: Id, hit_object_attributes: Id }, + .OpHitObjectRecordMissNV => struct { hit_object: Id, sbt_index: Id, origin: Id, t_min: Id, direction: Id, t_max: Id }, + .OpHitObjectExecuteShaderNV => struct { hit_object: Id, payload: Id }, + .OpHitObjectGetCurrentTimeNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetAttributesNV => struct { hit_object: Id, hit_object_attribute: Id }, + .OpHitObjectGetHitKindNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetPrimitiveIndexNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetGeometryIndexNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetInstanceIdNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetInstanceCustomIndexNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetWorldRayDirectionNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetWorldRayOriginNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetRayTMaxNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetRayTMinNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectIsEmptyNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectIsHitNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectIsMissNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpReorderThreadWithHitObjectNV => struct { hit_object: Id, hint: ?Id = null, bits: ?Id = null }, + .OpReorderThreadWithHintNV => struct { hint: Id, bits: Id }, + .OpTypeHitObjectNV => struct { id_result: Id }, + .OpImageSampleFootprintNV => struct { id_result_type: Id, id_result: Id, sampled_image: Id, coordinate: Id, granularity: Id, coarse: Id, image_operands: ?ImageOperands.Extended = null }, + .OpTypeCooperativeVectorNV => struct { id_result: Id, component_type: Id, component_count: Id }, + .OpCooperativeVectorMatrixMulNV => struct { id_result_type: Id, id_result: Id, input: Id, input_interpretation: Id, matrix: Id, matrix_offset: Id, matrix_interpretation: Id, m: Id, k: Id, memory_layout: Id, transpose: Id, matrix_stride: ?Id = null, cooperative_matrix_operands: ?CooperativeMatrixOperands = null }, + .OpCooperativeVectorOuterProductAccumulateNV => struct { pointer: Id, offset: Id, a: Id, b: Id, memory_layout: Id, matrix_interpretation: Id, matrix_stride: ?Id = null }, + .OpCooperativeVectorReduceSumAccumulateNV => struct { pointer: Id, offset: Id, v: Id }, + .OpCooperativeVectorMatrixMulAddNV => struct { id_result_type: Id, id_result: Id, input: Id, input_interpretation: Id, matrix: Id, matrix_offset: Id, matrix_interpretation: Id, bias: Id, bias_offset: Id, bias_interpretation: Id, m: Id, k: Id, memory_layout: Id, transpose: Id, matrix_stride: ?Id = null, cooperative_matrix_operands: ?CooperativeMatrixOperands = null }, + .OpCooperativeMatrixConvertNV => struct { id_result_type: Id, id_result: Id, matrix: Id }, + .OpEmitMeshTasksEXT => struct { group_count_x: Id, group_count_y: Id, group_count_z: Id, payload: ?Id = null }, + .OpSetMeshOutputsEXT => struct { vertex_count: Id, primitive_count: Id }, + .OpGroupNonUniformPartitionNV => struct { id_result_type: Id, id_result: Id, value: Id }, + .OpWritePackedPrimitiveIndices4x8NV => struct { index_offset: Id, packed_indices: Id }, + .OpFetchMicroTriangleVertexPositionNV => struct { id_result_type: Id, id_result: Id, accel: Id, instance_id: Id, geometry_index: Id, primitive_index: Id, barycentric: Id }, + .OpFetchMicroTriangleVertexBarycentricNV => struct { id_result_type: Id, id_result: Id, accel: Id, instance_id: Id, geometry_index: Id, primitive_index: Id, barycentric: Id }, + .OpCooperativeVectorLoadNV => struct { id_result_type: Id, id_result: Id, pointer: Id, offset: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpCooperativeVectorStoreNV => struct { pointer: Id, offset: Id, object: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpReportIntersectionKHR => struct { id_result_type: Id, id_result: Id, hit: Id, hit_kind: Id }, .OpIgnoreIntersectionNV => void, .OpTerminateRayNV => void, - .OpTraceNV => struct { accel: IdRef, ray_flags: IdRef, cull_mask: IdRef, sbt_offset: IdRef, sbt_stride: IdRef, miss_index: IdRef, ray_origin: IdRef, ray_tmin: IdRef, ray_direction: IdRef, ray_tmax: IdRef, payloadid: IdRef }, - .OpTraceMotionNV => struct { accel: IdRef, ray_flags: IdRef, cull_mask: IdRef, sbt_offset: IdRef, sbt_stride: IdRef, miss_index: IdRef, ray_origin: IdRef, ray_tmin: IdRef, ray_direction: IdRef, ray_tmax: IdRef, time: IdRef, payloadid: IdRef }, - .OpTraceRayMotionNV => struct { accel: IdRef, ray_flags: IdRef, cull_mask: IdRef, sbt_offset: IdRef, sbt_stride: IdRef, miss_index: IdRef, ray_origin: IdRef, ray_tmin: IdRef, ray_direction: IdRef, ray_tmax: IdRef, time: IdRef, payload: IdRef }, - .OpRayQueryGetIntersectionTriangleVertexPositionsKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpTypeAccelerationStructureKHR => struct { id_result: IdResult }, - .OpExecuteCallableNV => struct { sbt_index: IdRef, callable_dataid: IdRef }, - .OpTypeCooperativeMatrixNV => struct { id_result: IdResult, component_type: IdRef, execution: IdScope, rows: IdRef, columns: IdRef }, - .OpCooperativeMatrixLoadNV => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, stride: IdRef, column_major: IdRef, memory_access: ?MemoryAccess.Extended = null }, - .OpCooperativeMatrixStoreNV => struct { pointer: IdRef, object: IdRef, stride: IdRef, column_major: IdRef, memory_access: ?MemoryAccess.Extended = null }, - .OpCooperativeMatrixMulAddNV => struct { id_result_type: IdResultType, id_result: IdResult, a: IdRef, b: IdRef, c: IdRef }, - .OpCooperativeMatrixLengthNV => struct { id_result_type: IdResultType, id_result: IdResult, type: IdRef }, + .OpTraceNV => struct { accel: Id, ray_flags: Id, cull_mask: Id, sbt_offset: Id, sbt_stride: Id, miss_index: Id, ray_origin: Id, ray_tmin: Id, ray_direction: Id, ray_tmax: Id, payload_id: Id }, + .OpTraceMotionNV => struct { accel: Id, ray_flags: Id, cull_mask: Id, sbt_offset: Id, sbt_stride: Id, miss_index: Id, ray_origin: Id, ray_tmin: Id, ray_direction: Id, ray_tmax: Id, time: Id, payload_id: Id }, + .OpTraceRayMotionNV => struct { accel: Id, ray_flags: Id, cull_mask: Id, sbt_offset: Id, sbt_stride: Id, miss_index: Id, ray_origin: Id, ray_tmin: Id, ray_direction: Id, ray_tmax: Id, time: Id, payload: Id }, + .OpRayQueryGetIntersectionTriangleVertexPositionsKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpTypeAccelerationStructureKHR => struct { id_result: Id }, + .OpExecuteCallableNV => struct { sbt_index: Id, callable_data_id: Id }, + .OpRayQueryGetClusterIdNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpHitObjectGetClusterIdNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpTypeCooperativeMatrixNV => struct { id_result: Id, component_type: Id, execution: Id, rows: Id, columns: Id }, + .OpCooperativeMatrixLoadNV => struct { id_result_type: Id, id_result: Id, pointer: Id, stride: Id, column_major: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpCooperativeMatrixStoreNV => struct { pointer: Id, object: Id, stride: Id, column_major: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpCooperativeMatrixMulAddNV => struct { id_result_type: Id, id_result: Id, a: Id, b: Id, c: Id }, + .OpCooperativeMatrixLengthNV => struct { id_result_type: Id, id_result: Id, type: Id }, .OpBeginInvocationInterlockEXT => void, .OpEndInvocationInterlockEXT => void, + .OpCooperativeMatrixReduceNV => struct { id_result_type: Id, id_result: Id, matrix: Id, reduce: CooperativeMatrixReduce, combine_func: Id }, + .OpCooperativeMatrixLoadTensorNV => struct { id_result_type: Id, id_result: Id, pointer: Id, object: Id, tensor_layout: Id, memory_operand: MemoryAccess.Extended, tensor_addressing_operands: TensorAddressingOperands.Extended }, + .OpCooperativeMatrixStoreTensorNV => struct { pointer: Id, object: Id, tensor_layout: Id, memory_operand: MemoryAccess.Extended, tensor_addressing_operands: TensorAddressingOperands.Extended }, + .OpCooperativeMatrixPerElementOpNV => struct { id_result_type: Id, id_result: Id, matrix: Id, func: Id, operands: []const Id = &.{} }, + .OpTypeTensorLayoutNV => struct { id_result: Id, dim: Id, clamp_mode: Id }, + .OpTypeTensorViewNV => struct { id_result: Id, dim: Id, has_dimensions: Id, p: []const Id = &.{} }, + .OpCreateTensorLayoutNV => struct { id_result_type: Id, id_result: Id }, + .OpTensorLayoutSetDimensionNV => struct { id_result_type: Id, id_result: Id, tensor_layout: Id, dim: []const Id = &.{} }, + .OpTensorLayoutSetStrideNV => struct { id_result_type: Id, id_result: Id, tensor_layout: Id, stride: []const Id = &.{} }, + .OpTensorLayoutSliceNV => struct { id_result_type: Id, id_result: Id, tensor_layout: Id, operands: []const Id = &.{} }, + .OpTensorLayoutSetClampValueNV => struct { id_result_type: Id, id_result: Id, tensor_layout: Id, value: Id }, + .OpCreateTensorViewNV => struct { id_result_type: Id, id_result: Id }, + .OpTensorViewSetDimensionNV => struct { id_result_type: Id, id_result: Id, tensor_view: Id, dim: []const Id = &.{} }, + .OpTensorViewSetStrideNV => struct { id_result_type: Id, id_result: Id, tensor_view: Id, stride: []const Id = &.{} }, .OpDemoteToHelperInvocation => void, - .OpIsHelperInvocationEXT => struct { id_result_type: IdResultType, id_result: IdResult }, - .OpConvertUToImageNV => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpConvertUToSamplerNV => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpConvertImageToUNV => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpConvertSamplerToUNV => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpConvertUToSampledImageNV => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpConvertSampledImageToUNV => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, + .OpIsHelperInvocationEXT => struct { id_result_type: Id, id_result: Id }, + .OpTensorViewSetClipNV => struct { id_result_type: Id, id_result: Id, tensor_view: Id, clip_row_offset: Id, clip_row_span: Id, clip_col_offset: Id, clip_col_span: Id }, + .OpTensorLayoutSetBlockSizeNV => struct { id_result_type: Id, id_result: Id, tensor_layout: Id, block_size: []const Id = &.{} }, + .OpCooperativeMatrixTransposeNV => struct { id_result_type: Id, id_result: Id, matrix: Id }, + .OpConvertUToImageNV => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertUToSamplerNV => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertImageToUNV => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertSamplerToUNV => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertUToSampledImageNV => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertSampledImageToUNV => struct { id_result_type: Id, id_result: Id, operand: Id }, .OpSamplerImageAddressingModeNV => struct { bit_width: LiteralInteger }, - .OpRawAccessChainNV => struct { id_result_type: IdResultType, id_result: IdResult, base: IdRef, byte_stride: IdRef, element_index: IdRef, byte_offset: IdRef, raw_access_chain_operands: ?RawAccessChainOperands = null }, - .OpSubgroupShuffleINTEL => struct { id_result_type: IdResultType, id_result: IdResult, data: IdRef, invocationid: IdRef }, - .OpSubgroupShuffleDownINTEL => struct { id_result_type: IdResultType, id_result: IdResult, current: IdRef, next: IdRef, delta: IdRef }, - .OpSubgroupShuffleUpINTEL => struct { id_result_type: IdResultType, id_result: IdResult, previous: IdRef, current: IdRef, delta: IdRef }, - .OpSubgroupShuffleXorINTEL => struct { id_result_type: IdResultType, id_result: IdResult, data: IdRef, value: IdRef }, - .OpSubgroupBlockReadINTEL => struct { id_result_type: IdResultType, id_result: IdResult, ptr: IdRef }, - .OpSubgroupBlockWriteINTEL => struct { ptr: IdRef, data: IdRef }, - .OpSubgroupImageBlockReadINTEL => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef }, - .OpSubgroupImageBlockWriteINTEL => struct { image: IdRef, coordinate: IdRef, data: IdRef }, - .OpSubgroupImageMediaBlockReadINTEL => struct { id_result_type: IdResultType, id_result: IdResult, image: IdRef, coordinate: IdRef, width: IdRef, height: IdRef }, - .OpSubgroupImageMediaBlockWriteINTEL => struct { image: IdRef, coordinate: IdRef, width: IdRef, height: IdRef, data: IdRef }, - .OpUCountLeadingZerosINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpUCountTrailingZerosINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand: IdRef }, - .OpAbsISubINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpAbsUSubINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpIAddSatINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUAddSatINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpIAverageINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUAverageINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpIAverageRoundedINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUAverageRoundedINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpISubSatINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUSubSatINTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpIMul32x16INTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpUMul32x16INTEL => struct { id_result_type: IdResultType, id_result: IdResult, operand_1: IdRef, operand_2: IdRef }, - .OpAtomicFMinEXT => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAtomicFMaxEXT => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpAssumeTrueKHR => struct { condition: IdRef }, - .OpExpectKHR => struct { id_result_type: IdResultType, id_result: IdResult, value: IdRef, expectedvalue: IdRef }, - .OpDecorateString => struct { target: IdRef, decoration: Decoration.Extended }, - .OpMemberDecorateString => struct { struct_type: IdRef, member: LiteralInteger, decoration: Decoration.Extended }, + .OpRawAccessChainNV => struct { id_result_type: Id, id_result: Id, base: Id, byte_stride: Id, element_index: Id, byte_offset: Id, raw_access_chain_operands: ?RawAccessChainOperands = null }, + .OpRayQueryGetIntersectionSpherePositionNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionSphereRadiusNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionLSSPositionsNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionLSSRadiiNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionLSSHitValueNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpHitObjectGetSpherePositionNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetSphereRadiusNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetLSSPositionsNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectGetLSSRadiiNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectIsSphereHitNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpHitObjectIsLSSHitNV => struct { id_result_type: Id, id_result: Id, hit_object: Id }, + .OpRayQueryIsSphereHitNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryIsLSSHitNV => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpSubgroupShuffleINTEL => struct { id_result_type: Id, id_result: Id, data: Id, invocation_id: Id }, + .OpSubgroupShuffleDownINTEL => struct { id_result_type: Id, id_result: Id, current: Id, next: Id, delta: Id }, + .OpSubgroupShuffleUpINTEL => struct { id_result_type: Id, id_result: Id, previous: Id, current: Id, delta: Id }, + .OpSubgroupShuffleXorINTEL => struct { id_result_type: Id, id_result: Id, data: Id, value: Id }, + .OpSubgroupBlockReadINTEL => struct { id_result_type: Id, id_result: Id, ptr: Id }, + .OpSubgroupBlockWriteINTEL => struct { ptr: Id, data: Id }, + .OpSubgroupImageBlockReadINTEL => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id }, + .OpSubgroupImageBlockWriteINTEL => struct { image: Id, coordinate: Id, data: Id }, + .OpSubgroupImageMediaBlockReadINTEL => struct { id_result_type: Id, id_result: Id, image: Id, coordinate: Id, width: Id, height: Id }, + .OpSubgroupImageMediaBlockWriteINTEL => struct { image: Id, coordinate: Id, width: Id, height: Id, data: Id }, + .OpUCountLeadingZerosINTEL => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpUCountTrailingZerosINTEL => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpAbsISubINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpAbsUSubINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpIAddSatINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUAddSatINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpIAverageINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUAverageINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpIAverageRoundedINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUAverageRoundedINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpISubSatINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUSubSatINTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpIMul32x16INTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpUMul32x16INTEL => struct { id_result_type: Id, id_result: Id, operand_1: Id, operand_2: Id }, + .OpAtomicFMinEXT => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAtomicFMaxEXT => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpAssumeTrueKHR => struct { condition: Id }, + .OpExpectKHR => struct { id_result_type: Id, id_result: Id, value: Id, expected_value: Id }, + .OpDecorateString => struct { target: Id, decoration: Decoration.Extended }, + .OpMemberDecorateString => struct { struct_type: Id, member: LiteralInteger, decoration: Decoration.Extended }, .OpLoopControlINTEL => struct { loop_control_parameters: []const LiteralInteger = &.{} }, - .OpReadPipeBlockingINTEL => struct { id_result_type: IdResultType, id_result: IdResult, packet_size: IdRef, packet_alignment: IdRef }, - .OpWritePipeBlockingINTEL => struct { id_result_type: IdResultType, id_result: IdResult, packet_size: IdRef, packet_alignment: IdRef }, - .OpFPGARegINTEL => struct { id_result_type: IdResultType, id_result: IdResult, result: IdRef, input: IdRef }, - .OpRayQueryGetRayTMinKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef }, - .OpRayQueryGetRayFlagsKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef }, - .OpRayQueryGetIntersectionTKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionInstanceCustomIndexKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionInstanceIdKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionGeometryIndexKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionPrimitiveIndexKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionBarycentricsKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionFrontFaceKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionCandidateAABBOpaqueKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef }, - .OpRayQueryGetIntersectionObjectRayDirectionKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionObjectRayOriginKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetWorldRayDirectionKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef }, - .OpRayQueryGetWorldRayOriginKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef }, - .OpRayQueryGetIntersectionObjectToWorldKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpRayQueryGetIntersectionWorldToObjectKHR => struct { id_result_type: IdResultType, id_result: IdResult, rayquery: IdRef, intersection: IdRef }, - .OpAtomicFAddEXT => struct { id_result_type: IdResultType, id_result: IdResult, pointer: IdRef, memory: IdScope, semantics: IdMemorySemantics, value: IdRef }, - .OpTypeBufferSurfaceINTEL => struct { id_result: IdResult, accessqualifier: AccessQualifier }, - .OpTypeStructContinuedINTEL => struct { id_ref: []const IdRef = &.{} }, - .OpConstantCompositeContinuedINTEL => struct { constituents: []const IdRef = &.{} }, - .OpSpecConstantCompositeContinuedINTEL => struct { constituents: []const IdRef = &.{} }, - .OpCompositeConstructContinuedINTEL => struct { id_result_type: IdResultType, id_result: IdResult, constituents: []const IdRef = &.{} }, - .OpConvertFToBF16INTEL => struct { id_result_type: IdResultType, id_result: IdResult, float_value: IdRef }, - .OpConvertBF16ToFINTEL => struct { id_result_type: IdResultType, id_result: IdResult, bfloat16_value: IdRef }, - .OpControlBarrierArriveINTEL => struct { execution: IdScope, memory: IdScope, semantics: IdMemorySemantics }, - .OpControlBarrierWaitINTEL => struct { execution: IdScope, memory: IdScope, semantics: IdMemorySemantics }, - .OpGroupIMulKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupFMulKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupBitwiseAndKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupBitwiseOrKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupBitwiseXorKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupLogicalAndKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupLogicalOrKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpGroupLogicalXorKHR => struct { id_result_type: IdResultType, id_result: IdResult, execution: IdScope, operation: GroupOperation, x: IdRef }, - .OpMaskedGatherINTEL => struct { id_result_type: IdResultType, id_result: IdResult, ptrvector: IdRef, alignment: LiteralInteger, mask: IdRef, fillempty: IdRef }, - .OpMaskedScatterINTEL => struct { inputvector: IdRef, ptrvector: IdRef, alignment: LiteralInteger, mask: IdRef }, + .OpReadPipeBlockingINTEL => struct { id_result_type: Id, id_result: Id, packet_size: Id, packet_alignment: Id }, + .OpWritePipeBlockingINTEL => struct { id_result_type: Id, id_result: Id, packet_size: Id, packet_alignment: Id }, + .OpFPGARegINTEL => struct { id_result_type: Id, id_result: Id, input: Id }, + .OpRayQueryGetRayTMinKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id }, + .OpRayQueryGetRayFlagsKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id }, + .OpRayQueryGetIntersectionTKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionInstanceCustomIndexKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionInstanceIdKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionGeometryIndexKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionPrimitiveIndexKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionBarycentricsKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionFrontFaceKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionCandidateAABBOpaqueKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id }, + .OpRayQueryGetIntersectionObjectRayDirectionKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionObjectRayOriginKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetWorldRayDirectionKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id }, + .OpRayQueryGetWorldRayOriginKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id }, + .OpRayQueryGetIntersectionObjectToWorldKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpRayQueryGetIntersectionWorldToObjectKHR => struct { id_result_type: Id, id_result: Id, ray_query: Id, intersection: Id }, + .OpAtomicFAddEXT => struct { id_result_type: Id, id_result: Id, pointer: Id, memory: Id, semantics: Id, value: Id }, + .OpTypeBufferSurfaceINTEL => struct { id_result: Id, access_qualifier: AccessQualifier }, + .OpTypeStructContinuedINTEL => struct { id_ref: []const Id = &.{} }, + .OpConstantCompositeContinuedINTEL => struct { constituents: []const Id = &.{} }, + .OpSpecConstantCompositeContinuedINTEL => struct { constituents: []const Id = &.{} }, + .OpCompositeConstructContinuedINTEL => struct { id_result_type: Id, id_result: Id, constituents: []const Id = &.{} }, + .OpConvertFToBF16INTEL => struct { id_result_type: Id, id_result: Id, float_value: Id }, + .OpConvertBF16ToFINTEL => struct { id_result_type: Id, id_result: Id, b_float16_value: Id }, + .OpControlBarrierArriveINTEL => struct { execution: Id, memory: Id, semantics: Id }, + .OpControlBarrierWaitINTEL => struct { execution: Id, memory: Id, semantics: Id }, + .OpArithmeticFenceEXT => struct { id_result_type: Id, id_result: Id, target: Id }, + .OpTaskSequenceCreateINTEL => struct { id_result_type: Id, id_result: Id, function: Id, pipelined: LiteralInteger, use_stall_enable_clusters: LiteralInteger, get_capacity: LiteralInteger, async_capacity: LiteralInteger }, + .OpTaskSequenceAsyncINTEL => struct { sequence: Id, arguments: []const Id = &.{} }, + .OpTaskSequenceGetINTEL => struct { id_result_type: Id, id_result: Id, sequence: Id }, + .OpTaskSequenceReleaseINTEL => struct { sequence: Id }, + .OpTypeTaskSequenceINTEL => struct { id_result: Id }, + .OpSubgroupBlockPrefetchINTEL => struct { ptr: Id, num_bytes: Id, memory_access: ?MemoryAccess.Extended = null }, + .OpSubgroup2DBlockLoadINTEL => struct { element_size: Id, block_width: Id, block_height: Id, block_count: Id, src_base_pointer: Id, memory_width: Id, memory_height: Id, memory_pitch: Id, coordinate: Id, dst_pointer: Id }, + .OpSubgroup2DBlockLoadTransformINTEL => struct { element_size: Id, block_width: Id, block_height: Id, block_count: Id, src_base_pointer: Id, memory_width: Id, memory_height: Id, memory_pitch: Id, coordinate: Id, dst_pointer: Id }, + .OpSubgroup2DBlockLoadTransposeINTEL => struct { element_size: Id, block_width: Id, block_height: Id, block_count: Id, src_base_pointer: Id, memory_width: Id, memory_height: Id, memory_pitch: Id, coordinate: Id, dst_pointer: Id }, + .OpSubgroup2DBlockPrefetchINTEL => struct { element_size: Id, block_width: Id, block_height: Id, block_count: Id, src_base_pointer: Id, memory_width: Id, memory_height: Id, memory_pitch: Id, coordinate: Id }, + .OpSubgroup2DBlockStoreINTEL => struct { element_size: Id, block_width: Id, block_height: Id, block_count: Id, src_pointer: Id, dst_base_pointer: Id, memory_width: Id, memory_height: Id, memory_pitch: Id, coordinate: Id }, + .OpSubgroupMatrixMultiplyAccumulateINTEL => struct { id_result_type: Id, id_result: Id, k_dim: Id, matrix_a: Id, matrix_b: Id, matrix_c: Id, matrix_multiply_accumulate_operands: ?MatrixMultiplyAccumulateOperands = null }, + .OpBitwiseFunctionINTEL => struct { id_result_type: Id, id_result: Id, a: Id, b: Id, c: Id, lut_index: Id }, + .OpGroupIMulKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupFMulKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupBitwiseAndKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupBitwiseOrKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupBitwiseXorKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupLogicalAndKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupLogicalOrKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpGroupLogicalXorKHR => struct { id_result_type: Id, id_result: Id, execution: Id, operation: GroupOperation, x: Id }, + .OpRoundFToTF32INTEL => struct { id_result_type: Id, id_result: Id, float_value: Id }, + .OpMaskedGatherINTEL => struct { id_result_type: Id, id_result: Id, ptr_vector: Id, alignment: LiteralInteger, mask: Id, fill_empty: Id }, + .OpMaskedScatterINTEL => struct { input_vector: Id, ptr_vector: Id, alignment: LiteralInteger, mask: Id }, + .OpConvertHandleToImageINTEL => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertHandleToSamplerINTEL => struct { id_result_type: Id, id_result: Id, operand: Id }, + .OpConvertHandleToSampledImageINTEL => struct { id_result_type: Id, id_result: Id, operand: Id }, }; } pub fn class(self: Opcode) Class { return switch (self) { - .OpNop => .Miscellaneous, - .OpUndef => .Miscellaneous, - .OpSourceContinued => .Debug, - .OpSource => .Debug, - .OpSourceExtension => .Debug, - .OpName => .Debug, - .OpMemberName => .Debug, - .OpString => .Debug, - .OpLine => .Debug, - .OpExtension => .Extension, - .OpExtInstImport => .Extension, - .OpExtInst => .Extension, - .OpMemoryModel => .ModeSetting, - .OpEntryPoint => .ModeSetting, - .OpExecutionMode => .ModeSetting, - .OpCapability => .ModeSetting, - .OpTypeVoid => .TypeDeclaration, - .OpTypeBool => .TypeDeclaration, - .OpTypeInt => .TypeDeclaration, - .OpTypeFloat => .TypeDeclaration, - .OpTypeVector => .TypeDeclaration, - .OpTypeMatrix => .TypeDeclaration, - .OpTypeImage => .TypeDeclaration, - .OpTypeSampler => .TypeDeclaration, - .OpTypeSampledImage => .TypeDeclaration, - .OpTypeArray => .TypeDeclaration, - .OpTypeRuntimeArray => .TypeDeclaration, - .OpTypeStruct => .TypeDeclaration, - .OpTypeOpaque => .TypeDeclaration, - .OpTypePointer => .TypeDeclaration, - .OpTypeFunction => .TypeDeclaration, - .OpTypeEvent => .TypeDeclaration, - .OpTypeDeviceEvent => .TypeDeclaration, - .OpTypeReserveId => .TypeDeclaration, - .OpTypeQueue => .TypeDeclaration, - .OpTypePipe => .TypeDeclaration, - .OpTypeForwardPointer => .TypeDeclaration, - .OpConstantTrue => .ConstantCreation, - .OpConstantFalse => .ConstantCreation, - .OpConstant => .ConstantCreation, - .OpConstantComposite => .ConstantCreation, - .OpConstantSampler => .ConstantCreation, - .OpConstantNull => .ConstantCreation, - .OpSpecConstantTrue => .ConstantCreation, - .OpSpecConstantFalse => .ConstantCreation, - .OpSpecConstant => .ConstantCreation, - .OpSpecConstantComposite => .ConstantCreation, - .OpSpecConstantOp => .ConstantCreation, - .OpFunction => .Function, - .OpFunctionParameter => .Function, - .OpFunctionEnd => .Function, - .OpFunctionCall => .Function, - .OpVariable => .Memory, - .OpImageTexelPointer => .Memory, - .OpLoad => .Memory, - .OpStore => .Memory, - .OpCopyMemory => .Memory, - .OpCopyMemorySized => .Memory, - .OpAccessChain => .Memory, - .OpInBoundsAccessChain => .Memory, - .OpPtrAccessChain => .Memory, - .OpArrayLength => .Memory, - .OpGenericPtrMemSemantics => .Memory, - .OpInBoundsPtrAccessChain => .Memory, - .OpDecorate => .Annotation, - .OpMemberDecorate => .Annotation, - .OpDecorationGroup => .Annotation, - .OpGroupDecorate => .Annotation, - .OpGroupMemberDecorate => .Annotation, - .OpVectorExtractDynamic => .Composite, - .OpVectorInsertDynamic => .Composite, - .OpVectorShuffle => .Composite, - .OpCompositeConstruct => .Composite, - .OpCompositeExtract => .Composite, - .OpCompositeInsert => .Composite, - .OpCopyObject => .Composite, - .OpTranspose => .Composite, - .OpSampledImage => .Image, - .OpImageSampleImplicitLod => .Image, - .OpImageSampleExplicitLod => .Image, - .OpImageSampleDrefImplicitLod => .Image, - .OpImageSampleDrefExplicitLod => .Image, - .OpImageSampleProjImplicitLod => .Image, - .OpImageSampleProjExplicitLod => .Image, - .OpImageSampleProjDrefImplicitLod => .Image, - .OpImageSampleProjDrefExplicitLod => .Image, - .OpImageFetch => .Image, - .OpImageGather => .Image, - .OpImageDrefGather => .Image, - .OpImageRead => .Image, - .OpImageWrite => .Image, - .OpImage => .Image, - .OpImageQueryFormat => .Image, - .OpImageQueryOrder => .Image, - .OpImageQuerySizeLod => .Image, - .OpImageQuerySize => .Image, - .OpImageQueryLod => .Image, - .OpImageQueryLevels => .Image, - .OpImageQuerySamples => .Image, - .OpConvertFToU => .Conversion, - .OpConvertFToS => .Conversion, - .OpConvertSToF => .Conversion, - .OpConvertUToF => .Conversion, - .OpUConvert => .Conversion, - .OpSConvert => .Conversion, - .OpFConvert => .Conversion, - .OpQuantizeToF16 => .Conversion, - .OpConvertPtrToU => .Conversion, - .OpSatConvertSToU => .Conversion, - .OpSatConvertUToS => .Conversion, - .OpConvertUToPtr => .Conversion, - .OpPtrCastToGeneric => .Conversion, - .OpGenericCastToPtr => .Conversion, - .OpGenericCastToPtrExplicit => .Conversion, - .OpBitcast => .Conversion, - .OpSNegate => .Arithmetic, - .OpFNegate => .Arithmetic, - .OpIAdd => .Arithmetic, - .OpFAdd => .Arithmetic, - .OpISub => .Arithmetic, - .OpFSub => .Arithmetic, - .OpIMul => .Arithmetic, - .OpFMul => .Arithmetic, - .OpUDiv => .Arithmetic, - .OpSDiv => .Arithmetic, - .OpFDiv => .Arithmetic, - .OpUMod => .Arithmetic, - .OpSRem => .Arithmetic, - .OpSMod => .Arithmetic, - .OpFRem => .Arithmetic, - .OpFMod => .Arithmetic, - .OpVectorTimesScalar => .Arithmetic, - .OpMatrixTimesScalar => .Arithmetic, - .OpVectorTimesMatrix => .Arithmetic, - .OpMatrixTimesVector => .Arithmetic, - .OpMatrixTimesMatrix => .Arithmetic, - .OpOuterProduct => .Arithmetic, - .OpDot => .Arithmetic, - .OpIAddCarry => .Arithmetic, - .OpISubBorrow => .Arithmetic, - .OpUMulExtended => .Arithmetic, - .OpSMulExtended => .Arithmetic, - .OpAny => .RelationalAndLogical, - .OpAll => .RelationalAndLogical, - .OpIsNan => .RelationalAndLogical, - .OpIsInf => .RelationalAndLogical, - .OpIsFinite => .RelationalAndLogical, - .OpIsNormal => .RelationalAndLogical, - .OpSignBitSet => .RelationalAndLogical, - .OpLessOrGreater => .RelationalAndLogical, - .OpOrdered => .RelationalAndLogical, - .OpUnordered => .RelationalAndLogical, - .OpLogicalEqual => .RelationalAndLogical, - .OpLogicalNotEqual => .RelationalAndLogical, - .OpLogicalOr => .RelationalAndLogical, - .OpLogicalAnd => .RelationalAndLogical, - .OpLogicalNot => .RelationalAndLogical, - .OpSelect => .RelationalAndLogical, - .OpIEqual => .RelationalAndLogical, - .OpINotEqual => .RelationalAndLogical, - .OpUGreaterThan => .RelationalAndLogical, - .OpSGreaterThan => .RelationalAndLogical, - .OpUGreaterThanEqual => .RelationalAndLogical, - .OpSGreaterThanEqual => .RelationalAndLogical, - .OpULessThan => .RelationalAndLogical, - .OpSLessThan => .RelationalAndLogical, - .OpULessThanEqual => .RelationalAndLogical, - .OpSLessThanEqual => .RelationalAndLogical, - .OpFOrdEqual => .RelationalAndLogical, - .OpFUnordEqual => .RelationalAndLogical, - .OpFOrdNotEqual => .RelationalAndLogical, - .OpFUnordNotEqual => .RelationalAndLogical, - .OpFOrdLessThan => .RelationalAndLogical, - .OpFUnordLessThan => .RelationalAndLogical, - .OpFOrdGreaterThan => .RelationalAndLogical, - .OpFUnordGreaterThan => .RelationalAndLogical, - .OpFOrdLessThanEqual => .RelationalAndLogical, - .OpFUnordLessThanEqual => .RelationalAndLogical, - .OpFOrdGreaterThanEqual => .RelationalAndLogical, - .OpFUnordGreaterThanEqual => .RelationalAndLogical, - .OpShiftRightLogical => .Bit, - .OpShiftRightArithmetic => .Bit, - .OpShiftLeftLogical => .Bit, - .OpBitwiseOr => .Bit, - .OpBitwiseXor => .Bit, - .OpBitwiseAnd => .Bit, - .OpNot => .Bit, - .OpBitFieldInsert => .Bit, - .OpBitFieldSExtract => .Bit, - .OpBitFieldUExtract => .Bit, - .OpBitReverse => .Bit, - .OpBitCount => .Bit, - .OpDPdx => .Derivative, - .OpDPdy => .Derivative, - .OpFwidth => .Derivative, - .OpDPdxFine => .Derivative, - .OpDPdyFine => .Derivative, - .OpFwidthFine => .Derivative, - .OpDPdxCoarse => .Derivative, - .OpDPdyCoarse => .Derivative, - .OpFwidthCoarse => .Derivative, - .OpEmitVertex => .Primitive, - .OpEndPrimitive => .Primitive, - .OpEmitStreamVertex => .Primitive, - .OpEndStreamPrimitive => .Primitive, - .OpControlBarrier => .Barrier, - .OpMemoryBarrier => .Barrier, - .OpAtomicLoad => .Atomic, - .OpAtomicStore => .Atomic, - .OpAtomicExchange => .Atomic, - .OpAtomicCompareExchange => .Atomic, - .OpAtomicCompareExchangeWeak => .Atomic, - .OpAtomicIIncrement => .Atomic, - .OpAtomicIDecrement => .Atomic, - .OpAtomicIAdd => .Atomic, - .OpAtomicISub => .Atomic, - .OpAtomicSMin => .Atomic, - .OpAtomicUMin => .Atomic, - .OpAtomicSMax => .Atomic, - .OpAtomicUMax => .Atomic, - .OpAtomicAnd => .Atomic, - .OpAtomicOr => .Atomic, - .OpAtomicXor => .Atomic, - .OpPhi => .ControlFlow, - .OpLoopMerge => .ControlFlow, - .OpSelectionMerge => .ControlFlow, - .OpLabel => .ControlFlow, - .OpBranch => .ControlFlow, - .OpBranchConditional => .ControlFlow, - .OpSwitch => .ControlFlow, - .OpKill => .ControlFlow, - .OpReturn => .ControlFlow, - .OpReturnValue => .ControlFlow, - .OpUnreachable => .ControlFlow, - .OpLifetimeStart => .ControlFlow, - .OpLifetimeStop => .ControlFlow, - .OpGroupAsyncCopy => .Group, - .OpGroupWaitEvents => .Group, - .OpGroupAll => .Group, - .OpGroupAny => .Group, - .OpGroupBroadcast => .Group, - .OpGroupIAdd => .Group, - .OpGroupFAdd => .Group, - .OpGroupFMin => .Group, - .OpGroupUMin => .Group, - .OpGroupSMin => .Group, - .OpGroupFMax => .Group, - .OpGroupUMax => .Group, - .OpGroupSMax => .Group, - .OpReadPipe => .Pipe, - .OpWritePipe => .Pipe, - .OpReservedReadPipe => .Pipe, - .OpReservedWritePipe => .Pipe, - .OpReserveReadPipePackets => .Pipe, - .OpReserveWritePipePackets => .Pipe, - .OpCommitReadPipe => .Pipe, - .OpCommitWritePipe => .Pipe, - .OpIsValidReserveId => .Pipe, - .OpGetNumPipePackets => .Pipe, - .OpGetMaxPipePackets => .Pipe, - .OpGroupReserveReadPipePackets => .Pipe, - .OpGroupReserveWritePipePackets => .Pipe, - .OpGroupCommitReadPipe => .Pipe, - .OpGroupCommitWritePipe => .Pipe, - .OpEnqueueMarker => .DeviceSideEnqueue, - .OpEnqueueKernel => .DeviceSideEnqueue, - .OpGetKernelNDrangeSubGroupCount => .DeviceSideEnqueue, - .OpGetKernelNDrangeMaxSubGroupSize => .DeviceSideEnqueue, - .OpGetKernelWorkGroupSize => .DeviceSideEnqueue, - .OpGetKernelPreferredWorkGroupSizeMultiple => .DeviceSideEnqueue, - .OpRetainEvent => .DeviceSideEnqueue, - .OpReleaseEvent => .DeviceSideEnqueue, - .OpCreateUserEvent => .DeviceSideEnqueue, - .OpIsValidEvent => .DeviceSideEnqueue, - .OpSetUserEventStatus => .DeviceSideEnqueue, - .OpCaptureEventProfilingInfo => .DeviceSideEnqueue, - .OpGetDefaultQueue => .DeviceSideEnqueue, - .OpBuildNDRange => .DeviceSideEnqueue, - .OpImageSparseSampleImplicitLod => .Image, - .OpImageSparseSampleExplicitLod => .Image, - .OpImageSparseSampleDrefImplicitLod => .Image, - .OpImageSparseSampleDrefExplicitLod => .Image, - .OpImageSparseSampleProjImplicitLod => .Image, - .OpImageSparseSampleProjExplicitLod => .Image, - .OpImageSparseSampleProjDrefImplicitLod => .Image, - .OpImageSparseSampleProjDrefExplicitLod => .Image, - .OpImageSparseFetch => .Image, - .OpImageSparseGather => .Image, - .OpImageSparseDrefGather => .Image, - .OpImageSparseTexelsResident => .Image, - .OpNoLine => .Debug, - .OpAtomicFlagTestAndSet => .Atomic, - .OpAtomicFlagClear => .Atomic, - .OpImageSparseRead => .Image, - .OpSizeOf => .Miscellaneous, - .OpTypePipeStorage => .TypeDeclaration, - .OpConstantPipeStorage => .Pipe, - .OpCreatePipeFromPipeStorage => .Pipe, - .OpGetKernelLocalSizeForSubgroupCount => .DeviceSideEnqueue, - .OpGetKernelMaxNumSubgroups => .DeviceSideEnqueue, - .OpTypeNamedBarrier => .TypeDeclaration, - .OpNamedBarrierInitialize => .Barrier, - .OpMemoryNamedBarrier => .Barrier, - .OpModuleProcessed => .Debug, - .OpExecutionModeId => .ModeSetting, - .OpDecorateId => .Annotation, - .OpGroupNonUniformElect => .NonUniform, - .OpGroupNonUniformAll => .NonUniform, - .OpGroupNonUniformAny => .NonUniform, - .OpGroupNonUniformAllEqual => .NonUniform, - .OpGroupNonUniformBroadcast => .NonUniform, - .OpGroupNonUniformBroadcastFirst => .NonUniform, - .OpGroupNonUniformBallot => .NonUniform, - .OpGroupNonUniformInverseBallot => .NonUniform, - .OpGroupNonUniformBallotBitExtract => .NonUniform, - .OpGroupNonUniformBallotBitCount => .NonUniform, - .OpGroupNonUniformBallotFindLSB => .NonUniform, - .OpGroupNonUniformBallotFindMSB => .NonUniform, - .OpGroupNonUniformShuffle => .NonUniform, - .OpGroupNonUniformShuffleXor => .NonUniform, - .OpGroupNonUniformShuffleUp => .NonUniform, - .OpGroupNonUniformShuffleDown => .NonUniform, - .OpGroupNonUniformIAdd => .NonUniform, - .OpGroupNonUniformFAdd => .NonUniform, - .OpGroupNonUniformIMul => .NonUniform, - .OpGroupNonUniformFMul => .NonUniform, - .OpGroupNonUniformSMin => .NonUniform, - .OpGroupNonUniformUMin => .NonUniform, - .OpGroupNonUniformFMin => .NonUniform, - .OpGroupNonUniformSMax => .NonUniform, - .OpGroupNonUniformUMax => .NonUniform, - .OpGroupNonUniformFMax => .NonUniform, - .OpGroupNonUniformBitwiseAnd => .NonUniform, - .OpGroupNonUniformBitwiseOr => .NonUniform, - .OpGroupNonUniformBitwiseXor => .NonUniform, - .OpGroupNonUniformLogicalAnd => .NonUniform, - .OpGroupNonUniformLogicalOr => .NonUniform, - .OpGroupNonUniformLogicalXor => .NonUniform, - .OpGroupNonUniformQuadBroadcast => .NonUniform, - .OpGroupNonUniformQuadSwap => .NonUniform, - .OpCopyLogical => .Composite, - .OpPtrEqual => .Memory, - .OpPtrNotEqual => .Memory, - .OpPtrDiff => .Memory, - .OpColorAttachmentReadEXT => .Image, - .OpDepthAttachmentReadEXT => .Image, - .OpStencilAttachmentReadEXT => .Image, - .OpTerminateInvocation => .ControlFlow, - .OpSubgroupBallotKHR => .Group, - .OpSubgroupFirstInvocationKHR => .Group, - .OpSubgroupAllKHR => .Group, - .OpSubgroupAnyKHR => .Group, - .OpSubgroupAllEqualKHR => .Group, - .OpGroupNonUniformRotateKHR => .Group, - .OpSubgroupReadInvocationKHR => .Group, - .OpTraceRayKHR => .Reserved, - .OpExecuteCallableKHR => .Reserved, - .OpConvertUToAccelerationStructureKHR => .Reserved, - .OpIgnoreIntersectionKHR => .Reserved, - .OpTerminateRayKHR => .Reserved, - .OpSDot => .Arithmetic, - .OpUDot => .Arithmetic, - .OpSUDot => .Arithmetic, - .OpSDotAccSat => .Arithmetic, - .OpUDotAccSat => .Arithmetic, - .OpSUDotAccSat => .Arithmetic, - .OpTypeCooperativeMatrixKHR => .TypeDeclaration, - .OpCooperativeMatrixLoadKHR => .Memory, - .OpCooperativeMatrixStoreKHR => .Memory, - .OpCooperativeMatrixMulAddKHR => .Arithmetic, - .OpCooperativeMatrixLengthKHR => .Miscellaneous, - .OpTypeRayQueryKHR => .TypeDeclaration, - .OpRayQueryInitializeKHR => .Reserved, - .OpRayQueryTerminateKHR => .Reserved, - .OpRayQueryGenerateIntersectionKHR => .Reserved, - .OpRayQueryConfirmIntersectionKHR => .Reserved, - .OpRayQueryProceedKHR => .Reserved, - .OpRayQueryGetIntersectionTypeKHR => .Reserved, - .OpImageSampleWeightedQCOM => .Image, - .OpImageBoxFilterQCOM => .Image, - .OpImageBlockMatchSSDQCOM => .Image, - .OpImageBlockMatchSADQCOM => .Image, - .OpImageBlockMatchWindowSSDQCOM => .Image, - .OpImageBlockMatchWindowSADQCOM => .Image, - .OpImageBlockMatchGatherSSDQCOM => .Image, - .OpImageBlockMatchGatherSADQCOM => .Image, - .OpGroupIAddNonUniformAMD => .Group, - .OpGroupFAddNonUniformAMD => .Group, - .OpGroupFMinNonUniformAMD => .Group, - .OpGroupUMinNonUniformAMD => .Group, - .OpGroupSMinNonUniformAMD => .Group, - .OpGroupFMaxNonUniformAMD => .Group, - .OpGroupUMaxNonUniformAMD => .Group, - .OpGroupSMaxNonUniformAMD => .Group, - .OpFragmentMaskFetchAMD => .Reserved, - .OpFragmentFetchAMD => .Reserved, - .OpReadClockKHR => .Reserved, - .OpFinalizeNodePayloadsAMDX => .Reserved, - .OpFinishWritingNodePayloadAMDX => .Reserved, - .OpInitializeNodePayloadsAMDX => .Reserved, - .OpGroupNonUniformQuadAllKHR => .NonUniform, - .OpGroupNonUniformQuadAnyKHR => .NonUniform, - .OpHitObjectRecordHitMotionNV => .Reserved, - .OpHitObjectRecordHitWithIndexMotionNV => .Reserved, - .OpHitObjectRecordMissMotionNV => .Reserved, - .OpHitObjectGetWorldToObjectNV => .Reserved, - .OpHitObjectGetObjectToWorldNV => .Reserved, - .OpHitObjectGetObjectRayDirectionNV => .Reserved, - .OpHitObjectGetObjectRayOriginNV => .Reserved, - .OpHitObjectTraceRayMotionNV => .Reserved, - .OpHitObjectGetShaderRecordBufferHandleNV => .Reserved, - .OpHitObjectGetShaderBindingTableRecordIndexNV => .Reserved, - .OpHitObjectRecordEmptyNV => .Reserved, - .OpHitObjectTraceRayNV => .Reserved, - .OpHitObjectRecordHitNV => .Reserved, - .OpHitObjectRecordHitWithIndexNV => .Reserved, - .OpHitObjectRecordMissNV => .Reserved, - .OpHitObjectExecuteShaderNV => .Reserved, - .OpHitObjectGetCurrentTimeNV => .Reserved, - .OpHitObjectGetAttributesNV => .Reserved, - .OpHitObjectGetHitKindNV => .Reserved, - .OpHitObjectGetPrimitiveIndexNV => .Reserved, - .OpHitObjectGetGeometryIndexNV => .Reserved, - .OpHitObjectGetInstanceIdNV => .Reserved, - .OpHitObjectGetInstanceCustomIndexNV => .Reserved, - .OpHitObjectGetWorldRayDirectionNV => .Reserved, - .OpHitObjectGetWorldRayOriginNV => .Reserved, - .OpHitObjectGetRayTMaxNV => .Reserved, - .OpHitObjectGetRayTMinNV => .Reserved, - .OpHitObjectIsEmptyNV => .Reserved, - .OpHitObjectIsHitNV => .Reserved, - .OpHitObjectIsMissNV => .Reserved, - .OpReorderThreadWithHitObjectNV => .Reserved, - .OpReorderThreadWithHintNV => .Reserved, - .OpTypeHitObjectNV => .TypeDeclaration, - .OpImageSampleFootprintNV => .Image, - .OpEmitMeshTasksEXT => .Reserved, - .OpSetMeshOutputsEXT => .Reserved, - .OpGroupNonUniformPartitionNV => .NonUniform, - .OpWritePackedPrimitiveIndices4x8NV => .Reserved, - .OpFetchMicroTriangleVertexPositionNV => .Reserved, - .OpFetchMicroTriangleVertexBarycentricNV => .Reserved, - .OpReportIntersectionKHR => .Reserved, - .OpIgnoreIntersectionNV => .Reserved, - .OpTerminateRayNV => .Reserved, - .OpTraceNV => .Reserved, - .OpTraceMotionNV => .Reserved, - .OpTraceRayMotionNV => .Reserved, - .OpRayQueryGetIntersectionTriangleVertexPositionsKHR => .Reserved, - .OpTypeAccelerationStructureKHR => .TypeDeclaration, - .OpExecuteCallableNV => .Reserved, - .OpTypeCooperativeMatrixNV => .TypeDeclaration, - .OpCooperativeMatrixLoadNV => .Reserved, - .OpCooperativeMatrixStoreNV => .Reserved, - .OpCooperativeMatrixMulAddNV => .Reserved, - .OpCooperativeMatrixLengthNV => .Reserved, - .OpBeginInvocationInterlockEXT => .Reserved, - .OpEndInvocationInterlockEXT => .Reserved, - .OpDemoteToHelperInvocation => .ControlFlow, - .OpIsHelperInvocationEXT => .Reserved, - .OpConvertUToImageNV => .Reserved, - .OpConvertUToSamplerNV => .Reserved, - .OpConvertImageToUNV => .Reserved, - .OpConvertSamplerToUNV => .Reserved, - .OpConvertUToSampledImageNV => .Reserved, - .OpConvertSampledImageToUNV => .Reserved, - .OpSamplerImageAddressingModeNV => .Reserved, - .OpRawAccessChainNV => .Memory, - .OpSubgroupShuffleINTEL => .Group, - .OpSubgroupShuffleDownINTEL => .Group, - .OpSubgroupShuffleUpINTEL => .Group, - .OpSubgroupShuffleXorINTEL => .Group, - .OpSubgroupBlockReadINTEL => .Group, - .OpSubgroupBlockWriteINTEL => .Group, - .OpSubgroupImageBlockReadINTEL => .Group, - .OpSubgroupImageBlockWriteINTEL => .Group, - .OpSubgroupImageMediaBlockReadINTEL => .Group, - .OpSubgroupImageMediaBlockWriteINTEL => .Group, - .OpUCountLeadingZerosINTEL => .Reserved, - .OpUCountTrailingZerosINTEL => .Reserved, - .OpAbsISubINTEL => .Reserved, - .OpAbsUSubINTEL => .Reserved, - .OpIAddSatINTEL => .Reserved, - .OpUAddSatINTEL => .Reserved, - .OpIAverageINTEL => .Reserved, - .OpUAverageINTEL => .Reserved, - .OpIAverageRoundedINTEL => .Reserved, - .OpUAverageRoundedINTEL => .Reserved, - .OpISubSatINTEL => .Reserved, - .OpUSubSatINTEL => .Reserved, - .OpIMul32x16INTEL => .Reserved, - .OpUMul32x16INTEL => .Reserved, - .OpAtomicFMinEXT => .Atomic, - .OpAtomicFMaxEXT => .Atomic, - .OpAssumeTrueKHR => .Miscellaneous, - .OpExpectKHR => .Miscellaneous, - .OpDecorateString => .Annotation, - .OpMemberDecorateString => .Annotation, - .OpLoopControlINTEL => .Reserved, - .OpReadPipeBlockingINTEL => .Pipe, - .OpWritePipeBlockingINTEL => .Pipe, - .OpFPGARegINTEL => .Reserved, - .OpRayQueryGetRayTMinKHR => .Reserved, - .OpRayQueryGetRayFlagsKHR => .Reserved, - .OpRayQueryGetIntersectionTKHR => .Reserved, - .OpRayQueryGetIntersectionInstanceCustomIndexKHR => .Reserved, - .OpRayQueryGetIntersectionInstanceIdKHR => .Reserved, - .OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR => .Reserved, - .OpRayQueryGetIntersectionGeometryIndexKHR => .Reserved, - .OpRayQueryGetIntersectionPrimitiveIndexKHR => .Reserved, - .OpRayQueryGetIntersectionBarycentricsKHR => .Reserved, - .OpRayQueryGetIntersectionFrontFaceKHR => .Reserved, - .OpRayQueryGetIntersectionCandidateAABBOpaqueKHR => .Reserved, - .OpRayQueryGetIntersectionObjectRayDirectionKHR => .Reserved, - .OpRayQueryGetIntersectionObjectRayOriginKHR => .Reserved, - .OpRayQueryGetWorldRayDirectionKHR => .Reserved, - .OpRayQueryGetWorldRayOriginKHR => .Reserved, - .OpRayQueryGetIntersectionObjectToWorldKHR => .Reserved, - .OpRayQueryGetIntersectionWorldToObjectKHR => .Reserved, - .OpAtomicFAddEXT => .Atomic, - .OpTypeBufferSurfaceINTEL => .TypeDeclaration, - .OpTypeStructContinuedINTEL => .TypeDeclaration, - .OpConstantCompositeContinuedINTEL => .ConstantCreation, - .OpSpecConstantCompositeContinuedINTEL => .ConstantCreation, - .OpCompositeConstructContinuedINTEL => .Composite, - .OpConvertFToBF16INTEL => .Conversion, - .OpConvertBF16ToFINTEL => .Conversion, - .OpControlBarrierArriveINTEL => .Barrier, - .OpControlBarrierWaitINTEL => .Barrier, - .OpGroupIMulKHR => .Group, - .OpGroupFMulKHR => .Group, - .OpGroupBitwiseAndKHR => .Group, - .OpGroupBitwiseOrKHR => .Group, - .OpGroupBitwiseXorKHR => .Group, - .OpGroupLogicalAndKHR => .Group, - .OpGroupLogicalOrKHR => .Group, - .OpGroupLogicalXorKHR => .Group, - .OpMaskedGatherINTEL => .Memory, - .OpMaskedScatterINTEL => .Memory, + .OpNop => .miscellaneous, + .OpUndef => .miscellaneous, + .OpSourceContinued => .debug, + .OpSource => .debug, + .OpSourceExtension => .debug, + .OpName => .debug, + .OpMemberName => .debug, + .OpString => .debug, + .OpLine => .debug, + .OpExtension => .extension, + .OpExtInstImport => .extension, + .OpExtInst => .extension, + .OpMemoryModel => .mode_setting, + .OpEntryPoint => .mode_setting, + .OpExecutionMode => .mode_setting, + .OpCapability => .mode_setting, + .OpTypeVoid => .type_declaration, + .OpTypeBool => .type_declaration, + .OpTypeInt => .type_declaration, + .OpTypeFloat => .type_declaration, + .OpTypeVector => .type_declaration, + .OpTypeMatrix => .type_declaration, + .OpTypeImage => .type_declaration, + .OpTypeSampler => .type_declaration, + .OpTypeSampledImage => .type_declaration, + .OpTypeArray => .type_declaration, + .OpTypeRuntimeArray => .type_declaration, + .OpTypeStruct => .type_declaration, + .OpTypeOpaque => .type_declaration, + .OpTypePointer => .type_declaration, + .OpTypeFunction => .type_declaration, + .OpTypeEvent => .type_declaration, + .OpTypeDeviceEvent => .type_declaration, + .OpTypeReserveId => .type_declaration, + .OpTypeQueue => .type_declaration, + .OpTypePipe => .type_declaration, + .OpTypeForwardPointer => .type_declaration, + .OpConstantTrue => .constant_creation, + .OpConstantFalse => .constant_creation, + .OpConstant => .constant_creation, + .OpConstantComposite => .constant_creation, + .OpConstantSampler => .constant_creation, + .OpConstantNull => .constant_creation, + .OpSpecConstantTrue => .constant_creation, + .OpSpecConstantFalse => .constant_creation, + .OpSpecConstant => .constant_creation, + .OpSpecConstantComposite => .constant_creation, + .OpSpecConstantOp => .constant_creation, + .OpFunction => .function, + .OpFunctionParameter => .function, + .OpFunctionEnd => .function, + .OpFunctionCall => .function, + .OpVariable => .memory, + .OpImageTexelPointer => .memory, + .OpLoad => .memory, + .OpStore => .memory, + .OpCopyMemory => .memory, + .OpCopyMemorySized => .memory, + .OpAccessChain => .memory, + .OpInBoundsAccessChain => .memory, + .OpPtrAccessChain => .memory, + .OpArrayLength => .memory, + .OpGenericPtrMemSemantics => .memory, + .OpInBoundsPtrAccessChain => .memory, + .OpDecorate => .annotation, + .OpMemberDecorate => .annotation, + .OpDecorationGroup => .annotation, + .OpGroupDecorate => .annotation, + .OpGroupMemberDecorate => .annotation, + .OpVectorExtractDynamic => .composite, + .OpVectorInsertDynamic => .composite, + .OpVectorShuffle => .composite, + .OpCompositeConstruct => .composite, + .OpCompositeExtract => .composite, + .OpCompositeInsert => .composite, + .OpCopyObject => .composite, + .OpTranspose => .composite, + .OpSampledImage => .image, + .OpImageSampleImplicitLod => .image, + .OpImageSampleExplicitLod => .image, + .OpImageSampleDrefImplicitLod => .image, + .OpImageSampleDrefExplicitLod => .image, + .OpImageSampleProjImplicitLod => .image, + .OpImageSampleProjExplicitLod => .image, + .OpImageSampleProjDrefImplicitLod => .image, + .OpImageSampleProjDrefExplicitLod => .image, + .OpImageFetch => .image, + .OpImageGather => .image, + .OpImageDrefGather => .image, + .OpImageRead => .image, + .OpImageWrite => .image, + .OpImage => .image, + .OpImageQueryFormat => .image, + .OpImageQueryOrder => .image, + .OpImageQuerySizeLod => .image, + .OpImageQuerySize => .image, + .OpImageQueryLod => .image, + .OpImageQueryLevels => .image, + .OpImageQuerySamples => .image, + .OpConvertFToU => .conversion, + .OpConvertFToS => .conversion, + .OpConvertSToF => .conversion, + .OpConvertUToF => .conversion, + .OpUConvert => .conversion, + .OpSConvert => .conversion, + .OpFConvert => .conversion, + .OpQuantizeToF16 => .conversion, + .OpConvertPtrToU => .conversion, + .OpSatConvertSToU => .conversion, + .OpSatConvertUToS => .conversion, + .OpConvertUToPtr => .conversion, + .OpPtrCastToGeneric => .conversion, + .OpGenericCastToPtr => .conversion, + .OpGenericCastToPtrExplicit => .conversion, + .OpBitcast => .conversion, + .OpSNegate => .arithmetic, + .OpFNegate => .arithmetic, + .OpIAdd => .arithmetic, + .OpFAdd => .arithmetic, + .OpISub => .arithmetic, + .OpFSub => .arithmetic, + .OpIMul => .arithmetic, + .OpFMul => .arithmetic, + .OpUDiv => .arithmetic, + .OpSDiv => .arithmetic, + .OpFDiv => .arithmetic, + .OpUMod => .arithmetic, + .OpSRem => .arithmetic, + .OpSMod => .arithmetic, + .OpFRem => .arithmetic, + .OpFMod => .arithmetic, + .OpVectorTimesScalar => .arithmetic, + .OpMatrixTimesScalar => .arithmetic, + .OpVectorTimesMatrix => .arithmetic, + .OpMatrixTimesVector => .arithmetic, + .OpMatrixTimesMatrix => .arithmetic, + .OpOuterProduct => .arithmetic, + .OpDot => .arithmetic, + .OpIAddCarry => .arithmetic, + .OpISubBorrow => .arithmetic, + .OpUMulExtended => .arithmetic, + .OpSMulExtended => .arithmetic, + .OpAny => .relational_and_logical, + .OpAll => .relational_and_logical, + .OpIsNan => .relational_and_logical, + .OpIsInf => .relational_and_logical, + .OpIsFinite => .relational_and_logical, + .OpIsNormal => .relational_and_logical, + .OpSignBitSet => .relational_and_logical, + .OpLessOrGreater => .relational_and_logical, + .OpOrdered => .relational_and_logical, + .OpUnordered => .relational_and_logical, + .OpLogicalEqual => .relational_and_logical, + .OpLogicalNotEqual => .relational_and_logical, + .OpLogicalOr => .relational_and_logical, + .OpLogicalAnd => .relational_and_logical, + .OpLogicalNot => .relational_and_logical, + .OpSelect => .relational_and_logical, + .OpIEqual => .relational_and_logical, + .OpINotEqual => .relational_and_logical, + .OpUGreaterThan => .relational_and_logical, + .OpSGreaterThan => .relational_and_logical, + .OpUGreaterThanEqual => .relational_and_logical, + .OpSGreaterThanEqual => .relational_and_logical, + .OpULessThan => .relational_and_logical, + .OpSLessThan => .relational_and_logical, + .OpULessThanEqual => .relational_and_logical, + .OpSLessThanEqual => .relational_and_logical, + .OpFOrdEqual => .relational_and_logical, + .OpFUnordEqual => .relational_and_logical, + .OpFOrdNotEqual => .relational_and_logical, + .OpFUnordNotEqual => .relational_and_logical, + .OpFOrdLessThan => .relational_and_logical, + .OpFUnordLessThan => .relational_and_logical, + .OpFOrdGreaterThan => .relational_and_logical, + .OpFUnordGreaterThan => .relational_and_logical, + .OpFOrdLessThanEqual => .relational_and_logical, + .OpFUnordLessThanEqual => .relational_and_logical, + .OpFOrdGreaterThanEqual => .relational_and_logical, + .OpFUnordGreaterThanEqual => .relational_and_logical, + .OpShiftRightLogical => .bit, + .OpShiftRightArithmetic => .bit, + .OpShiftLeftLogical => .bit, + .OpBitwiseOr => .bit, + .OpBitwiseXor => .bit, + .OpBitwiseAnd => .bit, + .OpNot => .bit, + .OpBitFieldInsert => .bit, + .OpBitFieldSExtract => .bit, + .OpBitFieldUExtract => .bit, + .OpBitReverse => .bit, + .OpBitCount => .bit, + .OpDPdx => .derivative, + .OpDPdy => .derivative, + .OpFwidth => .derivative, + .OpDPdxFine => .derivative, + .OpDPdyFine => .derivative, + .OpFwidthFine => .derivative, + .OpDPdxCoarse => .derivative, + .OpDPdyCoarse => .derivative, + .OpFwidthCoarse => .derivative, + .OpEmitVertex => .primitive, + .OpEndPrimitive => .primitive, + .OpEmitStreamVertex => .primitive, + .OpEndStreamPrimitive => .primitive, + .OpControlBarrier => .barrier, + .OpMemoryBarrier => .barrier, + .OpAtomicLoad => .atomic, + .OpAtomicStore => .atomic, + .OpAtomicExchange => .atomic, + .OpAtomicCompareExchange => .atomic, + .OpAtomicCompareExchangeWeak => .atomic, + .OpAtomicIIncrement => .atomic, + .OpAtomicIDecrement => .atomic, + .OpAtomicIAdd => .atomic, + .OpAtomicISub => .atomic, + .OpAtomicSMin => .atomic, + .OpAtomicUMin => .atomic, + .OpAtomicSMax => .atomic, + .OpAtomicUMax => .atomic, + .OpAtomicAnd => .atomic, + .OpAtomicOr => .atomic, + .OpAtomicXor => .atomic, + .OpPhi => .control_flow, + .OpLoopMerge => .control_flow, + .OpSelectionMerge => .control_flow, + .OpLabel => .control_flow, + .OpBranch => .control_flow, + .OpBranchConditional => .control_flow, + .OpSwitch => .control_flow, + .OpKill => .control_flow, + .OpReturn => .control_flow, + .OpReturnValue => .control_flow, + .OpUnreachable => .control_flow, + .OpLifetimeStart => .control_flow, + .OpLifetimeStop => .control_flow, + .OpGroupAsyncCopy => .group, + .OpGroupWaitEvents => .group, + .OpGroupAll => .group, + .OpGroupAny => .group, + .OpGroupBroadcast => .group, + .OpGroupIAdd => .group, + .OpGroupFAdd => .group, + .OpGroupFMin => .group, + .OpGroupUMin => .group, + .OpGroupSMin => .group, + .OpGroupFMax => .group, + .OpGroupUMax => .group, + .OpGroupSMax => .group, + .OpReadPipe => .pipe, + .OpWritePipe => .pipe, + .OpReservedReadPipe => .pipe, + .OpReservedWritePipe => .pipe, + .OpReserveReadPipePackets => .pipe, + .OpReserveWritePipePackets => .pipe, + .OpCommitReadPipe => .pipe, + .OpCommitWritePipe => .pipe, + .OpIsValidReserveId => .pipe, + .OpGetNumPipePackets => .pipe, + .OpGetMaxPipePackets => .pipe, + .OpGroupReserveReadPipePackets => .pipe, + .OpGroupReserveWritePipePackets => .pipe, + .OpGroupCommitReadPipe => .pipe, + .OpGroupCommitWritePipe => .pipe, + .OpEnqueueMarker => .device_side_enqueue, + .OpEnqueueKernel => .device_side_enqueue, + .OpGetKernelNDrangeSubGroupCount => .device_side_enqueue, + .OpGetKernelNDrangeMaxSubGroupSize => .device_side_enqueue, + .OpGetKernelWorkGroupSize => .device_side_enqueue, + .OpGetKernelPreferredWorkGroupSizeMultiple => .device_side_enqueue, + .OpRetainEvent => .device_side_enqueue, + .OpReleaseEvent => .device_side_enqueue, + .OpCreateUserEvent => .device_side_enqueue, + .OpIsValidEvent => .device_side_enqueue, + .OpSetUserEventStatus => .device_side_enqueue, + .OpCaptureEventProfilingInfo => .device_side_enqueue, + .OpGetDefaultQueue => .device_side_enqueue, + .OpBuildNDRange => .device_side_enqueue, + .OpImageSparseSampleImplicitLod => .image, + .OpImageSparseSampleExplicitLod => .image, + .OpImageSparseSampleDrefImplicitLod => .image, + .OpImageSparseSampleDrefExplicitLod => .image, + .OpImageSparseSampleProjImplicitLod => .image, + .OpImageSparseSampleProjExplicitLod => .image, + .OpImageSparseSampleProjDrefImplicitLod => .image, + .OpImageSparseSampleProjDrefExplicitLod => .image, + .OpImageSparseFetch => .image, + .OpImageSparseGather => .image, + .OpImageSparseDrefGather => .image, + .OpImageSparseTexelsResident => .image, + .OpNoLine => .debug, + .OpAtomicFlagTestAndSet => .atomic, + .OpAtomicFlagClear => .atomic, + .OpImageSparseRead => .image, + .OpSizeOf => .miscellaneous, + .OpTypePipeStorage => .type_declaration, + .OpConstantPipeStorage => .pipe, + .OpCreatePipeFromPipeStorage => .pipe, + .OpGetKernelLocalSizeForSubgroupCount => .device_side_enqueue, + .OpGetKernelMaxNumSubgroups => .device_side_enqueue, + .OpTypeNamedBarrier => .type_declaration, + .OpNamedBarrierInitialize => .barrier, + .OpMemoryNamedBarrier => .barrier, + .OpModuleProcessed => .debug, + .OpExecutionModeId => .mode_setting, + .OpDecorateId => .annotation, + .OpGroupNonUniformElect => .non_uniform, + .OpGroupNonUniformAll => .non_uniform, + .OpGroupNonUniformAny => .non_uniform, + .OpGroupNonUniformAllEqual => .non_uniform, + .OpGroupNonUniformBroadcast => .non_uniform, + .OpGroupNonUniformBroadcastFirst => .non_uniform, + .OpGroupNonUniformBallot => .non_uniform, + .OpGroupNonUniformInverseBallot => .non_uniform, + .OpGroupNonUniformBallotBitExtract => .non_uniform, + .OpGroupNonUniformBallotBitCount => .non_uniform, + .OpGroupNonUniformBallotFindLSB => .non_uniform, + .OpGroupNonUniformBallotFindMSB => .non_uniform, + .OpGroupNonUniformShuffle => .non_uniform, + .OpGroupNonUniformShuffleXor => .non_uniform, + .OpGroupNonUniformShuffleUp => .non_uniform, + .OpGroupNonUniformShuffleDown => .non_uniform, + .OpGroupNonUniformIAdd => .non_uniform, + .OpGroupNonUniformFAdd => .non_uniform, + .OpGroupNonUniformIMul => .non_uniform, + .OpGroupNonUniformFMul => .non_uniform, + .OpGroupNonUniformSMin => .non_uniform, + .OpGroupNonUniformUMin => .non_uniform, + .OpGroupNonUniformFMin => .non_uniform, + .OpGroupNonUniformSMax => .non_uniform, + .OpGroupNonUniformUMax => .non_uniform, + .OpGroupNonUniformFMax => .non_uniform, + .OpGroupNonUniformBitwiseAnd => .non_uniform, + .OpGroupNonUniformBitwiseOr => .non_uniform, + .OpGroupNonUniformBitwiseXor => .non_uniform, + .OpGroupNonUniformLogicalAnd => .non_uniform, + .OpGroupNonUniformLogicalOr => .non_uniform, + .OpGroupNonUniformLogicalXor => .non_uniform, + .OpGroupNonUniformQuadBroadcast => .non_uniform, + .OpGroupNonUniformQuadSwap => .non_uniform, + .OpCopyLogical => .composite, + .OpPtrEqual => .memory, + .OpPtrNotEqual => .memory, + .OpPtrDiff => .memory, + .OpColorAttachmentReadEXT => .image, + .OpDepthAttachmentReadEXT => .image, + .OpStencilAttachmentReadEXT => .image, + .OpTypeTensorARM => .type_declaration, + .OpTensorReadARM => .tensor, + .OpTensorWriteARM => .tensor, + .OpTensorQuerySizeARM => .tensor, + .OpGraphConstantARM => .graph, + .OpGraphEntryPointARM => .graph, + .OpGraphARM => .graph, + .OpGraphInputARM => .graph, + .OpGraphSetOutputARM => .graph, + .OpGraphEndARM => .graph, + .OpTypeGraphARM => .type_declaration, + .OpTerminateInvocation => .control_flow, + .OpTypeUntypedPointerKHR => .type_declaration, + .OpUntypedVariableKHR => .memory, + .OpUntypedAccessChainKHR => .memory, + .OpUntypedInBoundsAccessChainKHR => .memory, + .OpSubgroupBallotKHR => .group, + .OpSubgroupFirstInvocationKHR => .group, + .OpUntypedPtrAccessChainKHR => .memory, + .OpUntypedInBoundsPtrAccessChainKHR => .memory, + .OpUntypedArrayLengthKHR => .memory, + .OpUntypedPrefetchKHR => .memory, + .OpSubgroupAllKHR => .group, + .OpSubgroupAnyKHR => .group, + .OpSubgroupAllEqualKHR => .group, + .OpGroupNonUniformRotateKHR => .group, + .OpSubgroupReadInvocationKHR => .group, + .OpExtInstWithForwardRefsKHR => .extension, + .OpTraceRayKHR => .reserved, + .OpExecuteCallableKHR => .reserved, + .OpConvertUToAccelerationStructureKHR => .reserved, + .OpIgnoreIntersectionKHR => .reserved, + .OpTerminateRayKHR => .reserved, + .OpSDot => .arithmetic, + .OpUDot => .arithmetic, + .OpSUDot => .arithmetic, + .OpSDotAccSat => .arithmetic, + .OpUDotAccSat => .arithmetic, + .OpSUDotAccSat => .arithmetic, + .OpTypeCooperativeMatrixKHR => .type_declaration, + .OpCooperativeMatrixLoadKHR => .memory, + .OpCooperativeMatrixStoreKHR => .memory, + .OpCooperativeMatrixMulAddKHR => .arithmetic, + .OpCooperativeMatrixLengthKHR => .miscellaneous, + .OpConstantCompositeReplicateEXT => .constant_creation, + .OpSpecConstantCompositeReplicateEXT => .constant_creation, + .OpCompositeConstructReplicateEXT => .composite, + .OpTypeRayQueryKHR => .type_declaration, + .OpRayQueryInitializeKHR => .reserved, + .OpRayQueryTerminateKHR => .reserved, + .OpRayQueryGenerateIntersectionKHR => .reserved, + .OpRayQueryConfirmIntersectionKHR => .reserved, + .OpRayQueryProceedKHR => .reserved, + .OpRayQueryGetIntersectionTypeKHR => .reserved, + .OpImageSampleWeightedQCOM => .image, + .OpImageBoxFilterQCOM => .image, + .OpImageBlockMatchSSDQCOM => .image, + .OpImageBlockMatchSADQCOM => .image, + .OpImageBlockMatchWindowSSDQCOM => .image, + .OpImageBlockMatchWindowSADQCOM => .image, + .OpImageBlockMatchGatherSSDQCOM => .image, + .OpImageBlockMatchGatherSADQCOM => .image, + .OpGroupIAddNonUniformAMD => .group, + .OpGroupFAddNonUniformAMD => .group, + .OpGroupFMinNonUniformAMD => .group, + .OpGroupUMinNonUniformAMD => .group, + .OpGroupSMinNonUniformAMD => .group, + .OpGroupFMaxNonUniformAMD => .group, + .OpGroupUMaxNonUniformAMD => .group, + .OpGroupSMaxNonUniformAMD => .group, + .OpFragmentMaskFetchAMD => .reserved, + .OpFragmentFetchAMD => .reserved, + .OpReadClockKHR => .reserved, + .OpAllocateNodePayloadsAMDX => .reserved, + .OpEnqueueNodePayloadsAMDX => .reserved, + .OpTypeNodePayloadArrayAMDX => .reserved, + .OpFinishWritingNodePayloadAMDX => .reserved, + .OpNodePayloadArrayLengthAMDX => .reserved, + .OpIsNodePayloadValidAMDX => .reserved, + .OpConstantStringAMDX => .reserved, + .OpSpecConstantStringAMDX => .reserved, + .OpGroupNonUniformQuadAllKHR => .non_uniform, + .OpGroupNonUniformQuadAnyKHR => .non_uniform, + .OpHitObjectRecordHitMotionNV => .reserved, + .OpHitObjectRecordHitWithIndexMotionNV => .reserved, + .OpHitObjectRecordMissMotionNV => .reserved, + .OpHitObjectGetWorldToObjectNV => .reserved, + .OpHitObjectGetObjectToWorldNV => .reserved, + .OpHitObjectGetObjectRayDirectionNV => .reserved, + .OpHitObjectGetObjectRayOriginNV => .reserved, + .OpHitObjectTraceRayMotionNV => .reserved, + .OpHitObjectGetShaderRecordBufferHandleNV => .reserved, + .OpHitObjectGetShaderBindingTableRecordIndexNV => .reserved, + .OpHitObjectRecordEmptyNV => .reserved, + .OpHitObjectTraceRayNV => .reserved, + .OpHitObjectRecordHitNV => .reserved, + .OpHitObjectRecordHitWithIndexNV => .reserved, + .OpHitObjectRecordMissNV => .reserved, + .OpHitObjectExecuteShaderNV => .reserved, + .OpHitObjectGetCurrentTimeNV => .reserved, + .OpHitObjectGetAttributesNV => .reserved, + .OpHitObjectGetHitKindNV => .reserved, + .OpHitObjectGetPrimitiveIndexNV => .reserved, + .OpHitObjectGetGeometryIndexNV => .reserved, + .OpHitObjectGetInstanceIdNV => .reserved, + .OpHitObjectGetInstanceCustomIndexNV => .reserved, + .OpHitObjectGetWorldRayDirectionNV => .reserved, + .OpHitObjectGetWorldRayOriginNV => .reserved, + .OpHitObjectGetRayTMaxNV => .reserved, + .OpHitObjectGetRayTMinNV => .reserved, + .OpHitObjectIsEmptyNV => .reserved, + .OpHitObjectIsHitNV => .reserved, + .OpHitObjectIsMissNV => .reserved, + .OpReorderThreadWithHitObjectNV => .reserved, + .OpReorderThreadWithHintNV => .reserved, + .OpTypeHitObjectNV => .type_declaration, + .OpImageSampleFootprintNV => .image, + .OpTypeCooperativeVectorNV => .type_declaration, + .OpCooperativeVectorMatrixMulNV => .reserved, + .OpCooperativeVectorOuterProductAccumulateNV => .reserved, + .OpCooperativeVectorReduceSumAccumulateNV => .reserved, + .OpCooperativeVectorMatrixMulAddNV => .reserved, + .OpCooperativeMatrixConvertNV => .conversion, + .OpEmitMeshTasksEXT => .reserved, + .OpSetMeshOutputsEXT => .reserved, + .OpGroupNonUniformPartitionNV => .non_uniform, + .OpWritePackedPrimitiveIndices4x8NV => .reserved, + .OpFetchMicroTriangleVertexPositionNV => .reserved, + .OpFetchMicroTriangleVertexBarycentricNV => .reserved, + .OpCooperativeVectorLoadNV => .memory, + .OpCooperativeVectorStoreNV => .memory, + .OpReportIntersectionKHR => .reserved, + .OpIgnoreIntersectionNV => .reserved, + .OpTerminateRayNV => .reserved, + .OpTraceNV => .reserved, + .OpTraceMotionNV => .reserved, + .OpTraceRayMotionNV => .reserved, + .OpRayQueryGetIntersectionTriangleVertexPositionsKHR => .reserved, + .OpTypeAccelerationStructureKHR => .type_declaration, + .OpExecuteCallableNV => .reserved, + .OpRayQueryGetClusterIdNV => .reserved, + .OpHitObjectGetClusterIdNV => .reserved, + .OpTypeCooperativeMatrixNV => .type_declaration, + .OpCooperativeMatrixLoadNV => .reserved, + .OpCooperativeMatrixStoreNV => .reserved, + .OpCooperativeMatrixMulAddNV => .reserved, + .OpCooperativeMatrixLengthNV => .reserved, + .OpBeginInvocationInterlockEXT => .reserved, + .OpEndInvocationInterlockEXT => .reserved, + .OpCooperativeMatrixReduceNV => .arithmetic, + .OpCooperativeMatrixLoadTensorNV => .memory, + .OpCooperativeMatrixStoreTensorNV => .memory, + .OpCooperativeMatrixPerElementOpNV => .function, + .OpTypeTensorLayoutNV => .type_declaration, + .OpTypeTensorViewNV => .type_declaration, + .OpCreateTensorLayoutNV => .reserved, + .OpTensorLayoutSetDimensionNV => .reserved, + .OpTensorLayoutSetStrideNV => .reserved, + .OpTensorLayoutSliceNV => .reserved, + .OpTensorLayoutSetClampValueNV => .reserved, + .OpCreateTensorViewNV => .reserved, + .OpTensorViewSetDimensionNV => .reserved, + .OpTensorViewSetStrideNV => .reserved, + .OpDemoteToHelperInvocation => .control_flow, + .OpIsHelperInvocationEXT => .reserved, + .OpTensorViewSetClipNV => .reserved, + .OpTensorLayoutSetBlockSizeNV => .reserved, + .OpCooperativeMatrixTransposeNV => .conversion, + .OpConvertUToImageNV => .reserved, + .OpConvertUToSamplerNV => .reserved, + .OpConvertImageToUNV => .reserved, + .OpConvertSamplerToUNV => .reserved, + .OpConvertUToSampledImageNV => .reserved, + .OpConvertSampledImageToUNV => .reserved, + .OpSamplerImageAddressingModeNV => .reserved, + .OpRawAccessChainNV => .memory, + .OpRayQueryGetIntersectionSpherePositionNV => .reserved, + .OpRayQueryGetIntersectionSphereRadiusNV => .reserved, + .OpRayQueryGetIntersectionLSSPositionsNV => .reserved, + .OpRayQueryGetIntersectionLSSRadiiNV => .reserved, + .OpRayQueryGetIntersectionLSSHitValueNV => .reserved, + .OpHitObjectGetSpherePositionNV => .reserved, + .OpHitObjectGetSphereRadiusNV => .reserved, + .OpHitObjectGetLSSPositionsNV => .reserved, + .OpHitObjectGetLSSRadiiNV => .reserved, + .OpHitObjectIsSphereHitNV => .reserved, + .OpHitObjectIsLSSHitNV => .reserved, + .OpRayQueryIsSphereHitNV => .reserved, + .OpRayQueryIsLSSHitNV => .reserved, + .OpSubgroupShuffleINTEL => .group, + .OpSubgroupShuffleDownINTEL => .group, + .OpSubgroupShuffleUpINTEL => .group, + .OpSubgroupShuffleXorINTEL => .group, + .OpSubgroupBlockReadINTEL => .group, + .OpSubgroupBlockWriteINTEL => .group, + .OpSubgroupImageBlockReadINTEL => .group, + .OpSubgroupImageBlockWriteINTEL => .group, + .OpSubgroupImageMediaBlockReadINTEL => .group, + .OpSubgroupImageMediaBlockWriteINTEL => .group, + .OpUCountLeadingZerosINTEL => .reserved, + .OpUCountTrailingZerosINTEL => .reserved, + .OpAbsISubINTEL => .reserved, + .OpAbsUSubINTEL => .reserved, + .OpIAddSatINTEL => .reserved, + .OpUAddSatINTEL => .reserved, + .OpIAverageINTEL => .reserved, + .OpUAverageINTEL => .reserved, + .OpIAverageRoundedINTEL => .reserved, + .OpUAverageRoundedINTEL => .reserved, + .OpISubSatINTEL => .reserved, + .OpUSubSatINTEL => .reserved, + .OpIMul32x16INTEL => .reserved, + .OpUMul32x16INTEL => .reserved, + .OpAtomicFMinEXT => .atomic, + .OpAtomicFMaxEXT => .atomic, + .OpAssumeTrueKHR => .miscellaneous, + .OpExpectKHR => .miscellaneous, + .OpDecorateString => .annotation, + .OpMemberDecorateString => .annotation, + .OpLoopControlINTEL => .reserved, + .OpReadPipeBlockingINTEL => .pipe, + .OpWritePipeBlockingINTEL => .pipe, + .OpFPGARegINTEL => .reserved, + .OpRayQueryGetRayTMinKHR => .reserved, + .OpRayQueryGetRayFlagsKHR => .reserved, + .OpRayQueryGetIntersectionTKHR => .reserved, + .OpRayQueryGetIntersectionInstanceCustomIndexKHR => .reserved, + .OpRayQueryGetIntersectionInstanceIdKHR => .reserved, + .OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR => .reserved, + .OpRayQueryGetIntersectionGeometryIndexKHR => .reserved, + .OpRayQueryGetIntersectionPrimitiveIndexKHR => .reserved, + .OpRayQueryGetIntersectionBarycentricsKHR => .reserved, + .OpRayQueryGetIntersectionFrontFaceKHR => .reserved, + .OpRayQueryGetIntersectionCandidateAABBOpaqueKHR => .reserved, + .OpRayQueryGetIntersectionObjectRayDirectionKHR => .reserved, + .OpRayQueryGetIntersectionObjectRayOriginKHR => .reserved, + .OpRayQueryGetWorldRayDirectionKHR => .reserved, + .OpRayQueryGetWorldRayOriginKHR => .reserved, + .OpRayQueryGetIntersectionObjectToWorldKHR => .reserved, + .OpRayQueryGetIntersectionWorldToObjectKHR => .reserved, + .OpAtomicFAddEXT => .atomic, + .OpTypeBufferSurfaceINTEL => .type_declaration, + .OpTypeStructContinuedINTEL => .type_declaration, + .OpConstantCompositeContinuedINTEL => .constant_creation, + .OpSpecConstantCompositeContinuedINTEL => .constant_creation, + .OpCompositeConstructContinuedINTEL => .composite, + .OpConvertFToBF16INTEL => .conversion, + .OpConvertBF16ToFINTEL => .conversion, + .OpControlBarrierArriveINTEL => .barrier, + .OpControlBarrierWaitINTEL => .barrier, + .OpArithmeticFenceEXT => .miscellaneous, + .OpTaskSequenceCreateINTEL => .reserved, + .OpTaskSequenceAsyncINTEL => .reserved, + .OpTaskSequenceGetINTEL => .reserved, + .OpTaskSequenceReleaseINTEL => .reserved, + .OpTypeTaskSequenceINTEL => .type_declaration, + .OpSubgroupBlockPrefetchINTEL => .group, + .OpSubgroup2DBlockLoadINTEL => .group, + .OpSubgroup2DBlockLoadTransformINTEL => .group, + .OpSubgroup2DBlockLoadTransposeINTEL => .group, + .OpSubgroup2DBlockPrefetchINTEL => .group, + .OpSubgroup2DBlockStoreINTEL => .group, + .OpSubgroupMatrixMultiplyAccumulateINTEL => .group, + .OpBitwiseFunctionINTEL => .bit, + .OpGroupIMulKHR => .group, + .OpGroupFMulKHR => .group, + .OpGroupBitwiseAndKHR => .group, + .OpGroupBitwiseOrKHR => .group, + .OpGroupBitwiseXorKHR => .group, + .OpGroupLogicalAndKHR => .group, + .OpGroupLogicalOrKHR => .group, + .OpGroupLogicalXorKHR => .group, + .OpRoundFToTF32INTEL => .conversion, + .OpMaskedGatherINTEL => .memory, + .OpMaskedScatterINTEL => .memory, + .OpConvertHandleToImageINTEL => .image, + .OpConvertHandleToSamplerINTEL => .image, + .OpConvertHandleToSampledImageINTEL => .image, }; } }; pub const ImageOperands = packed struct { - Bias: bool = false, - Lod: bool = false, - Grad: bool = false, - ConstOffset: bool = false, - Offset: bool = false, - ConstOffsets: bool = false, - Sample: bool = false, - MinLod: bool = false, - MakeTexelAvailable: bool = false, - MakeTexelVisible: bool = false, - NonPrivateTexel: bool = false, - VolatileTexel: bool = false, - SignExtend: bool = false, - ZeroExtend: bool = false, - Nontemporal: bool = false, + bias: bool = false, + lod: bool = false, + grad: bool = false, + const_offset: bool = false, + offset: bool = false, + const_offsets: bool = false, + sample: bool = false, + min_lod: bool = false, + make_texel_available: bool = false, + make_texel_visible: bool = false, + non_private_texel: bool = false, + volatile_texel: bool = false, + sign_extend: bool = false, + zero_extend: bool = false, + nontemporal: bool = false, _reserved_bit_15: bool = false, - Offsets: bool = false, + offsets: bool = false, _reserved_bit_17: bool = false, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, @@ -3251,29 +3557,24 @@ pub const ImageOperands = packed struct { _reserved_bit_30: bool = false, _reserved_bit_31: bool = false, - pub const MakeTexelAvailableKHR: ImageOperands = .{ .MakeTexelAvailable = true }; - pub const MakeTexelVisibleKHR: ImageOperands = .{ .MakeTexelVisible = true }; - pub const NonPrivateTexelKHR: ImageOperands = .{ .NonPrivateTexel = true }; - pub const VolatileTexelKHR: ImageOperands = .{ .VolatileTexel = true }; - pub const Extended = struct { - Bias: ?struct { id_ref: IdRef } = null, - Lod: ?struct { id_ref: IdRef } = null, - Grad: ?struct { id_ref_0: IdRef, id_ref_1: IdRef } = null, - ConstOffset: ?struct { id_ref: IdRef } = null, - Offset: ?struct { id_ref: IdRef } = null, - ConstOffsets: ?struct { id_ref: IdRef } = null, - Sample: ?struct { id_ref: IdRef } = null, - MinLod: ?struct { id_ref: IdRef } = null, - MakeTexelAvailable: ?struct { id_scope: IdScope } = null, - MakeTexelVisible: ?struct { id_scope: IdScope } = null, - NonPrivateTexel: bool = false, - VolatileTexel: bool = false, - SignExtend: bool = false, - ZeroExtend: bool = false, - Nontemporal: bool = false, + bias: ?struct { id_ref: Id } = null, + lod: ?struct { id_ref: Id } = null, + grad: ?struct { id_ref_0: Id, id_ref_1: Id } = null, + const_offset: ?struct { id_ref: Id } = null, + offset: ?struct { id_ref: Id } = null, + const_offsets: ?struct { id_ref: Id } = null, + sample: ?struct { id_ref: Id } = null, + min_lod: ?struct { id_ref: Id } = null, + make_texel_available: ?struct { id_scope: Id } = null, + make_texel_visible: ?struct { id_scope: Id } = null, + non_private_texel: bool = false, + volatile_texel: bool = false, + sign_extend: bool = false, + zero_extend: bool = false, + nontemporal: bool = false, _reserved_bit_15: bool = false, - Offsets: ?struct { id_ref: IdRef } = null, + offsets: ?struct { id_ref: Id } = null, _reserved_bit_17: bool = false, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, @@ -3292,11 +3593,11 @@ pub const ImageOperands = packed struct { }; }; pub const FPFastMathMode = packed struct { - NotNaN: bool = false, - NotInf: bool = false, - NSZ: bool = false, - AllowRecip: bool = false, - Fast: bool = false, + not_na_n: bool = false, + not_inf: bool = false, + nsz: bool = false, + allow_recip: bool = false, + fast: bool = false, _reserved_bit_5: bool = false, _reserved_bit_6: bool = false, _reserved_bit_7: bool = false, @@ -3308,9 +3609,9 @@ pub const FPFastMathMode = packed struct { _reserved_bit_13: bool = false, _reserved_bit_14: bool = false, _reserved_bit_15: bool = false, - AllowContract: bool = false, - AllowReassoc: bool = false, - AllowTransform: bool = false, + allow_contract: bool = false, + allow_reassoc: bool = false, + allow_transform: bool = false, _reserved_bit_19: bool = false, _reserved_bit_20: bool = false, _reserved_bit_21: bool = false, @@ -3324,13 +3625,10 @@ pub const FPFastMathMode = packed struct { _reserved_bit_29: bool = false, _reserved_bit_30: bool = false, _reserved_bit_31: bool = false, - - pub const AllowContractFastINTEL: FPFastMathMode = .{ .AllowContract = true }; - pub const AllowReassocINTEL: FPFastMathMode = .{ .AllowReassoc = true }; }; pub const SelectionControl = packed struct { - Flatten: bool = false, - DontFlatten: bool = false, + flatten: bool = false, + dont_flatten: bool = false, _reserved_bit_2: bool = false, _reserved_bit_3: bool = false, _reserved_bit_4: bool = false, @@ -3363,15 +3661,15 @@ pub const SelectionControl = packed struct { _reserved_bit_31: bool = false, }; pub const LoopControl = packed struct { - Unroll: bool = false, - DontUnroll: bool = false, - DependencyInfinite: bool = false, - DependencyLength: bool = false, - MinIterations: bool = false, - MaxIterations: bool = false, - IterationMultiple: bool = false, - PeelCount: bool = false, - PartialCount: bool = false, + unroll: bool = false, + dont_unroll: bool = false, + dependency_infinite: bool = false, + dependency_length: bool = false, + min_iterations: bool = false, + max_iterations: bool = false, + iteration_multiple: bool = false, + peel_count: bool = false, + partial_count: bool = false, _reserved_bit_9: bool = false, _reserved_bit_10: bool = false, _reserved_bit_11: bool = false, @@ -3379,16 +3677,16 @@ pub const LoopControl = packed struct { _reserved_bit_13: bool = false, _reserved_bit_14: bool = false, _reserved_bit_15: bool = false, - InitiationIntervalINTEL: bool = false, - MaxConcurrencyINTEL: bool = false, - DependencyArrayINTEL: bool = false, - PipelineEnableINTEL: bool = false, - LoopCoalesceINTEL: bool = false, - MaxInterleavingINTEL: bool = false, - SpeculatedIterationsINTEL: bool = false, - NoFusionINTEL: bool = false, - LoopCountINTEL: bool = false, - MaxReinvocationDelayINTEL: bool = false, + initiation_interval_intel: bool = false, + max_concurrency_intel: bool = false, + dependency_array_intel: bool = false, + pipeline_enable_intel: bool = false, + loop_coalesce_intel: bool = false, + max_interleaving_intel: bool = false, + speculated_iterations_intel: bool = false, + no_fusion_intel: bool = false, + loop_count_intel: bool = false, + max_reinvocation_delay_intel: bool = false, _reserved_bit_26: bool = false, _reserved_bit_27: bool = false, _reserved_bit_28: bool = false, @@ -3397,15 +3695,15 @@ pub const LoopControl = packed struct { _reserved_bit_31: bool = false, pub const Extended = struct { - Unroll: bool = false, - DontUnroll: bool = false, - DependencyInfinite: bool = false, - DependencyLength: ?struct { literal_integer: LiteralInteger } = null, - MinIterations: ?struct { literal_integer: LiteralInteger } = null, - MaxIterations: ?struct { literal_integer: LiteralInteger } = null, - IterationMultiple: ?struct { literal_integer: LiteralInteger } = null, - PeelCount: ?struct { literal_integer: LiteralInteger } = null, - PartialCount: ?struct { literal_integer: LiteralInteger } = null, + unroll: bool = false, + dont_unroll: bool = false, + dependency_infinite: bool = false, + dependency_length: ?struct { literal_integer: LiteralInteger } = null, + min_iterations: ?struct { literal_integer: LiteralInteger } = null, + max_iterations: ?struct { literal_integer: LiteralInteger } = null, + iteration_multiple: ?struct { literal_integer: LiteralInteger } = null, + peel_count: ?struct { literal_integer: LiteralInteger } = null, + partial_count: ?struct { literal_integer: LiteralInteger } = null, _reserved_bit_9: bool = false, _reserved_bit_10: bool = false, _reserved_bit_11: bool = false, @@ -3413,16 +3711,16 @@ pub const LoopControl = packed struct { _reserved_bit_13: bool = false, _reserved_bit_14: bool = false, _reserved_bit_15: bool = false, - InitiationIntervalINTEL: ?struct { literal_integer: LiteralInteger } = null, - MaxConcurrencyINTEL: ?struct { literal_integer: LiteralInteger } = null, - DependencyArrayINTEL: ?struct { literal_integer: LiteralInteger } = null, - PipelineEnableINTEL: ?struct { literal_integer: LiteralInteger } = null, - LoopCoalesceINTEL: ?struct { literal_integer: LiteralInteger } = null, - MaxInterleavingINTEL: ?struct { literal_integer: LiteralInteger } = null, - SpeculatedIterationsINTEL: ?struct { literal_integer: LiteralInteger } = null, - NoFusionINTEL: bool = false, - LoopCountINTEL: ?struct { literal_integer: LiteralInteger } = null, - MaxReinvocationDelayINTEL: ?struct { literal_integer: LiteralInteger } = null, + initiation_interval_intel: ?struct { literal_integer: LiteralInteger } = null, + max_concurrency_intel: ?struct { literal_integer: LiteralInteger } = null, + dependency_array_intel: ?struct { literal_integer: LiteralInteger } = null, + pipeline_enable_intel: ?struct { literal_integer: LiteralInteger } = null, + loop_coalesce_intel: ?struct { literal_integer: LiteralInteger } = null, + max_interleaving_intel: ?struct { literal_integer: LiteralInteger } = null, + speculated_iterations_intel: ?struct { literal_integer: LiteralInteger } = null, + no_fusion_intel: bool = false, + loop_count_intel: ?struct { literal_integer: LiteralInteger } = null, + max_reinvocation_delay_intel: ?struct { literal_integer: LiteralInteger } = null, _reserved_bit_26: bool = false, _reserved_bit_27: bool = false, _reserved_bit_28: bool = false, @@ -3432,10 +3730,10 @@ pub const LoopControl = packed struct { }; }; pub const FunctionControl = packed struct { - Inline: bool = false, - DontInline: bool = false, - Pure: bool = false, - Const: bool = false, + @"inline": bool = false, + dont_inline: bool = false, + pure: bool = false, + @"const": bool = false, _reserved_bit_4: bool = false, _reserved_bit_5: bool = false, _reserved_bit_6: bool = false, @@ -3448,7 +3746,7 @@ pub const FunctionControl = packed struct { _reserved_bit_13: bool = false, _reserved_bit_14: bool = false, _reserved_bit_15: bool = false, - OptNoneINTEL: bool = false, + opt_none_ext: bool = false, _reserved_bit_17: bool = false, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, @@ -3467,21 +3765,21 @@ pub const FunctionControl = packed struct { }; pub const MemorySemantics = packed struct { _reserved_bit_0: bool = false, - Acquire: bool = false, - Release: bool = false, - AcquireRelease: bool = false, - SequentiallyConsistent: bool = false, + acquire: bool = false, + release: bool = false, + acquire_release: bool = false, + sequentially_consistent: bool = false, _reserved_bit_5: bool = false, - UniformMemory: bool = false, - SubgroupMemory: bool = false, - WorkgroupMemory: bool = false, - CrossWorkgroupMemory: bool = false, - AtomicCounterMemory: bool = false, - ImageMemory: bool = false, - OutputMemory: bool = false, - MakeAvailable: bool = false, - MakeVisible: bool = false, - Volatile: bool = false, + uniform_memory: bool = false, + subgroup_memory: bool = false, + workgroup_memory: bool = false, + cross_workgroup_memory: bool = false, + atomic_counter_memory: bool = false, + image_memory: bool = false, + output_memory: bool = false, + make_available: bool = false, + make_visible: bool = false, + @"volatile": bool = false, _reserved_bit_16: bool = false, _reserved_bit_17: bool = false, _reserved_bit_18: bool = false, @@ -3498,18 +3796,14 @@ pub const MemorySemantics = packed struct { _reserved_bit_29: bool = false, _reserved_bit_30: bool = false, _reserved_bit_31: bool = false, - - pub const OutputMemoryKHR: MemorySemantics = .{ .OutputMemory = true }; - pub const MakeAvailableKHR: MemorySemantics = .{ .MakeAvailable = true }; - pub const MakeVisibleKHR: MemorySemantics = .{ .MakeVisible = true }; }; pub const MemoryAccess = packed struct { - Volatile: bool = false, - Aligned: bool = false, - Nontemporal: bool = false, - MakePointerAvailable: bool = false, - MakePointerVisible: bool = false, - NonPrivatePointer: bool = false, + @"volatile": bool = false, + aligned: bool = false, + nontemporal: bool = false, + make_pointer_available: bool = false, + make_pointer_visible: bool = false, + non_private_pointer: bool = false, _reserved_bit_6: bool = false, _reserved_bit_7: bool = false, _reserved_bit_8: bool = false, @@ -3520,8 +3814,8 @@ pub const MemoryAccess = packed struct { _reserved_bit_13: bool = false, _reserved_bit_14: bool = false, _reserved_bit_15: bool = false, - AliasScopeINTELMask: bool = false, - NoAliasINTELMask: bool = false, + alias_scope_intel_mask: bool = false, + no_alias_intel_mask: bool = false, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, _reserved_bit_20: bool = false, @@ -3537,17 +3831,13 @@ pub const MemoryAccess = packed struct { _reserved_bit_30: bool = false, _reserved_bit_31: bool = false, - pub const MakePointerAvailableKHR: MemoryAccess = .{ .MakePointerAvailable = true }; - pub const MakePointerVisibleKHR: MemoryAccess = .{ .MakePointerVisible = true }; - pub const NonPrivatePointerKHR: MemoryAccess = .{ .NonPrivatePointer = true }; - pub const Extended = struct { - Volatile: bool = false, - Aligned: ?struct { literal_integer: LiteralInteger } = null, - Nontemporal: bool = false, - MakePointerAvailable: ?struct { id_scope: IdScope } = null, - MakePointerVisible: ?struct { id_scope: IdScope } = null, - NonPrivatePointer: bool = false, + @"volatile": bool = false, + aligned: ?struct { literal_integer: LiteralInteger } = null, + nontemporal: bool = false, + make_pointer_available: ?struct { id_scope: Id } = null, + make_pointer_visible: ?struct { id_scope: Id } = null, + non_private_pointer: bool = false, _reserved_bit_6: bool = false, _reserved_bit_7: bool = false, _reserved_bit_8: bool = false, @@ -3558,8 +3848,8 @@ pub const MemoryAccess = packed struct { _reserved_bit_13: bool = false, _reserved_bit_14: bool = false, _reserved_bit_15: bool = false, - AliasScopeINTELMask: ?struct { id_ref: IdRef } = null, - NoAliasINTELMask: ?struct { id_ref: IdRef } = null, + alias_scope_intel_mask: ?struct { id_ref: Id } = null, + no_alias_intel_mask: ?struct { id_ref: Id } = null, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, _reserved_bit_20: bool = false, @@ -3577,7 +3867,7 @@ pub const MemoryAccess = packed struct { }; }; pub const KernelProfilingInfo = packed struct { - CmdExecTime: bool = false, + cmd_exec_time: bool = false, _reserved_bit_1: bool = false, _reserved_bit_2: bool = false, _reserved_bit_3: bool = false, @@ -3611,17 +3901,17 @@ pub const KernelProfilingInfo = packed struct { _reserved_bit_31: bool = false, }; pub const RayFlags = packed struct { - OpaqueKHR: bool = false, - NoOpaqueKHR: bool = false, - TerminateOnFirstHitKHR: bool = false, - SkipClosestHitShaderKHR: bool = false, - CullBackFacingTrianglesKHR: bool = false, - CullFrontFacingTrianglesKHR: bool = false, - CullOpaqueKHR: bool = false, - CullNoOpaqueKHR: bool = false, - SkipTrianglesKHR: bool = false, - SkipAABBsKHR: bool = false, - ForceOpacityMicromap2StateEXT: bool = false, + opaque_khr: bool = false, + no_opaque_khr: bool = false, + terminate_on_first_hit_khr: bool = false, + skip_closest_hit_shader_khr: bool = false, + cull_back_facing_triangles_khr: bool = false, + cull_front_facing_triangles_khr: bool = false, + cull_opaque_khr: bool = false, + cull_no_opaque_khr: bool = false, + skip_triangles_khr: bool = false, + skip_aab_bs_khr: bool = false, + force_opacity_micromap2state_ext: bool = false, _reserved_bit_11: bool = false, _reserved_bit_12: bool = false, _reserved_bit_13: bool = false, @@ -3645,10 +3935,10 @@ pub const RayFlags = packed struct { _reserved_bit_31: bool = false, }; pub const FragmentShadingRate = packed struct { - Vertical2Pixels: bool = false, - Vertical4Pixels: bool = false, - Horizontal2Pixels: bool = false, - Horizontal4Pixels: bool = false, + vertical2pixels: bool = false, + vertical4pixels: bool = false, + horizontal2pixels: bool = false, + horizontal4pixels: bool = false, _reserved_bit_4: bool = false, _reserved_bit_5: bool = false, _reserved_bit_6: bool = false, @@ -3679,8 +3969,8 @@ pub const FragmentShadingRate = packed struct { _reserved_bit_31: bool = false, }; pub const RawAccessChainOperands = packed struct { - RobustnessPerComponentNV: bool = false, - RobustnessPerElementNV: bool = false, + robustness_per_component_nv: bool = false, + robustness_per_element_nv: bool = false, _reserved_bit_2: bool = false, _reserved_bit_3: bool = false, _reserved_bit_4: bool = false, @@ -3713,1199 +4003,1187 @@ pub const RawAccessChainOperands = packed struct { _reserved_bit_31: bool = false, }; pub const SourceLanguage = enum(u32) { - Unknown = 0, - ESSL = 1, - GLSL = 2, - OpenCL_C = 3, - OpenCL_CPP = 4, - HLSL = 5, - CPP_for_OpenCL = 6, - SYCL = 7, - HERO_C = 8, - NZSL = 9, - WGSL = 10, - Slang = 11, - Zig = 12, + unknown = 0, + essl = 1, + glsl = 2, + open_cl_c = 3, + open_cl_cpp = 4, + hlsl = 5, + cpp_for_open_cl = 6, + sycl = 7, + hero_c = 8, + nzsl = 9, + wgsl = 10, + slang = 11, + zig = 12, + rust = 13, }; pub const ExecutionModel = enum(u32) { - Vertex = 0, - TessellationControl = 1, - TessellationEvaluation = 2, - Geometry = 3, - Fragment = 4, - GLCompute = 5, - Kernel = 6, - TaskNV = 5267, - MeshNV = 5268, - RayGenerationKHR = 5313, - IntersectionKHR = 5314, - AnyHitKHR = 5315, - ClosestHitKHR = 5316, - MissKHR = 5317, - CallableKHR = 5318, - TaskEXT = 5364, - MeshEXT = 5365, - - pub const RayGenerationNV = ExecutionModel.RayGenerationKHR; - pub const IntersectionNV = ExecutionModel.IntersectionKHR; - pub const AnyHitNV = ExecutionModel.AnyHitKHR; - pub const ClosestHitNV = ExecutionModel.ClosestHitKHR; - pub const MissNV = ExecutionModel.MissKHR; - pub const CallableNV = ExecutionModel.CallableKHR; + vertex = 0, + tessellation_control = 1, + tessellation_evaluation = 2, + geometry = 3, + fragment = 4, + gl_compute = 5, + kernel = 6, + task_nv = 5267, + mesh_nv = 5268, + ray_generation_khr = 5313, + intersection_khr = 5314, + any_hit_khr = 5315, + closest_hit_khr = 5316, + miss_khr = 5317, + callable_khr = 5318, + task_ext = 5364, + mesh_ext = 5365, }; pub const AddressingModel = enum(u32) { - Logical = 0, - Physical32 = 1, - Physical64 = 2, - PhysicalStorageBuffer64 = 5348, - - pub const PhysicalStorageBuffer64EXT = AddressingModel.PhysicalStorageBuffer64; + logical = 0, + physical32 = 1, + physical64 = 2, + physical_storage_buffer64 = 5348, }; pub const MemoryModel = enum(u32) { - Simple = 0, - GLSL450 = 1, - OpenCL = 2, - Vulkan = 3, - - pub const VulkanKHR = MemoryModel.Vulkan; + simple = 0, + glsl450 = 1, + open_cl = 2, + vulkan = 3, }; pub const ExecutionMode = enum(u32) { - Invocations = 0, - SpacingEqual = 1, - SpacingFractionalEven = 2, - SpacingFractionalOdd = 3, - VertexOrderCw = 4, - VertexOrderCcw = 5, - PixelCenterInteger = 6, - OriginUpperLeft = 7, - OriginLowerLeft = 8, - EarlyFragmentTests = 9, - PointMode = 10, - Xfb = 11, - DepthReplacing = 12, - DepthGreater = 14, - DepthLess = 15, - DepthUnchanged = 16, - LocalSize = 17, - LocalSizeHint = 18, - InputPoints = 19, - InputLines = 20, - InputLinesAdjacency = 21, - Triangles = 22, - InputTrianglesAdjacency = 23, - Quads = 24, - Isolines = 25, - OutputVertices = 26, - OutputPoints = 27, - OutputLineStrip = 28, - OutputTriangleStrip = 29, - VecTypeHint = 30, - ContractionOff = 31, - Initializer = 33, - Finalizer = 34, - SubgroupSize = 35, - SubgroupsPerWorkgroup = 36, - SubgroupsPerWorkgroupId = 37, - LocalSizeId = 38, - LocalSizeHintId = 39, - NonCoherentColorAttachmentReadEXT = 4169, - NonCoherentDepthAttachmentReadEXT = 4170, - NonCoherentStencilAttachmentReadEXT = 4171, - SubgroupUniformControlFlowKHR = 4421, - PostDepthCoverage = 4446, - DenormPreserve = 4459, - DenormFlushToZero = 4460, - SignedZeroInfNanPreserve = 4461, - RoundingModeRTE = 4462, - RoundingModeRTZ = 4463, - EarlyAndLateFragmentTestsAMD = 5017, - StencilRefReplacingEXT = 5027, - CoalescingAMDX = 5069, - MaxNodeRecursionAMDX = 5071, - StaticNumWorkgroupsAMDX = 5072, - ShaderIndexAMDX = 5073, - MaxNumWorkgroupsAMDX = 5077, - StencilRefUnchangedFrontAMD = 5079, - StencilRefGreaterFrontAMD = 5080, - StencilRefLessFrontAMD = 5081, - StencilRefUnchangedBackAMD = 5082, - StencilRefGreaterBackAMD = 5083, - StencilRefLessBackAMD = 5084, - QuadDerivativesKHR = 5088, - RequireFullQuadsKHR = 5089, - OutputLinesEXT = 5269, - OutputPrimitivesEXT = 5270, - DerivativeGroupQuadsNV = 5289, - DerivativeGroupLinearNV = 5290, - OutputTrianglesEXT = 5298, - PixelInterlockOrderedEXT = 5366, - PixelInterlockUnorderedEXT = 5367, - SampleInterlockOrderedEXT = 5368, - SampleInterlockUnorderedEXT = 5369, - ShadingRateInterlockOrderedEXT = 5370, - ShadingRateInterlockUnorderedEXT = 5371, - SharedLocalMemorySizeINTEL = 5618, - RoundingModeRTPINTEL = 5620, - RoundingModeRTNINTEL = 5621, - FloatingPointModeALTINTEL = 5622, - FloatingPointModeIEEEINTEL = 5623, - MaxWorkgroupSizeINTEL = 5893, - MaxWorkDimINTEL = 5894, - NoGlobalOffsetINTEL = 5895, - NumSIMDWorkitemsINTEL = 5896, - SchedulerTargetFmaxMhzINTEL = 5903, - MaximallyReconvergesKHR = 6023, - FPFastMathDefault = 6028, - StreamingInterfaceINTEL = 6154, - RegisterMapInterfaceINTEL = 6160, - NamedBarrierCountINTEL = 6417, - MaximumRegistersINTEL = 6461, - MaximumRegistersIdINTEL = 6462, - NamedMaximumRegistersINTEL = 6463, - - pub const OutputLinesNV = ExecutionMode.OutputLinesEXT; - pub const OutputPrimitivesNV = ExecutionMode.OutputPrimitivesEXT; - pub const OutputTrianglesNV = ExecutionMode.OutputTrianglesEXT; + invocations = 0, + spacing_equal = 1, + spacing_fractional_even = 2, + spacing_fractional_odd = 3, + vertex_order_cw = 4, + vertex_order_ccw = 5, + pixel_center_integer = 6, + origin_upper_left = 7, + origin_lower_left = 8, + early_fragment_tests = 9, + point_mode = 10, + xfb = 11, + depth_replacing = 12, + depth_greater = 14, + depth_less = 15, + depth_unchanged = 16, + local_size = 17, + local_size_hint = 18, + input_points = 19, + input_lines = 20, + input_lines_adjacency = 21, + triangles = 22, + input_triangles_adjacency = 23, + quads = 24, + isolines = 25, + output_vertices = 26, + output_points = 27, + output_line_strip = 28, + output_triangle_strip = 29, + vec_type_hint = 30, + contraction_off = 31, + initializer = 33, + finalizer = 34, + subgroup_size = 35, + subgroups_per_workgroup = 36, + subgroups_per_workgroup_id = 37, + local_size_id = 38, + local_size_hint_id = 39, + non_coherent_color_attachment_read_ext = 4169, + non_coherent_depth_attachment_read_ext = 4170, + non_coherent_stencil_attachment_read_ext = 4171, + subgroup_uniform_control_flow_khr = 4421, + post_depth_coverage = 4446, + denorm_preserve = 4459, + denorm_flush_to_zero = 4460, + signed_zero_inf_nan_preserve = 4461, + rounding_mode_rte = 4462, + rounding_mode_rtz = 4463, + non_coherent_tile_attachment_read_qcom = 4489, + tile_shading_rate_qcom = 4490, + early_and_late_fragment_tests_amd = 5017, + stencil_ref_replacing_ext = 5027, + coalescing_amdx = 5069, + is_api_entry_amdx = 5070, + max_node_recursion_amdx = 5071, + static_num_workgroups_amdx = 5072, + shader_index_amdx = 5073, + max_num_workgroups_amdx = 5077, + stencil_ref_unchanged_front_amd = 5079, + stencil_ref_greater_front_amd = 5080, + stencil_ref_less_front_amd = 5081, + stencil_ref_unchanged_back_amd = 5082, + stencil_ref_greater_back_amd = 5083, + stencil_ref_less_back_amd = 5084, + quad_derivatives_khr = 5088, + require_full_quads_khr = 5089, + shares_input_with_amdx = 5102, + output_lines_ext = 5269, + output_primitives_ext = 5270, + derivative_group_quads_khr = 5289, + derivative_group_linear_khr = 5290, + output_triangles_ext = 5298, + pixel_interlock_ordered_ext = 5366, + pixel_interlock_unordered_ext = 5367, + sample_interlock_ordered_ext = 5368, + sample_interlock_unordered_ext = 5369, + shading_rate_interlock_ordered_ext = 5370, + shading_rate_interlock_unordered_ext = 5371, + shared_local_memory_size_intel = 5618, + rounding_mode_rtpintel = 5620, + rounding_mode_rtnintel = 5621, + floating_point_mode_altintel = 5622, + floating_point_mode_ieeeintel = 5623, + max_workgroup_size_intel = 5893, + max_work_dim_intel = 5894, + no_global_offset_intel = 5895, + num_simd_workitems_intel = 5896, + scheduler_target_fmax_mhz_intel = 5903, + maximally_reconverges_khr = 6023, + fp_fast_math_default = 6028, + streaming_interface_intel = 6154, + register_map_interface_intel = 6160, + named_barrier_count_intel = 6417, + maximum_registers_intel = 6461, + maximum_registers_id_intel = 6462, + named_maximum_registers_intel = 6463, pub const Extended = union(ExecutionMode) { - Invocations: struct { literal_integer: LiteralInteger }, - SpacingEqual, - SpacingFractionalEven, - SpacingFractionalOdd, - VertexOrderCw, - VertexOrderCcw, - PixelCenterInteger, - OriginUpperLeft, - OriginLowerLeft, - EarlyFragmentTests, - PointMode, - Xfb, - DepthReplacing, - DepthGreater, - DepthLess, - DepthUnchanged, - LocalSize: struct { x_size: LiteralInteger, y_size: LiteralInteger, z_size: LiteralInteger }, - LocalSizeHint: struct { x_size: LiteralInteger, y_size: LiteralInteger, z_size: LiteralInteger }, - InputPoints, - InputLines, - InputLinesAdjacency, - Triangles, - InputTrianglesAdjacency, - Quads, - Isolines, - OutputVertices: struct { vertex_count: LiteralInteger }, - OutputPoints, - OutputLineStrip, - OutputTriangleStrip, - VecTypeHint: struct { vector_type: LiteralInteger }, - ContractionOff, - Initializer, - Finalizer, - SubgroupSize: struct { subgroup_size: LiteralInteger }, - SubgroupsPerWorkgroup: struct { subgroups_per_workgroup: LiteralInteger }, - SubgroupsPerWorkgroupId: struct { subgroups_per_workgroup: IdRef }, - LocalSizeId: struct { x_size: IdRef, y_size: IdRef, z_size: IdRef }, - LocalSizeHintId: struct { x_size_hint: IdRef, y_size_hint: IdRef, z_size_hint: IdRef }, - NonCoherentColorAttachmentReadEXT, - NonCoherentDepthAttachmentReadEXT, - NonCoherentStencilAttachmentReadEXT, - SubgroupUniformControlFlowKHR, - PostDepthCoverage, - DenormPreserve: struct { target_width: LiteralInteger }, - DenormFlushToZero: struct { target_width: LiteralInteger }, - SignedZeroInfNanPreserve: struct { target_width: LiteralInteger }, - RoundingModeRTE: struct { target_width: LiteralInteger }, - RoundingModeRTZ: struct { target_width: LiteralInteger }, - EarlyAndLateFragmentTestsAMD, - StencilRefReplacingEXT, - CoalescingAMDX, - MaxNodeRecursionAMDX: struct { number_of_recursions: IdRef }, - StaticNumWorkgroupsAMDX: struct { x_size: IdRef, y_size: IdRef, z_size: IdRef }, - ShaderIndexAMDX: struct { shader_index: IdRef }, - MaxNumWorkgroupsAMDX: struct { x_size: IdRef, y_size: IdRef, z_size: IdRef }, - StencilRefUnchangedFrontAMD, - StencilRefGreaterFrontAMD, - StencilRefLessFrontAMD, - StencilRefUnchangedBackAMD, - StencilRefGreaterBackAMD, - StencilRefLessBackAMD, - QuadDerivativesKHR, - RequireFullQuadsKHR, - OutputLinesEXT, - OutputPrimitivesEXT: struct { primitive_count: LiteralInteger }, - DerivativeGroupQuadsNV, - DerivativeGroupLinearNV, - OutputTrianglesEXT, - PixelInterlockOrderedEXT, - PixelInterlockUnorderedEXT, - SampleInterlockOrderedEXT, - SampleInterlockUnorderedEXT, - ShadingRateInterlockOrderedEXT, - ShadingRateInterlockUnorderedEXT, - SharedLocalMemorySizeINTEL: struct { size: LiteralInteger }, - RoundingModeRTPINTEL: struct { target_width: LiteralInteger }, - RoundingModeRTNINTEL: struct { target_width: LiteralInteger }, - FloatingPointModeALTINTEL: struct { target_width: LiteralInteger }, - FloatingPointModeIEEEINTEL: struct { target_width: LiteralInteger }, - MaxWorkgroupSizeINTEL: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger, literal_integer_2: LiteralInteger }, - MaxWorkDimINTEL: struct { literal_integer: LiteralInteger }, - NoGlobalOffsetINTEL, - NumSIMDWorkitemsINTEL: struct { literal_integer: LiteralInteger }, - SchedulerTargetFmaxMhzINTEL: struct { literal_integer: LiteralInteger }, - MaximallyReconvergesKHR, - FPFastMathDefault: struct { target_type: IdRef, id_ref_1: IdRef }, - StreamingInterfaceINTEL: struct { stallfreereturn: LiteralInteger }, - RegisterMapInterfaceINTEL: struct { waitfordonewrite: LiteralInteger }, - NamedBarrierCountINTEL: struct { barrier_count: LiteralInteger }, - MaximumRegistersINTEL: struct { number_of_registers: LiteralInteger }, - MaximumRegistersIdINTEL: struct { number_of_registers: IdRef }, - NamedMaximumRegistersINTEL: struct { named_maximum_number_of_registers: NamedMaximumNumberOfRegisters }, + invocations: struct { literal_integer: LiteralInteger }, + spacing_equal, + spacing_fractional_even, + spacing_fractional_odd, + vertex_order_cw, + vertex_order_ccw, + pixel_center_integer, + origin_upper_left, + origin_lower_left, + early_fragment_tests, + point_mode, + xfb, + depth_replacing, + depth_greater, + depth_less, + depth_unchanged, + local_size: struct { x_size: LiteralInteger, y_size: LiteralInteger, z_size: LiteralInteger }, + local_size_hint: struct { x_size: LiteralInteger, y_size: LiteralInteger, z_size: LiteralInteger }, + input_points, + input_lines, + input_lines_adjacency, + triangles, + input_triangles_adjacency, + quads, + isolines, + output_vertices: struct { vertex_count: LiteralInteger }, + output_points, + output_line_strip, + output_triangle_strip, + vec_type_hint: struct { vector_type: LiteralInteger }, + contraction_off, + initializer, + finalizer, + subgroup_size: struct { subgroup_size: LiteralInteger }, + subgroups_per_workgroup: struct { subgroups_per_workgroup: LiteralInteger }, + subgroups_per_workgroup_id: struct { subgroups_per_workgroup: Id }, + local_size_id: struct { x_size: Id, y_size: Id, z_size: Id }, + local_size_hint_id: struct { x_size_hint: Id, y_size_hint: Id, z_size_hint: Id }, + non_coherent_color_attachment_read_ext, + non_coherent_depth_attachment_read_ext, + non_coherent_stencil_attachment_read_ext, + subgroup_uniform_control_flow_khr, + post_depth_coverage, + denorm_preserve: struct { target_width: LiteralInteger }, + denorm_flush_to_zero: struct { target_width: LiteralInteger }, + signed_zero_inf_nan_preserve: struct { target_width: LiteralInteger }, + rounding_mode_rte: struct { target_width: LiteralInteger }, + rounding_mode_rtz: struct { target_width: LiteralInteger }, + non_coherent_tile_attachment_read_qcom, + tile_shading_rate_qcom: struct { x_rate: LiteralInteger, y_rate: LiteralInteger, z_rate: LiteralInteger }, + early_and_late_fragment_tests_amd, + stencil_ref_replacing_ext, + coalescing_amdx, + is_api_entry_amdx: struct { is_entry: Id }, + max_node_recursion_amdx: struct { number_of_recursions: Id }, + static_num_workgroups_amdx: struct { x_size: Id, y_size: Id, z_size: Id }, + shader_index_amdx: struct { shader_index: Id }, + max_num_workgroups_amdx: struct { x_size: Id, y_size: Id, z_size: Id }, + stencil_ref_unchanged_front_amd, + stencil_ref_greater_front_amd, + stencil_ref_less_front_amd, + stencil_ref_unchanged_back_amd, + stencil_ref_greater_back_amd, + stencil_ref_less_back_amd, + quad_derivatives_khr, + require_full_quads_khr, + shares_input_with_amdx: struct { node_name: Id, shader_index: Id }, + output_lines_ext, + output_primitives_ext: struct { primitive_count: LiteralInteger }, + derivative_group_quads_khr, + derivative_group_linear_khr, + output_triangles_ext, + pixel_interlock_ordered_ext, + pixel_interlock_unordered_ext, + sample_interlock_ordered_ext, + sample_interlock_unordered_ext, + shading_rate_interlock_ordered_ext, + shading_rate_interlock_unordered_ext, + shared_local_memory_size_intel: struct { size: LiteralInteger }, + rounding_mode_rtpintel: struct { target_width: LiteralInteger }, + rounding_mode_rtnintel: struct { target_width: LiteralInteger }, + floating_point_mode_altintel: struct { target_width: LiteralInteger }, + floating_point_mode_ieeeintel: struct { target_width: LiteralInteger }, + max_workgroup_size_intel: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger, literal_integer_2: LiteralInteger }, + max_work_dim_intel: struct { literal_integer: LiteralInteger }, + no_global_offset_intel, + num_simd_workitems_intel: struct { literal_integer: LiteralInteger }, + scheduler_target_fmax_mhz_intel: struct { literal_integer: LiteralInteger }, + maximally_reconverges_khr, + fp_fast_math_default: struct { target_type: Id, id_ref_1: Id }, + streaming_interface_intel: struct { stall_free_return: LiteralInteger }, + register_map_interface_intel: struct { wait_for_done_write: LiteralInteger }, + named_barrier_count_intel: struct { barrier_count: LiteralInteger }, + maximum_registers_intel: struct { number_of_registers: LiteralInteger }, + maximum_registers_id_intel: struct { number_of_registers: Id }, + named_maximum_registers_intel: struct { named_maximum_number_of_registers: NamedMaximumNumberOfRegisters }, }; }; pub const StorageClass = enum(u32) { - UniformConstant = 0, - Input = 1, - Uniform = 2, - Output = 3, - Workgroup = 4, - CrossWorkgroup = 5, - Private = 6, - Function = 7, - Generic = 8, - PushConstant = 9, - AtomicCounter = 10, - Image = 11, - StorageBuffer = 12, - TileImageEXT = 4172, - NodePayloadAMDX = 5068, - NodeOutputPayloadAMDX = 5076, - CallableDataKHR = 5328, - IncomingCallableDataKHR = 5329, - RayPayloadKHR = 5338, - HitAttributeKHR = 5339, - IncomingRayPayloadKHR = 5342, - ShaderRecordBufferKHR = 5343, - PhysicalStorageBuffer = 5349, - HitObjectAttributeNV = 5385, - TaskPayloadWorkgroupEXT = 5402, - CodeSectionINTEL = 5605, - DeviceOnlyINTEL = 5936, - HostOnlyINTEL = 5937, - - pub const CallableDataNV = StorageClass.CallableDataKHR; - pub const IncomingCallableDataNV = StorageClass.IncomingCallableDataKHR; - pub const RayPayloadNV = StorageClass.RayPayloadKHR; - pub const HitAttributeNV = StorageClass.HitAttributeKHR; - pub const IncomingRayPayloadNV = StorageClass.IncomingRayPayloadKHR; - pub const ShaderRecordBufferNV = StorageClass.ShaderRecordBufferKHR; - pub const PhysicalStorageBufferEXT = StorageClass.PhysicalStorageBuffer; + uniform_constant = 0, + input = 1, + uniform = 2, + output = 3, + workgroup = 4, + cross_workgroup = 5, + private = 6, + function = 7, + generic = 8, + push_constant = 9, + atomic_counter = 10, + image = 11, + storage_buffer = 12, + tile_image_ext = 4172, + tile_attachment_qcom = 4491, + node_payload_amdx = 5068, + callable_data_khr = 5328, + incoming_callable_data_khr = 5329, + ray_payload_khr = 5338, + hit_attribute_khr = 5339, + incoming_ray_payload_khr = 5342, + shader_record_buffer_khr = 5343, + physical_storage_buffer = 5349, + hit_object_attribute_nv = 5385, + task_payload_workgroup_ext = 5402, + code_section_intel = 5605, + device_only_intel = 5936, + host_only_intel = 5937, }; pub const Dim = enum(u32) { - @"1D" = 0, - @"2D" = 1, - @"3D" = 2, - Cube = 3, - Rect = 4, - Buffer = 5, - SubpassData = 6, - TileImageDataEXT = 4173, + @"1d" = 0, + @"2d" = 1, + @"3d" = 2, + cube = 3, + rect = 4, + buffer = 5, + subpass_data = 6, + tile_image_data_ext = 4173, }; pub const SamplerAddressingMode = enum(u32) { - None = 0, - ClampToEdge = 1, - Clamp = 2, - Repeat = 3, - RepeatMirrored = 4, + none = 0, + clamp_to_edge = 1, + clamp = 2, + repeat = 3, + repeat_mirrored = 4, }; pub const SamplerFilterMode = enum(u32) { - Nearest = 0, - Linear = 1, + nearest = 0, + linear = 1, }; pub const ImageFormat = enum(u32) { - Unknown = 0, - Rgba32f = 1, - Rgba16f = 2, - R32f = 3, - Rgba8 = 4, - Rgba8Snorm = 5, - Rg32f = 6, - Rg16f = 7, - R11fG11fB10f = 8, - R16f = 9, - Rgba16 = 10, - Rgb10A2 = 11, - Rg16 = 12, - Rg8 = 13, - R16 = 14, - R8 = 15, - Rgba16Snorm = 16, - Rg16Snorm = 17, - Rg8Snorm = 18, - R16Snorm = 19, - R8Snorm = 20, - Rgba32i = 21, - Rgba16i = 22, - Rgba8i = 23, - R32i = 24, - Rg32i = 25, - Rg16i = 26, - Rg8i = 27, - R16i = 28, - R8i = 29, - Rgba32ui = 30, - Rgba16ui = 31, - Rgba8ui = 32, - R32ui = 33, - Rgb10a2ui = 34, - Rg32ui = 35, - Rg16ui = 36, - Rg8ui = 37, - R16ui = 38, - R8ui = 39, - R64ui = 40, - R64i = 41, + unknown = 0, + rgba32f = 1, + rgba16f = 2, + r32f = 3, + rgba8 = 4, + rgba8snorm = 5, + rg32f = 6, + rg16f = 7, + r11f_g11f_b10f = 8, + r16f = 9, + rgba16 = 10, + rgb10a2 = 11, + rg16 = 12, + rg8 = 13, + r16 = 14, + r8 = 15, + rgba16snorm = 16, + rg16snorm = 17, + rg8snorm = 18, + r16snorm = 19, + r8snorm = 20, + rgba32i = 21, + rgba16i = 22, + rgba8i = 23, + r32i = 24, + rg32i = 25, + rg16i = 26, + rg8i = 27, + r16i = 28, + r8i = 29, + rgba32ui = 30, + rgba16ui = 31, + rgba8ui = 32, + r32ui = 33, + rgb10a2ui = 34, + rg32ui = 35, + rg16ui = 36, + rg8ui = 37, + r16ui = 38, + r8ui = 39, + r64ui = 40, + r64i = 41, }; pub const ImageChannelOrder = enum(u32) { - R = 0, - A = 1, - RG = 2, - RA = 3, - RGB = 4, - RGBA = 5, - BGRA = 6, - ARGB = 7, - Intensity = 8, - Luminance = 9, - Rx = 10, - RGx = 11, - RGBx = 12, - Depth = 13, - DepthStencil = 14, - sRGB = 15, - sRGBx = 16, - sRGBA = 17, - sBGRA = 18, - ABGR = 19, + r = 0, + a = 1, + rg = 2, + ra = 3, + rgb = 4, + rgba = 5, + bgra = 6, + argb = 7, + intensity = 8, + luminance = 9, + rx = 10, + r_gx = 11, + rg_bx = 12, + depth = 13, + depth_stencil = 14, + s_rgb = 15, + s_rg_bx = 16, + s_rgba = 17, + s_bgra = 18, + abgr = 19, }; pub const ImageChannelDataType = enum(u32) { - SnormInt8 = 0, - SnormInt16 = 1, - UnormInt8 = 2, - UnormInt16 = 3, - UnormShort565 = 4, - UnormShort555 = 5, - UnormInt101010 = 6, - SignedInt8 = 7, - SignedInt16 = 8, - SignedInt32 = 9, - UnsignedInt8 = 10, - UnsignedInt16 = 11, - UnsignedInt32 = 12, - HalfFloat = 13, - Float = 14, - UnormInt24 = 15, - UnormInt101010_2 = 16, - UnsignedIntRaw10EXT = 19, - UnsignedIntRaw12EXT = 20, + snorm_int8 = 0, + snorm_int16 = 1, + unorm_int8 = 2, + unorm_int16 = 3, + unorm_short565 = 4, + unorm_short555 = 5, + unorm_int101010 = 6, + signed_int8 = 7, + signed_int16 = 8, + signed_int32 = 9, + unsigned_int8 = 10, + unsigned_int16 = 11, + unsigned_int32 = 12, + half_float = 13, + float = 14, + unorm_int24 = 15, + unorm_int101010_2 = 16, + unorm_int10x6ext = 17, + unsigned_int_raw10ext = 19, + unsigned_int_raw12ext = 20, + unorm_int2_101010ext = 21, + unsigned_int10x6ext = 22, + unsigned_int12x4ext = 23, + unsigned_int14x2ext = 24, + unorm_int12x4ext = 25, + unorm_int14x2ext = 26, }; pub const FPRoundingMode = enum(u32) { - RTE = 0, - RTZ = 1, - RTP = 2, - RTN = 3, + rte = 0, + rtz = 1, + rtp = 2, + rtn = 3, }; pub const FPDenormMode = enum(u32) { - Preserve = 0, - FlushToZero = 1, + preserve = 0, + flush_to_zero = 1, }; pub const QuantizationModes = enum(u32) { - TRN = 0, - TRN_ZERO = 1, - RND = 2, - RND_ZERO = 3, - RND_INF = 4, - RND_MIN_INF = 5, - RND_CONV = 6, - RND_CONV_ODD = 7, + trn = 0, + trn_zero = 1, + rnd = 2, + rnd_zero = 3, + rnd_inf = 4, + rnd_min_inf = 5, + rnd_conv = 6, + rnd_conv_odd = 7, }; pub const FPOperationMode = enum(u32) { - IEEE = 0, - ALT = 1, + ieee = 0, + alt = 1, }; pub const OverflowModes = enum(u32) { - WRAP = 0, - SAT = 1, - SAT_ZERO = 2, - SAT_SYM = 3, + wrap = 0, + sat = 1, + sat_zero = 2, + sat_sym = 3, }; pub const LinkageType = enum(u32) { - Export = 0, - Import = 1, - LinkOnceODR = 2, + @"export" = 0, + import = 1, + link_once_odr = 2, }; pub const AccessQualifier = enum(u32) { - ReadOnly = 0, - WriteOnly = 1, - ReadWrite = 2, + read_only = 0, + write_only = 1, + read_write = 2, }; pub const HostAccessQualifier = enum(u32) { - NoneINTEL = 0, - ReadINTEL = 1, - WriteINTEL = 2, - ReadWriteINTEL = 3, + none_intel = 0, + read_intel = 1, + write_intel = 2, + read_write_intel = 3, }; pub const FunctionParameterAttribute = enum(u32) { - Zext = 0, - Sext = 1, - ByVal = 2, - Sret = 3, - NoAlias = 4, - NoCapture = 5, - NoWrite = 6, - NoReadWrite = 7, - RuntimeAlignedINTEL = 5940, + zext = 0, + sext = 1, + by_val = 2, + sret = 3, + no_alias = 4, + no_capture = 5, + no_write = 6, + no_read_write = 7, + runtime_aligned_intel = 5940, }; pub const Decoration = enum(u32) { - RelaxedPrecision = 0, - SpecId = 1, - Block = 2, - BufferBlock = 3, - RowMajor = 4, - ColMajor = 5, - ArrayStride = 6, - MatrixStride = 7, - GLSLShared = 8, - GLSLPacked = 9, - CPacked = 10, - BuiltIn = 11, - NoPerspective = 13, - Flat = 14, - Patch = 15, - Centroid = 16, - Sample = 17, - Invariant = 18, - Restrict = 19, - Aliased = 20, - Volatile = 21, - Constant = 22, - Coherent = 23, - NonWritable = 24, - NonReadable = 25, - Uniform = 26, - UniformId = 27, - SaturatedConversion = 28, - Stream = 29, - Location = 30, - Component = 31, - Index = 32, - Binding = 33, - DescriptorSet = 34, - Offset = 35, - XfbBuffer = 36, - XfbStride = 37, - FuncParamAttr = 38, - FPRoundingMode = 39, - FPFastMathMode = 40, - LinkageAttributes = 41, - NoContraction = 42, - InputAttachmentIndex = 43, - Alignment = 44, - MaxByteOffset = 45, - AlignmentId = 46, - MaxByteOffsetId = 47, - NoSignedWrap = 4469, - NoUnsignedWrap = 4470, - WeightTextureQCOM = 4487, - BlockMatchTextureQCOM = 4488, - BlockMatchSamplerQCOM = 4499, - ExplicitInterpAMD = 4999, - NodeSharesPayloadLimitsWithAMDX = 5019, - NodeMaxPayloadsAMDX = 5020, - TrackFinishWritingAMDX = 5078, - PayloadNodeNameAMDX = 5091, - OverrideCoverageNV = 5248, - PassthroughNV = 5250, - ViewportRelativeNV = 5252, - SecondaryViewportRelativeNV = 5256, - PerPrimitiveEXT = 5271, - PerViewNV = 5272, - PerTaskNV = 5273, - PerVertexKHR = 5285, - NonUniform = 5300, - RestrictPointer = 5355, - AliasedPointer = 5356, - HitObjectShaderRecordBufferNV = 5386, - BindlessSamplerNV = 5398, - BindlessImageNV = 5399, - BoundSamplerNV = 5400, - BoundImageNV = 5401, - SIMTCallINTEL = 5599, - ReferencedIndirectlyINTEL = 5602, - ClobberINTEL = 5607, - SideEffectsINTEL = 5608, - VectorComputeVariableINTEL = 5624, - FuncParamIOKindINTEL = 5625, - VectorComputeFunctionINTEL = 5626, - StackCallINTEL = 5627, - GlobalVariableOffsetINTEL = 5628, - CounterBuffer = 5634, - UserSemantic = 5635, - UserTypeGOOGLE = 5636, - FunctionRoundingModeINTEL = 5822, - FunctionDenormModeINTEL = 5823, - RegisterINTEL = 5825, - MemoryINTEL = 5826, - NumbanksINTEL = 5827, - BankwidthINTEL = 5828, - MaxPrivateCopiesINTEL = 5829, - SinglepumpINTEL = 5830, - DoublepumpINTEL = 5831, - MaxReplicatesINTEL = 5832, - SimpleDualPortINTEL = 5833, - MergeINTEL = 5834, - BankBitsINTEL = 5835, - ForcePow2DepthINTEL = 5836, - StridesizeINTEL = 5883, - WordsizeINTEL = 5884, - TrueDualPortINTEL = 5885, - BurstCoalesceINTEL = 5899, - CacheSizeINTEL = 5900, - DontStaticallyCoalesceINTEL = 5901, - PrefetchINTEL = 5902, - StallEnableINTEL = 5905, - FuseLoopsInFunctionINTEL = 5907, - MathOpDSPModeINTEL = 5909, - AliasScopeINTEL = 5914, - NoAliasINTEL = 5915, - InitiationIntervalINTEL = 5917, - MaxConcurrencyINTEL = 5918, - PipelineEnableINTEL = 5919, - BufferLocationINTEL = 5921, - IOPipeStorageINTEL = 5944, - FunctionFloatingPointModeINTEL = 6080, - SingleElementVectorINTEL = 6085, - VectorComputeCallableFunctionINTEL = 6087, - MediaBlockIOINTEL = 6140, - StallFreeINTEL = 6151, - FPMaxErrorDecorationINTEL = 6170, - LatencyControlLabelINTEL = 6172, - LatencyControlConstraintINTEL = 6173, - ConduitKernelArgumentINTEL = 6175, - RegisterMapKernelArgumentINTEL = 6176, - MMHostInterfaceAddressWidthINTEL = 6177, - MMHostInterfaceDataWidthINTEL = 6178, - MMHostInterfaceLatencyINTEL = 6179, - MMHostInterfaceReadWriteModeINTEL = 6180, - MMHostInterfaceMaxBurstINTEL = 6181, - MMHostInterfaceWaitRequestINTEL = 6182, - StableKernelArgumentINTEL = 6183, - HostAccessINTEL = 6188, - InitModeINTEL = 6190, - ImplementInRegisterMapINTEL = 6191, - CacheControlLoadINTEL = 6442, - CacheControlStoreINTEL = 6443, - - pub const PerPrimitiveNV = Decoration.PerPrimitiveEXT; - pub const PerVertexNV = Decoration.PerVertexKHR; - pub const NonUniformEXT = Decoration.NonUniform; - pub const RestrictPointerEXT = Decoration.RestrictPointer; - pub const AliasedPointerEXT = Decoration.AliasedPointer; - pub const HlslCounterBufferGOOGLE = Decoration.CounterBuffer; - pub const HlslSemanticGOOGLE = Decoration.UserSemantic; + relaxed_precision = 0, + spec_id = 1, + block = 2, + buffer_block = 3, + row_major = 4, + col_major = 5, + array_stride = 6, + matrix_stride = 7, + glsl_shared = 8, + glsl_packed = 9, + c_packed = 10, + built_in = 11, + no_perspective = 13, + flat = 14, + patch = 15, + centroid = 16, + sample = 17, + invariant = 18, + restrict = 19, + aliased = 20, + @"volatile" = 21, + constant = 22, + coherent = 23, + non_writable = 24, + non_readable = 25, + uniform = 26, + uniform_id = 27, + saturated_conversion = 28, + stream = 29, + location = 30, + component = 31, + index = 32, + binding = 33, + descriptor_set = 34, + offset = 35, + xfb_buffer = 36, + xfb_stride = 37, + func_param_attr = 38, + fp_rounding_mode = 39, + fp_fast_math_mode = 40, + linkage_attributes = 41, + no_contraction = 42, + input_attachment_index = 43, + alignment = 44, + max_byte_offset = 45, + alignment_id = 46, + max_byte_offset_id = 47, + saturated_to_largest_float8normal_conversion_ext = 4216, + no_signed_wrap = 4469, + no_unsigned_wrap = 4470, + weight_texture_qcom = 4487, + block_match_texture_qcom = 4488, + block_match_sampler_qcom = 4499, + explicit_interp_amd = 4999, + node_shares_payload_limits_with_amdx = 5019, + node_max_payloads_amdx = 5020, + track_finish_writing_amdx = 5078, + payload_node_name_amdx = 5091, + payload_node_base_index_amdx = 5098, + payload_node_sparse_array_amdx = 5099, + payload_node_array_size_amdx = 5100, + payload_dispatch_indirect_amdx = 5105, + override_coverage_nv = 5248, + passthrough_nv = 5250, + viewport_relative_nv = 5252, + secondary_viewport_relative_nv = 5256, + per_primitive_ext = 5271, + per_view_nv = 5272, + per_task_nv = 5273, + per_vertex_khr = 5285, + non_uniform = 5300, + restrict_pointer = 5355, + aliased_pointer = 5356, + hit_object_shader_record_buffer_nv = 5386, + bindless_sampler_nv = 5398, + bindless_image_nv = 5399, + bound_sampler_nv = 5400, + bound_image_nv = 5401, + simt_call_intel = 5599, + referenced_indirectly_intel = 5602, + clobber_intel = 5607, + side_effects_intel = 5608, + vector_compute_variable_intel = 5624, + func_param_io_kind_intel = 5625, + vector_compute_function_intel = 5626, + stack_call_intel = 5627, + global_variable_offset_intel = 5628, + counter_buffer = 5634, + user_semantic = 5635, + user_type_google = 5636, + function_rounding_mode_intel = 5822, + function_denorm_mode_intel = 5823, + register_intel = 5825, + memory_intel = 5826, + numbanks_intel = 5827, + bankwidth_intel = 5828, + max_private_copies_intel = 5829, + singlepump_intel = 5830, + doublepump_intel = 5831, + max_replicates_intel = 5832, + simple_dual_port_intel = 5833, + merge_intel = 5834, + bank_bits_intel = 5835, + force_pow2depth_intel = 5836, + stridesize_intel = 5883, + wordsize_intel = 5884, + true_dual_port_intel = 5885, + burst_coalesce_intel = 5899, + cache_size_intel = 5900, + dont_statically_coalesce_intel = 5901, + prefetch_intel = 5902, + stall_enable_intel = 5905, + fuse_loops_in_function_intel = 5907, + math_op_dsp_mode_intel = 5909, + alias_scope_intel = 5914, + no_alias_intel = 5915, + initiation_interval_intel = 5917, + max_concurrency_intel = 5918, + pipeline_enable_intel = 5919, + buffer_location_intel = 5921, + io_pipe_storage_intel = 5944, + function_floating_point_mode_intel = 6080, + single_element_vector_intel = 6085, + vector_compute_callable_function_intel = 6087, + media_block_iointel = 6140, + stall_free_intel = 6151, + fp_max_error_decoration_intel = 6170, + latency_control_label_intel = 6172, + latency_control_constraint_intel = 6173, + conduit_kernel_argument_intel = 6175, + register_map_kernel_argument_intel = 6176, + mm_host_interface_address_width_intel = 6177, + mm_host_interface_data_width_intel = 6178, + mm_host_interface_latency_intel = 6179, + mm_host_interface_read_write_mode_intel = 6180, + mm_host_interface_max_burst_intel = 6181, + mm_host_interface_wait_request_intel = 6182, + stable_kernel_argument_intel = 6183, + host_access_intel = 6188, + init_mode_intel = 6190, + implement_in_register_map_intel = 6191, + cache_control_load_intel = 6442, + cache_control_store_intel = 6443, pub const Extended = union(Decoration) { - RelaxedPrecision, - SpecId: struct { specialization_constant_id: LiteralInteger }, - Block, - BufferBlock, - RowMajor, - ColMajor, - ArrayStride: struct { array_stride: LiteralInteger }, - MatrixStride: struct { matrix_stride: LiteralInteger }, - GLSLShared, - GLSLPacked, - CPacked, - BuiltIn: struct { built_in: BuiltIn }, - NoPerspective, - Flat, - Patch, - Centroid, - Sample, - Invariant, - Restrict, - Aliased, - Volatile, - Constant, - Coherent, - NonWritable, - NonReadable, - Uniform, - UniformId: struct { execution: IdScope }, - SaturatedConversion, - Stream: struct { stream_number: LiteralInteger }, - Location: struct { location: LiteralInteger }, - Component: struct { component: LiteralInteger }, - Index: struct { index: LiteralInteger }, - Binding: struct { binding_point: LiteralInteger }, - DescriptorSet: struct { descriptor_set: LiteralInteger }, - Offset: struct { byte_offset: LiteralInteger }, - XfbBuffer: struct { xfb_buffer_number: LiteralInteger }, - XfbStride: struct { xfb_stride: LiteralInteger }, - FuncParamAttr: struct { function_parameter_attribute: FunctionParameterAttribute }, - FPRoundingMode: struct { fprounding_mode: FPRoundingMode }, - FPFastMathMode: struct { fpfast_math_mode: FPFastMathMode }, - LinkageAttributes: struct { name: LiteralString, linkage_type: LinkageType }, - NoContraction, - InputAttachmentIndex: struct { attachment_index: LiteralInteger }, - Alignment: struct { alignment: LiteralInteger }, - MaxByteOffset: struct { max_byte_offset: LiteralInteger }, - AlignmentId: struct { alignment: IdRef }, - MaxByteOffsetId: struct { max_byte_offset: IdRef }, - NoSignedWrap, - NoUnsignedWrap, - WeightTextureQCOM, - BlockMatchTextureQCOM, - BlockMatchSamplerQCOM, - ExplicitInterpAMD, - NodeSharesPayloadLimitsWithAMDX: struct { payload_array: IdRef }, - NodeMaxPayloadsAMDX: struct { max_number_of_payloads: IdRef }, - TrackFinishWritingAMDX, - PayloadNodeNameAMDX: struct { node_name: LiteralString }, - OverrideCoverageNV, - PassthroughNV, - ViewportRelativeNV, - SecondaryViewportRelativeNV: struct { offset: LiteralInteger }, - PerPrimitiveEXT, - PerViewNV, - PerTaskNV, - PerVertexKHR, - NonUniform, - RestrictPointer, - AliasedPointer, - HitObjectShaderRecordBufferNV, - BindlessSamplerNV, - BindlessImageNV, - BoundSamplerNV, - BoundImageNV, - SIMTCallINTEL: struct { n: LiteralInteger }, - ReferencedIndirectlyINTEL, - ClobberINTEL: struct { register: LiteralString }, - SideEffectsINTEL, - VectorComputeVariableINTEL, - FuncParamIOKindINTEL: struct { kind: LiteralInteger }, - VectorComputeFunctionINTEL, - StackCallINTEL, - GlobalVariableOffsetINTEL: struct { offset: LiteralInteger }, - CounterBuffer: struct { counter_buffer: IdRef }, - UserSemantic: struct { semantic: LiteralString }, - UserTypeGOOGLE: struct { user_type: LiteralString }, - FunctionRoundingModeINTEL: struct { target_width: LiteralInteger, fp_rounding_mode: FPRoundingMode }, - FunctionDenormModeINTEL: struct { target_width: LiteralInteger, fp_denorm_mode: FPDenormMode }, - RegisterINTEL, - MemoryINTEL: struct { memory_type: LiteralString }, - NumbanksINTEL: struct { banks: LiteralInteger }, - BankwidthINTEL: struct { bank_width: LiteralInteger }, - MaxPrivateCopiesINTEL: struct { maximum_copies: LiteralInteger }, - SinglepumpINTEL, - DoublepumpINTEL, - MaxReplicatesINTEL: struct { maximum_replicates: LiteralInteger }, - SimpleDualPortINTEL, - MergeINTEL: struct { merge_key: LiteralString, merge_type: LiteralString }, - BankBitsINTEL: struct { bank_bits: []const LiteralInteger = &.{} }, - ForcePow2DepthINTEL: struct { force_key: LiteralInteger }, - StridesizeINTEL: struct { stride_size: LiteralInteger }, - WordsizeINTEL: struct { word_size: LiteralInteger }, - TrueDualPortINTEL, - BurstCoalesceINTEL, - CacheSizeINTEL: struct { cache_size_in_bytes: LiteralInteger }, - DontStaticallyCoalesceINTEL, - PrefetchINTEL: struct { prefetcher_size_in_bytes: LiteralInteger }, - StallEnableINTEL, - FuseLoopsInFunctionINTEL, - MathOpDSPModeINTEL: struct { mode: LiteralInteger, propagate: LiteralInteger }, - AliasScopeINTEL: struct { aliasing_scopes_list: IdRef }, - NoAliasINTEL: struct { aliasing_scopes_list: IdRef }, - InitiationIntervalINTEL: struct { cycles: LiteralInteger }, - MaxConcurrencyINTEL: struct { invocations: LiteralInteger }, - PipelineEnableINTEL: struct { enable: LiteralInteger }, - BufferLocationINTEL: struct { buffer_location_id: LiteralInteger }, - IOPipeStorageINTEL: struct { io_pipe_id: LiteralInteger }, - FunctionFloatingPointModeINTEL: struct { target_width: LiteralInteger, fp_operation_mode: FPOperationMode }, - SingleElementVectorINTEL, - VectorComputeCallableFunctionINTEL, - MediaBlockIOINTEL, - StallFreeINTEL, - FPMaxErrorDecorationINTEL: struct { max_error: LiteralFloat }, - LatencyControlLabelINTEL: struct { latency_label: LiteralInteger }, - LatencyControlConstraintINTEL: struct { relative_to: LiteralInteger, control_type: LiteralInteger, relative_cycle: LiteralInteger }, - ConduitKernelArgumentINTEL, - RegisterMapKernelArgumentINTEL, - MMHostInterfaceAddressWidthINTEL: struct { addresswidth: LiteralInteger }, - MMHostInterfaceDataWidthINTEL: struct { datawidth: LiteralInteger }, - MMHostInterfaceLatencyINTEL: struct { latency: LiteralInteger }, - MMHostInterfaceReadWriteModeINTEL: struct { readwritemode: AccessQualifier }, - MMHostInterfaceMaxBurstINTEL: struct { maxburstcount: LiteralInteger }, - MMHostInterfaceWaitRequestINTEL: struct { waitrequest: LiteralInteger }, - StableKernelArgumentINTEL, - HostAccessINTEL: struct { access: HostAccessQualifier, name: LiteralString }, - InitModeINTEL: struct { trigger: InitializationModeQualifier }, - ImplementInRegisterMapINTEL: struct { value: LiteralInteger }, - CacheControlLoadINTEL: struct { cache_level: LiteralInteger, cache_control: LoadCacheControl }, - CacheControlStoreINTEL: struct { cache_level: LiteralInteger, cache_control: StoreCacheControl }, + relaxed_precision, + spec_id: struct { specialization_constant_id: LiteralInteger }, + block, + buffer_block, + row_major, + col_major, + array_stride: struct { array_stride: LiteralInteger }, + matrix_stride: struct { matrix_stride: LiteralInteger }, + glsl_shared, + glsl_packed, + c_packed, + built_in: struct { built_in: BuiltIn }, + no_perspective, + flat, + patch, + centroid, + sample, + invariant, + restrict, + aliased, + @"volatile", + constant, + coherent, + non_writable, + non_readable, + uniform, + uniform_id: struct { execution: Id }, + saturated_conversion, + stream: struct { stream_number: LiteralInteger }, + location: struct { location: LiteralInteger }, + component: struct { component: LiteralInteger }, + index: struct { index: LiteralInteger }, + binding: struct { binding_point: LiteralInteger }, + descriptor_set: struct { descriptor_set: LiteralInteger }, + offset: struct { byte_offset: LiteralInteger }, + xfb_buffer: struct { xfb_buffer_number: LiteralInteger }, + xfb_stride: struct { xfb_stride: LiteralInteger }, + func_param_attr: struct { function_parameter_attribute: FunctionParameterAttribute }, + fp_rounding_mode: struct { fp_rounding_mode: FPRoundingMode }, + fp_fast_math_mode: struct { fp_fast_math_mode: FPFastMathMode }, + linkage_attributes: struct { name: LiteralString, linkage_type: LinkageType }, + no_contraction, + input_attachment_index: struct { attachment_index: LiteralInteger }, + alignment: struct { alignment: LiteralInteger }, + max_byte_offset: struct { max_byte_offset: LiteralInteger }, + alignment_id: struct { alignment: Id }, + max_byte_offset_id: struct { max_byte_offset: Id }, + saturated_to_largest_float8normal_conversion_ext, + no_signed_wrap, + no_unsigned_wrap, + weight_texture_qcom, + block_match_texture_qcom, + block_match_sampler_qcom, + explicit_interp_amd, + node_shares_payload_limits_with_amdx: struct { payload_type: Id }, + node_max_payloads_amdx: struct { max_number_of_payloads: Id }, + track_finish_writing_amdx, + payload_node_name_amdx: struct { node_name: Id }, + payload_node_base_index_amdx: struct { base_index: Id }, + payload_node_sparse_array_amdx, + payload_node_array_size_amdx: struct { array_size: Id }, + payload_dispatch_indirect_amdx, + override_coverage_nv, + passthrough_nv, + viewport_relative_nv, + secondary_viewport_relative_nv: struct { offset: LiteralInteger }, + per_primitive_ext, + per_view_nv, + per_task_nv, + per_vertex_khr, + non_uniform, + restrict_pointer, + aliased_pointer, + hit_object_shader_record_buffer_nv, + bindless_sampler_nv, + bindless_image_nv, + bound_sampler_nv, + bound_image_nv, + simt_call_intel: struct { n: LiteralInteger }, + referenced_indirectly_intel, + clobber_intel: struct { register: LiteralString }, + side_effects_intel, + vector_compute_variable_intel, + func_param_io_kind_intel: struct { kind: LiteralInteger }, + vector_compute_function_intel, + stack_call_intel, + global_variable_offset_intel: struct { offset: LiteralInteger }, + counter_buffer: struct { counter_buffer: Id }, + user_semantic: struct { semantic: LiteralString }, + user_type_google: struct { user_type: LiteralString }, + function_rounding_mode_intel: struct { target_width: LiteralInteger, fp_rounding_mode: FPRoundingMode }, + function_denorm_mode_intel: struct { target_width: LiteralInteger, fp_denorm_mode: FPDenormMode }, + register_intel, + memory_intel: struct { memory_type: LiteralString }, + numbanks_intel: struct { banks: LiteralInteger }, + bankwidth_intel: struct { bank_width: LiteralInteger }, + max_private_copies_intel: struct { maximum_copies: LiteralInteger }, + singlepump_intel, + doublepump_intel, + max_replicates_intel: struct { maximum_replicates: LiteralInteger }, + simple_dual_port_intel, + merge_intel: struct { merge_key: LiteralString, merge_type: LiteralString }, + bank_bits_intel: struct { bank_bits: []const LiteralInteger = &.{} }, + force_pow2depth_intel: struct { force_key: LiteralInteger }, + stridesize_intel: struct { stride_size: LiteralInteger }, + wordsize_intel: struct { word_size: LiteralInteger }, + true_dual_port_intel, + burst_coalesce_intel, + cache_size_intel: struct { cache_size_in_bytes: LiteralInteger }, + dont_statically_coalesce_intel, + prefetch_intel: struct { prefetcher_size_in_bytes: LiteralInteger }, + stall_enable_intel, + fuse_loops_in_function_intel, + math_op_dsp_mode_intel: struct { mode: LiteralInteger, propagate: LiteralInteger }, + alias_scope_intel: struct { aliasing_scopes_list: Id }, + no_alias_intel: struct { aliasing_scopes_list: Id }, + initiation_interval_intel: struct { cycles: LiteralInteger }, + max_concurrency_intel: struct { invocations: LiteralInteger }, + pipeline_enable_intel: struct { enable: LiteralInteger }, + buffer_location_intel: struct { buffer_location_id: LiteralInteger }, + io_pipe_storage_intel: struct { io_pipe_id: LiteralInteger }, + function_floating_point_mode_intel: struct { target_width: LiteralInteger, fp_operation_mode: FPOperationMode }, + single_element_vector_intel, + vector_compute_callable_function_intel, + media_block_iointel, + stall_free_intel, + fp_max_error_decoration_intel: struct { max_error: LiteralFloat }, + latency_control_label_intel: struct { latency_label: LiteralInteger }, + latency_control_constraint_intel: struct { relative_to: LiteralInteger, control_type: LiteralInteger, relative_cycle: LiteralInteger }, + conduit_kernel_argument_intel, + register_map_kernel_argument_intel, + mm_host_interface_address_width_intel: struct { address_width: LiteralInteger }, + mm_host_interface_data_width_intel: struct { data_width: LiteralInteger }, + mm_host_interface_latency_intel: struct { latency: LiteralInteger }, + mm_host_interface_read_write_mode_intel: struct { read_write_mode: AccessQualifier }, + mm_host_interface_max_burst_intel: struct { max_burst_count: LiteralInteger }, + mm_host_interface_wait_request_intel: struct { waitrequest: LiteralInteger }, + stable_kernel_argument_intel, + host_access_intel: struct { access: HostAccessQualifier, name: LiteralString }, + init_mode_intel: struct { trigger: InitializationModeQualifier }, + implement_in_register_map_intel: struct { value: LiteralInteger }, + cache_control_load_intel: struct { cache_level: LiteralInteger, cache_control: LoadCacheControl }, + cache_control_store_intel: struct { cache_level: LiteralInteger, cache_control: StoreCacheControl }, }; }; pub const BuiltIn = enum(u32) { - Position = 0, - PointSize = 1, - ClipDistance = 3, - CullDistance = 4, - VertexId = 5, - InstanceId = 6, - PrimitiveId = 7, - InvocationId = 8, - Layer = 9, - ViewportIndex = 10, - TessLevelOuter = 11, - TessLevelInner = 12, - TessCoord = 13, - PatchVertices = 14, - FragCoord = 15, - PointCoord = 16, - FrontFacing = 17, - SampleId = 18, - SamplePosition = 19, - SampleMask = 20, - FragDepth = 22, - HelperInvocation = 23, - NumWorkgroups = 24, - WorkgroupSize = 25, - WorkgroupId = 26, - LocalInvocationId = 27, - GlobalInvocationId = 28, - LocalInvocationIndex = 29, - WorkDim = 30, - GlobalSize = 31, - EnqueuedWorkgroupSize = 32, - GlobalOffset = 33, - GlobalLinearId = 34, - SubgroupSize = 36, - SubgroupMaxSize = 37, - NumSubgroups = 38, - NumEnqueuedSubgroups = 39, - SubgroupId = 40, - SubgroupLocalInvocationId = 41, - VertexIndex = 42, - InstanceIndex = 43, - CoreIDARM = 4160, - CoreCountARM = 4161, - CoreMaxIDARM = 4162, - WarpIDARM = 4163, - WarpMaxIDARM = 4164, - SubgroupEqMask = 4416, - SubgroupGeMask = 4417, - SubgroupGtMask = 4418, - SubgroupLeMask = 4419, - SubgroupLtMask = 4420, - BaseVertex = 4424, - BaseInstance = 4425, - DrawIndex = 4426, - PrimitiveShadingRateKHR = 4432, - DeviceIndex = 4438, - ViewIndex = 4440, - ShadingRateKHR = 4444, - BaryCoordNoPerspAMD = 4992, - BaryCoordNoPerspCentroidAMD = 4993, - BaryCoordNoPerspSampleAMD = 4994, - BaryCoordSmoothAMD = 4995, - BaryCoordSmoothCentroidAMD = 4996, - BaryCoordSmoothSampleAMD = 4997, - BaryCoordPullModelAMD = 4998, - FragStencilRefEXT = 5014, - CoalescedInputCountAMDX = 5021, - ShaderIndexAMDX = 5073, - ViewportMaskNV = 5253, - SecondaryPositionNV = 5257, - SecondaryViewportMaskNV = 5258, - PositionPerViewNV = 5261, - ViewportMaskPerViewNV = 5262, - FullyCoveredEXT = 5264, - TaskCountNV = 5274, - PrimitiveCountNV = 5275, - PrimitiveIndicesNV = 5276, - ClipDistancePerViewNV = 5277, - CullDistancePerViewNV = 5278, - LayerPerViewNV = 5279, - MeshViewCountNV = 5280, - MeshViewIndicesNV = 5281, - BaryCoordKHR = 5286, - BaryCoordNoPerspKHR = 5287, - FragSizeEXT = 5292, - FragInvocationCountEXT = 5293, - PrimitivePointIndicesEXT = 5294, - PrimitiveLineIndicesEXT = 5295, - PrimitiveTriangleIndicesEXT = 5296, - CullPrimitiveEXT = 5299, - LaunchIdKHR = 5319, - LaunchSizeKHR = 5320, - WorldRayOriginKHR = 5321, - WorldRayDirectionKHR = 5322, - ObjectRayOriginKHR = 5323, - ObjectRayDirectionKHR = 5324, - RayTminKHR = 5325, - RayTmaxKHR = 5326, - InstanceCustomIndexKHR = 5327, - ObjectToWorldKHR = 5330, - WorldToObjectKHR = 5331, - HitTNV = 5332, - HitKindKHR = 5333, - CurrentRayTimeNV = 5334, - HitTriangleVertexPositionsKHR = 5335, - HitMicroTriangleVertexPositionsNV = 5337, - HitMicroTriangleVertexBarycentricsNV = 5344, - IncomingRayFlagsKHR = 5351, - RayGeometryIndexKHR = 5352, - WarpsPerSMNV = 5374, - SMCountNV = 5375, - WarpIDNV = 5376, - SMIDNV = 5377, - HitKindFrontFacingMicroTriangleNV = 5405, - HitKindBackFacingMicroTriangleNV = 5406, - CullMaskKHR = 6021, - - pub const SubgroupEqMaskKHR = BuiltIn.SubgroupEqMask; - pub const SubgroupGeMaskKHR = BuiltIn.SubgroupGeMask; - pub const SubgroupGtMaskKHR = BuiltIn.SubgroupGtMask; - pub const SubgroupLeMaskKHR = BuiltIn.SubgroupLeMask; - pub const SubgroupLtMaskKHR = BuiltIn.SubgroupLtMask; - pub const BaryCoordNV = BuiltIn.BaryCoordKHR; - pub const BaryCoordNoPerspNV = BuiltIn.BaryCoordNoPerspKHR; - pub const FragmentSizeNV = BuiltIn.FragSizeEXT; - pub const InvocationsPerPixelNV = BuiltIn.FragInvocationCountEXT; - pub const LaunchIdNV = BuiltIn.LaunchIdKHR; - pub const LaunchSizeNV = BuiltIn.LaunchSizeKHR; - pub const WorldRayOriginNV = BuiltIn.WorldRayOriginKHR; - pub const WorldRayDirectionNV = BuiltIn.WorldRayDirectionKHR; - pub const ObjectRayOriginNV = BuiltIn.ObjectRayOriginKHR; - pub const ObjectRayDirectionNV = BuiltIn.ObjectRayDirectionKHR; - pub const RayTminNV = BuiltIn.RayTminKHR; - pub const RayTmaxNV = BuiltIn.RayTmaxKHR; - pub const InstanceCustomIndexNV = BuiltIn.InstanceCustomIndexKHR; - pub const ObjectToWorldNV = BuiltIn.ObjectToWorldKHR; - pub const WorldToObjectNV = BuiltIn.WorldToObjectKHR; - pub const HitKindNV = BuiltIn.HitKindKHR; - pub const IncomingRayFlagsNV = BuiltIn.IncomingRayFlagsKHR; + position = 0, + point_size = 1, + clip_distance = 3, + cull_distance = 4, + vertex_id = 5, + instance_id = 6, + primitive_id = 7, + invocation_id = 8, + layer = 9, + viewport_index = 10, + tess_level_outer = 11, + tess_level_inner = 12, + tess_coord = 13, + patch_vertices = 14, + frag_coord = 15, + point_coord = 16, + front_facing = 17, + sample_id = 18, + sample_position = 19, + sample_mask = 20, + frag_depth = 22, + helper_invocation = 23, + num_workgroups = 24, + workgroup_size = 25, + workgroup_id = 26, + local_invocation_id = 27, + global_invocation_id = 28, + local_invocation_index = 29, + work_dim = 30, + global_size = 31, + enqueued_workgroup_size = 32, + global_offset = 33, + global_linear_id = 34, + subgroup_size = 36, + subgroup_max_size = 37, + num_subgroups = 38, + num_enqueued_subgroups = 39, + subgroup_id = 40, + subgroup_local_invocation_id = 41, + vertex_index = 42, + instance_index = 43, + core_idarm = 4160, + core_count_arm = 4161, + core_max_idarm = 4162, + warp_idarm = 4163, + warp_max_idarm = 4164, + subgroup_eq_mask = 4416, + subgroup_ge_mask = 4417, + subgroup_gt_mask = 4418, + subgroup_le_mask = 4419, + subgroup_lt_mask = 4420, + base_vertex = 4424, + base_instance = 4425, + draw_index = 4426, + primitive_shading_rate_khr = 4432, + device_index = 4438, + view_index = 4440, + shading_rate_khr = 4444, + tile_offset_qcom = 4492, + tile_dimension_qcom = 4493, + tile_apron_size_qcom = 4494, + bary_coord_no_persp_amd = 4992, + bary_coord_no_persp_centroid_amd = 4993, + bary_coord_no_persp_sample_amd = 4994, + bary_coord_smooth_amd = 4995, + bary_coord_smooth_centroid_amd = 4996, + bary_coord_smooth_sample_amd = 4997, + bary_coord_pull_model_amd = 4998, + frag_stencil_ref_ext = 5014, + remaining_recursion_levels_amdx = 5021, + shader_index_amdx = 5073, + viewport_mask_nv = 5253, + secondary_position_nv = 5257, + secondary_viewport_mask_nv = 5258, + position_per_view_nv = 5261, + viewport_mask_per_view_nv = 5262, + fully_covered_ext = 5264, + task_count_nv = 5274, + primitive_count_nv = 5275, + primitive_indices_nv = 5276, + clip_distance_per_view_nv = 5277, + cull_distance_per_view_nv = 5278, + layer_per_view_nv = 5279, + mesh_view_count_nv = 5280, + mesh_view_indices_nv = 5281, + bary_coord_khr = 5286, + bary_coord_no_persp_khr = 5287, + frag_size_ext = 5292, + frag_invocation_count_ext = 5293, + primitive_point_indices_ext = 5294, + primitive_line_indices_ext = 5295, + primitive_triangle_indices_ext = 5296, + cull_primitive_ext = 5299, + launch_id_khr = 5319, + launch_size_khr = 5320, + world_ray_origin_khr = 5321, + world_ray_direction_khr = 5322, + object_ray_origin_khr = 5323, + object_ray_direction_khr = 5324, + ray_tmin_khr = 5325, + ray_tmax_khr = 5326, + instance_custom_index_khr = 5327, + object_to_world_khr = 5330, + world_to_object_khr = 5331, + hit_tnv = 5332, + hit_kind_khr = 5333, + current_ray_time_nv = 5334, + hit_triangle_vertex_positions_khr = 5335, + hit_micro_triangle_vertex_positions_nv = 5337, + hit_micro_triangle_vertex_barycentrics_nv = 5344, + incoming_ray_flags_khr = 5351, + ray_geometry_index_khr = 5352, + hit_is_sphere_nv = 5359, + hit_is_lssnv = 5360, + hit_sphere_position_nv = 5361, + warps_per_smnv = 5374, + sm_count_nv = 5375, + warp_idnv = 5376, + smidnv = 5377, + hit_lss_positions_nv = 5396, + hit_kind_front_facing_micro_triangle_nv = 5405, + hit_kind_back_facing_micro_triangle_nv = 5406, + hit_sphere_radius_nv = 5420, + hit_lss_radii_nv = 5421, + cluster_idnv = 5436, + cull_mask_khr = 6021, }; pub const Scope = enum(u32) { - CrossDevice = 0, - Device = 1, - Workgroup = 2, - Subgroup = 3, - Invocation = 4, - QueueFamily = 5, - ShaderCallKHR = 6, - - pub const QueueFamilyKHR = Scope.QueueFamily; + cross_device = 0, + device = 1, + workgroup = 2, + subgroup = 3, + invocation = 4, + queue_family = 5, + shader_call_khr = 6, }; pub const GroupOperation = enum(u32) { - Reduce = 0, - InclusiveScan = 1, - ExclusiveScan = 2, - ClusteredReduce = 3, - PartitionedReduceNV = 6, - PartitionedInclusiveScanNV = 7, - PartitionedExclusiveScanNV = 8, + reduce = 0, + inclusive_scan = 1, + exclusive_scan = 2, + clustered_reduce = 3, + partitioned_reduce_nv = 6, + partitioned_inclusive_scan_nv = 7, + partitioned_exclusive_scan_nv = 8, }; pub const KernelEnqueueFlags = enum(u32) { - NoWait = 0, - WaitKernel = 1, - WaitWorkGroup = 2, + no_wait = 0, + wait_kernel = 1, + wait_work_group = 2, }; pub const Capability = enum(u32) { - Matrix = 0, - Shader = 1, - Geometry = 2, - Tessellation = 3, - Addresses = 4, - Linkage = 5, - Kernel = 6, - Vector16 = 7, - Float16Buffer = 8, - Float16 = 9, - Float64 = 10, - Int64 = 11, - Int64Atomics = 12, - ImageBasic = 13, - ImageReadWrite = 14, - ImageMipmap = 15, - Pipes = 17, - Groups = 18, - DeviceEnqueue = 19, - LiteralSampler = 20, - AtomicStorage = 21, - Int16 = 22, - TessellationPointSize = 23, - GeometryPointSize = 24, - ImageGatherExtended = 25, - StorageImageMultisample = 27, - UniformBufferArrayDynamicIndexing = 28, - SampledImageArrayDynamicIndexing = 29, - StorageBufferArrayDynamicIndexing = 30, - StorageImageArrayDynamicIndexing = 31, - ClipDistance = 32, - CullDistance = 33, - ImageCubeArray = 34, - SampleRateShading = 35, - ImageRect = 36, - SampledRect = 37, - GenericPointer = 38, - Int8 = 39, - InputAttachment = 40, - SparseResidency = 41, - MinLod = 42, - Sampled1D = 43, - Image1D = 44, - SampledCubeArray = 45, - SampledBuffer = 46, - ImageBuffer = 47, - ImageMSArray = 48, - StorageImageExtendedFormats = 49, - ImageQuery = 50, - DerivativeControl = 51, - InterpolationFunction = 52, - TransformFeedback = 53, - GeometryStreams = 54, - StorageImageReadWithoutFormat = 55, - StorageImageWriteWithoutFormat = 56, - MultiViewport = 57, - SubgroupDispatch = 58, - NamedBarrier = 59, - PipeStorage = 60, - GroupNonUniform = 61, - GroupNonUniformVote = 62, - GroupNonUniformArithmetic = 63, - GroupNonUniformBallot = 64, - GroupNonUniformShuffle = 65, - GroupNonUniformShuffleRelative = 66, - GroupNonUniformClustered = 67, - GroupNonUniformQuad = 68, - ShaderLayer = 69, - ShaderViewportIndex = 70, - UniformDecoration = 71, - CoreBuiltinsARM = 4165, - TileImageColorReadAccessEXT = 4166, - TileImageDepthReadAccessEXT = 4167, - TileImageStencilReadAccessEXT = 4168, - FragmentShadingRateKHR = 4422, - SubgroupBallotKHR = 4423, - DrawParameters = 4427, - WorkgroupMemoryExplicitLayoutKHR = 4428, - WorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, - WorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, - SubgroupVoteKHR = 4431, - StorageBuffer16BitAccess = 4433, - UniformAndStorageBuffer16BitAccess = 4434, - StoragePushConstant16 = 4435, - StorageInputOutput16 = 4436, - DeviceGroup = 4437, - MultiView = 4439, - VariablePointersStorageBuffer = 4441, - VariablePointers = 4442, - AtomicStorageOps = 4445, - SampleMaskPostDepthCoverage = 4447, - StorageBuffer8BitAccess = 4448, - UniformAndStorageBuffer8BitAccess = 4449, - StoragePushConstant8 = 4450, - DenormPreserve = 4464, - DenormFlushToZero = 4465, - SignedZeroInfNanPreserve = 4466, - RoundingModeRTE = 4467, - RoundingModeRTZ = 4468, - RayQueryProvisionalKHR = 4471, - RayQueryKHR = 4472, - RayTraversalPrimitiveCullingKHR = 4478, - RayTracingKHR = 4479, - TextureSampleWeightedQCOM = 4484, - TextureBoxFilterQCOM = 4485, - TextureBlockMatchQCOM = 4486, - TextureBlockMatch2QCOM = 4498, - Float16ImageAMD = 5008, - ImageGatherBiasLodAMD = 5009, - FragmentMaskAMD = 5010, - StencilExportEXT = 5013, - ImageReadWriteLodAMD = 5015, - Int64ImageEXT = 5016, - ShaderClockKHR = 5055, - ShaderEnqueueAMDX = 5067, - QuadControlKHR = 5087, - SampleMaskOverrideCoverageNV = 5249, - GeometryShaderPassthroughNV = 5251, - ShaderViewportIndexLayerEXT = 5254, - ShaderViewportMaskNV = 5255, - ShaderStereoViewNV = 5259, - PerViewAttributesNV = 5260, - FragmentFullyCoveredEXT = 5265, - MeshShadingNV = 5266, - ImageFootprintNV = 5282, - MeshShadingEXT = 5283, - FragmentBarycentricKHR = 5284, - ComputeDerivativeGroupQuadsNV = 5288, - FragmentDensityEXT = 5291, - GroupNonUniformPartitionedNV = 5297, - ShaderNonUniform = 5301, - RuntimeDescriptorArray = 5302, - InputAttachmentArrayDynamicIndexing = 5303, - UniformTexelBufferArrayDynamicIndexing = 5304, - StorageTexelBufferArrayDynamicIndexing = 5305, - UniformBufferArrayNonUniformIndexing = 5306, - SampledImageArrayNonUniformIndexing = 5307, - StorageBufferArrayNonUniformIndexing = 5308, - StorageImageArrayNonUniformIndexing = 5309, - InputAttachmentArrayNonUniformIndexing = 5310, - UniformTexelBufferArrayNonUniformIndexing = 5311, - StorageTexelBufferArrayNonUniformIndexing = 5312, - RayTracingPositionFetchKHR = 5336, - RayTracingNV = 5340, - RayTracingMotionBlurNV = 5341, - VulkanMemoryModel = 5345, - VulkanMemoryModelDeviceScope = 5346, - PhysicalStorageBufferAddresses = 5347, - ComputeDerivativeGroupLinearNV = 5350, - RayTracingProvisionalKHR = 5353, - CooperativeMatrixNV = 5357, - FragmentShaderSampleInterlockEXT = 5363, - FragmentShaderShadingRateInterlockEXT = 5372, - ShaderSMBuiltinsNV = 5373, - FragmentShaderPixelInterlockEXT = 5378, - DemoteToHelperInvocation = 5379, - DisplacementMicromapNV = 5380, - RayTracingOpacityMicromapEXT = 5381, - ShaderInvocationReorderNV = 5383, - BindlessTextureNV = 5390, - RayQueryPositionFetchKHR = 5391, - AtomicFloat16VectorNV = 5404, - RayTracingDisplacementMicromapNV = 5409, - RawAccessChainsNV = 5414, - SubgroupShuffleINTEL = 5568, - SubgroupBufferBlockIOINTEL = 5569, - SubgroupImageBlockIOINTEL = 5570, - SubgroupImageMediaBlockIOINTEL = 5579, - RoundToInfinityINTEL = 5582, - FloatingPointModeINTEL = 5583, - IntegerFunctions2INTEL = 5584, - FunctionPointersINTEL = 5603, - IndirectReferencesINTEL = 5604, - AsmINTEL = 5606, - AtomicFloat32MinMaxEXT = 5612, - AtomicFloat64MinMaxEXT = 5613, - AtomicFloat16MinMaxEXT = 5616, - VectorComputeINTEL = 5617, - VectorAnyINTEL = 5619, - ExpectAssumeKHR = 5629, - SubgroupAvcMotionEstimationINTEL = 5696, - SubgroupAvcMotionEstimationIntraINTEL = 5697, - SubgroupAvcMotionEstimationChromaINTEL = 5698, - VariableLengthArrayINTEL = 5817, - FunctionFloatControlINTEL = 5821, - FPGAMemoryAttributesINTEL = 5824, - FPFastMathModeINTEL = 5837, - ArbitraryPrecisionIntegersINTEL = 5844, - ArbitraryPrecisionFloatingPointINTEL = 5845, - UnstructuredLoopControlsINTEL = 5886, - FPGALoopControlsINTEL = 5888, - KernelAttributesINTEL = 5892, - FPGAKernelAttributesINTEL = 5897, - FPGAMemoryAccessesINTEL = 5898, - FPGAClusterAttributesINTEL = 5904, - LoopFuseINTEL = 5906, - FPGADSPControlINTEL = 5908, - MemoryAccessAliasingINTEL = 5910, - FPGAInvocationPipeliningAttributesINTEL = 5916, - FPGABufferLocationINTEL = 5920, - ArbitraryPrecisionFixedPointINTEL = 5922, - USMStorageClassesINTEL = 5935, - RuntimeAlignedAttributeINTEL = 5939, - IOPipesINTEL = 5943, - BlockingPipesINTEL = 5945, - FPGARegINTEL = 5948, - DotProductInputAll = 6016, - DotProductInput4x8Bit = 6017, - DotProductInput4x8BitPacked = 6018, - DotProduct = 6019, - RayCullMaskKHR = 6020, - CooperativeMatrixKHR = 6022, - BitInstructions = 6025, - GroupNonUniformRotateKHR = 6026, - FloatControls2 = 6029, - AtomicFloat32AddEXT = 6033, - AtomicFloat64AddEXT = 6034, - LongCompositesINTEL = 6089, - OptNoneINTEL = 6094, - AtomicFloat16AddEXT = 6095, - DebugInfoModuleINTEL = 6114, - BFloat16ConversionINTEL = 6115, - SplitBarrierINTEL = 6141, - FPGAClusterAttributesV2INTEL = 6150, - FPGAKernelAttributesv2INTEL = 6161, - FPMaxErrorINTEL = 6169, - FPGALatencyControlINTEL = 6171, - FPGAArgumentInterfacesINTEL = 6174, - GlobalVariableHostAccessINTEL = 6187, - GlobalVariableFPGADecorationsINTEL = 6189, - GroupUniformArithmeticKHR = 6400, - MaskedGatherScatterINTEL = 6427, - CacheControlsINTEL = 6441, - RegisterLimitsINTEL = 6460, - - pub const StorageUniformBufferBlock16 = Capability.StorageBuffer16BitAccess; - pub const StorageUniform16 = Capability.UniformAndStorageBuffer16BitAccess; - pub const ShaderViewportIndexLayerNV = Capability.ShaderViewportIndexLayerEXT; - pub const FragmentBarycentricNV = Capability.FragmentBarycentricKHR; - pub const ShadingRateNV = Capability.FragmentDensityEXT; - pub const ShaderNonUniformEXT = Capability.ShaderNonUniform; - pub const RuntimeDescriptorArrayEXT = Capability.RuntimeDescriptorArray; - pub const InputAttachmentArrayDynamicIndexingEXT = Capability.InputAttachmentArrayDynamicIndexing; - pub const UniformTexelBufferArrayDynamicIndexingEXT = Capability.UniformTexelBufferArrayDynamicIndexing; - pub const StorageTexelBufferArrayDynamicIndexingEXT = Capability.StorageTexelBufferArrayDynamicIndexing; - pub const UniformBufferArrayNonUniformIndexingEXT = Capability.UniformBufferArrayNonUniformIndexing; - pub const SampledImageArrayNonUniformIndexingEXT = Capability.SampledImageArrayNonUniformIndexing; - pub const StorageBufferArrayNonUniformIndexingEXT = Capability.StorageBufferArrayNonUniformIndexing; - pub const StorageImageArrayNonUniformIndexingEXT = Capability.StorageImageArrayNonUniformIndexing; - pub const InputAttachmentArrayNonUniformIndexingEXT = Capability.InputAttachmentArrayNonUniformIndexing; - pub const UniformTexelBufferArrayNonUniformIndexingEXT = Capability.UniformTexelBufferArrayNonUniformIndexing; - pub const StorageTexelBufferArrayNonUniformIndexingEXT = Capability.StorageTexelBufferArrayNonUniformIndexing; - pub const VulkanMemoryModelKHR = Capability.VulkanMemoryModel; - pub const VulkanMemoryModelDeviceScopeKHR = Capability.VulkanMemoryModelDeviceScope; - pub const PhysicalStorageBufferAddressesEXT = Capability.PhysicalStorageBufferAddresses; - pub const DemoteToHelperInvocationEXT = Capability.DemoteToHelperInvocation; - pub const DotProductInputAllKHR = Capability.DotProductInputAll; - pub const DotProductInput4x8BitKHR = Capability.DotProductInput4x8Bit; - pub const DotProductInput4x8BitPackedKHR = Capability.DotProductInput4x8BitPacked; - pub const DotProductKHR = Capability.DotProduct; + matrix = 0, + shader = 1, + geometry = 2, + tessellation = 3, + addresses = 4, + linkage = 5, + kernel = 6, + vector16 = 7, + float16buffer = 8, + float16 = 9, + float64 = 10, + int64 = 11, + int64atomics = 12, + image_basic = 13, + image_read_write = 14, + image_mipmap = 15, + pipes = 17, + groups = 18, + device_enqueue = 19, + literal_sampler = 20, + atomic_storage = 21, + int16 = 22, + tessellation_point_size = 23, + geometry_point_size = 24, + image_gather_extended = 25, + storage_image_multisample = 27, + uniform_buffer_array_dynamic_indexing = 28, + sampled_image_array_dynamic_indexing = 29, + storage_buffer_array_dynamic_indexing = 30, + storage_image_array_dynamic_indexing = 31, + clip_distance = 32, + cull_distance = 33, + image_cube_array = 34, + sample_rate_shading = 35, + image_rect = 36, + sampled_rect = 37, + generic_pointer = 38, + int8 = 39, + input_attachment = 40, + sparse_residency = 41, + min_lod = 42, + sampled1d = 43, + image1d = 44, + sampled_cube_array = 45, + sampled_buffer = 46, + image_buffer = 47, + image_ms_array = 48, + storage_image_extended_formats = 49, + image_query = 50, + derivative_control = 51, + interpolation_function = 52, + transform_feedback = 53, + geometry_streams = 54, + storage_image_read_without_format = 55, + storage_image_write_without_format = 56, + multi_viewport = 57, + subgroup_dispatch = 58, + named_barrier = 59, + pipe_storage = 60, + group_non_uniform = 61, + group_non_uniform_vote = 62, + group_non_uniform_arithmetic = 63, + group_non_uniform_ballot = 64, + group_non_uniform_shuffle = 65, + group_non_uniform_shuffle_relative = 66, + group_non_uniform_clustered = 67, + group_non_uniform_quad = 68, + shader_layer = 69, + shader_viewport_index = 70, + uniform_decoration = 71, + core_builtins_arm = 4165, + tile_image_color_read_access_ext = 4166, + tile_image_depth_read_access_ext = 4167, + tile_image_stencil_read_access_ext = 4168, + tensors_arm = 4174, + storage_tensor_array_dynamic_indexing_arm = 4175, + storage_tensor_array_non_uniform_indexing_arm = 4176, + graph_arm = 4191, + cooperative_matrix_layouts_arm = 4201, + float8ext = 4212, + float8cooperative_matrix_ext = 4213, + fragment_shading_rate_khr = 4422, + subgroup_ballot_khr = 4423, + draw_parameters = 4427, + workgroup_memory_explicit_layout_khr = 4428, + workgroup_memory_explicit_layout8bit_access_khr = 4429, + workgroup_memory_explicit_layout16bit_access_khr = 4430, + subgroup_vote_khr = 4431, + storage_buffer16bit_access = 4433, + uniform_and_storage_buffer16bit_access = 4434, + storage_push_constant16 = 4435, + storage_input_output16 = 4436, + device_group = 4437, + multi_view = 4439, + variable_pointers_storage_buffer = 4441, + variable_pointers = 4442, + atomic_storage_ops = 4445, + sample_mask_post_depth_coverage = 4447, + storage_buffer8bit_access = 4448, + uniform_and_storage_buffer8bit_access = 4449, + storage_push_constant8 = 4450, + denorm_preserve = 4464, + denorm_flush_to_zero = 4465, + signed_zero_inf_nan_preserve = 4466, + rounding_mode_rte = 4467, + rounding_mode_rtz = 4468, + ray_query_provisional_khr = 4471, + ray_query_khr = 4472, + untyped_pointers_khr = 4473, + ray_traversal_primitive_culling_khr = 4478, + ray_tracing_khr = 4479, + texture_sample_weighted_qcom = 4484, + texture_box_filter_qcom = 4485, + texture_block_match_qcom = 4486, + tile_shading_qcom = 4495, + texture_block_match2qcom = 4498, + float16image_amd = 5008, + image_gather_bias_lod_amd = 5009, + fragment_mask_amd = 5010, + stencil_export_ext = 5013, + image_read_write_lod_amd = 5015, + int64image_ext = 5016, + shader_clock_khr = 5055, + shader_enqueue_amdx = 5067, + quad_control_khr = 5087, + int4type_intel = 5112, + int4cooperative_matrix_intel = 5114, + b_float16type_khr = 5116, + b_float16dot_product_khr = 5117, + b_float16cooperative_matrix_khr = 5118, + sample_mask_override_coverage_nv = 5249, + geometry_shader_passthrough_nv = 5251, + shader_viewport_index_layer_ext = 5254, + shader_viewport_mask_nv = 5255, + shader_stereo_view_nv = 5259, + per_view_attributes_nv = 5260, + fragment_fully_covered_ext = 5265, + mesh_shading_nv = 5266, + image_footprint_nv = 5282, + mesh_shading_ext = 5283, + fragment_barycentric_khr = 5284, + compute_derivative_group_quads_khr = 5288, + fragment_density_ext = 5291, + group_non_uniform_partitioned_nv = 5297, + shader_non_uniform = 5301, + runtime_descriptor_array = 5302, + input_attachment_array_dynamic_indexing = 5303, + uniform_texel_buffer_array_dynamic_indexing = 5304, + storage_texel_buffer_array_dynamic_indexing = 5305, + uniform_buffer_array_non_uniform_indexing = 5306, + sampled_image_array_non_uniform_indexing = 5307, + storage_buffer_array_non_uniform_indexing = 5308, + storage_image_array_non_uniform_indexing = 5309, + input_attachment_array_non_uniform_indexing = 5310, + uniform_texel_buffer_array_non_uniform_indexing = 5311, + storage_texel_buffer_array_non_uniform_indexing = 5312, + ray_tracing_position_fetch_khr = 5336, + ray_tracing_nv = 5340, + ray_tracing_motion_blur_nv = 5341, + vulkan_memory_model = 5345, + vulkan_memory_model_device_scope = 5346, + physical_storage_buffer_addresses = 5347, + compute_derivative_group_linear_khr = 5350, + ray_tracing_provisional_khr = 5353, + cooperative_matrix_nv = 5357, + fragment_shader_sample_interlock_ext = 5363, + fragment_shader_shading_rate_interlock_ext = 5372, + shader_sm_builtins_nv = 5373, + fragment_shader_pixel_interlock_ext = 5378, + demote_to_helper_invocation = 5379, + displacement_micromap_nv = 5380, + ray_tracing_opacity_micromap_ext = 5381, + shader_invocation_reorder_nv = 5383, + bindless_texture_nv = 5390, + ray_query_position_fetch_khr = 5391, + cooperative_vector_nv = 5394, + atomic_float16vector_nv = 5404, + ray_tracing_displacement_micromap_nv = 5409, + raw_access_chains_nv = 5414, + ray_tracing_spheres_geometry_nv = 5418, + ray_tracing_linear_swept_spheres_geometry_nv = 5419, + cooperative_matrix_reductions_nv = 5430, + cooperative_matrix_conversions_nv = 5431, + cooperative_matrix_per_element_operations_nv = 5432, + cooperative_matrix_tensor_addressing_nv = 5433, + cooperative_matrix_block_loads_nv = 5434, + cooperative_vector_training_nv = 5435, + ray_tracing_cluster_acceleration_structure_nv = 5437, + tensor_addressing_nv = 5439, + subgroup_shuffle_intel = 5568, + subgroup_buffer_block_iointel = 5569, + subgroup_image_block_iointel = 5570, + subgroup_image_media_block_iointel = 5579, + round_to_infinity_intel = 5582, + floating_point_mode_intel = 5583, + integer_functions2intel = 5584, + function_pointers_intel = 5603, + indirect_references_intel = 5604, + asm_intel = 5606, + atomic_float32min_max_ext = 5612, + atomic_float64min_max_ext = 5613, + atomic_float16min_max_ext = 5616, + vector_compute_intel = 5617, + vector_any_intel = 5619, + expect_assume_khr = 5629, + subgroup_avc_motion_estimation_intel = 5696, + subgroup_avc_motion_estimation_intra_intel = 5697, + subgroup_avc_motion_estimation_chroma_intel = 5698, + variable_length_array_intel = 5817, + function_float_control_intel = 5821, + fpga_memory_attributes_intel = 5824, + fp_fast_math_mode_intel = 5837, + arbitrary_precision_integers_intel = 5844, + arbitrary_precision_floating_point_intel = 5845, + unstructured_loop_controls_intel = 5886, + fpga_loop_controls_intel = 5888, + kernel_attributes_intel = 5892, + fpga_kernel_attributes_intel = 5897, + fpga_memory_accesses_intel = 5898, + fpga_cluster_attributes_intel = 5904, + loop_fuse_intel = 5906, + fpgadsp_control_intel = 5908, + memory_access_aliasing_intel = 5910, + fpga_invocation_pipelining_attributes_intel = 5916, + fpga_buffer_location_intel = 5920, + arbitrary_precision_fixed_point_intel = 5922, + usm_storage_classes_intel = 5935, + runtime_aligned_attribute_intel = 5939, + io_pipes_intel = 5943, + blocking_pipes_intel = 5945, + fpga_reg_intel = 5948, + dot_product_input_all = 6016, + dot_product_input4x8bit = 6017, + dot_product_input4x8bit_packed = 6018, + dot_product = 6019, + ray_cull_mask_khr = 6020, + cooperative_matrix_khr = 6022, + replicated_composites_ext = 6024, + bit_instructions = 6025, + group_non_uniform_rotate_khr = 6026, + float_controls2 = 6029, + atomic_float32add_ext = 6033, + atomic_float64add_ext = 6034, + long_composites_intel = 6089, + opt_none_ext = 6094, + atomic_float16add_ext = 6095, + debug_info_module_intel = 6114, + b_float16conversion_intel = 6115, + split_barrier_intel = 6141, + arithmetic_fence_ext = 6144, + fpga_cluster_attributes_v2intel = 6150, + fpga_kernel_attributesv2intel = 6161, + task_sequence_intel = 6162, + fp_max_error_intel = 6169, + fpga_latency_control_intel = 6171, + fpga_argument_interfaces_intel = 6174, + global_variable_host_access_intel = 6187, + global_variable_fpga_decorations_intel = 6189, + subgroup_buffer_prefetch_intel = 6220, + subgroup2d_block_iointel = 6228, + subgroup2d_block_transform_intel = 6229, + subgroup2d_block_transpose_intel = 6230, + subgroup_matrix_multiply_accumulate_intel = 6236, + ternary_bitwise_function_intel = 6241, + group_uniform_arithmetic_khr = 6400, + tensor_float32rounding_intel = 6425, + masked_gather_scatter_intel = 6427, + cache_controls_intel = 6441, + register_limits_intel = 6460, + bindless_images_intel = 6528, }; pub const RayQueryIntersection = enum(u32) { - RayQueryCandidateIntersectionKHR = 0, - RayQueryCommittedIntersectionKHR = 1, + ray_query_candidate_intersection_khr = 0, + ray_query_committed_intersection_khr = 1, }; pub const RayQueryCommittedIntersectionType = enum(u32) { - RayQueryCommittedIntersectionNoneKHR = 0, - RayQueryCommittedIntersectionTriangleKHR = 1, - RayQueryCommittedIntersectionGeneratedKHR = 2, + ray_query_committed_intersection_none_khr = 0, + ray_query_committed_intersection_triangle_khr = 1, + ray_query_committed_intersection_generated_khr = 2, }; pub const RayQueryCandidateIntersectionType = enum(u32) { - RayQueryCandidateIntersectionTriangleKHR = 0, - RayQueryCandidateIntersectionAABBKHR = 1, + ray_query_candidate_intersection_triangle_khr = 0, + ray_query_candidate_intersection_aabbkhr = 1, }; pub const PackedVectorFormat = enum(u32) { - PackedVectorFormat4x8Bit = 0, - - pub const PackedVectorFormat4x8BitKHR = PackedVectorFormat.PackedVectorFormat4x8Bit; + packed_vector_format4x8bit = 0, }; pub const CooperativeMatrixOperands = packed struct { - MatrixASignedComponentsKHR: bool = false, - MatrixBSignedComponentsKHR: bool = false, - MatrixCSignedComponentsKHR: bool = false, - MatrixResultSignedComponentsKHR: bool = false, - SaturatingAccumulationKHR: bool = false, + matrix_a_signed_components_khr: bool = false, + matrix_b_signed_components_khr: bool = false, + matrix_c_signed_components_khr: bool = false, + matrix_result_signed_components_khr: bool = false, + saturating_accumulation_khr: bool = false, _reserved_bit_5: bool = false, _reserved_bit_6: bool = false, _reserved_bit_7: bool = false, @@ -4935,52 +5213,372 @@ pub const CooperativeMatrixOperands = packed struct { _reserved_bit_31: bool = false, }; pub const CooperativeMatrixLayout = enum(u32) { - RowMajorKHR = 0, - ColumnMajorKHR = 1, + row_major_khr = 0, + column_major_khr = 1, + row_blocked_interleaved_arm = 4202, + column_blocked_interleaved_arm = 4203, }; pub const CooperativeMatrixUse = enum(u32) { - MatrixAKHR = 0, - MatrixBKHR = 1, - MatrixAccumulatorKHR = 2, + matrix_akhr = 0, + matrix_bkhr = 1, + matrix_accumulator_khr = 2, +}; +pub const CooperativeMatrixReduce = packed struct { + row: bool = false, + column: bool = false, + @"2x2": bool = false, + _reserved_bit_3: bool = false, + _reserved_bit_4: bool = false, + _reserved_bit_5: bool = false, + _reserved_bit_6: bool = false, + _reserved_bit_7: bool = false, + _reserved_bit_8: bool = false, + _reserved_bit_9: bool = false, + _reserved_bit_10: bool = false, + _reserved_bit_11: bool = false, + _reserved_bit_12: bool = false, + _reserved_bit_13: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, +}; +pub const TensorClampMode = enum(u32) { + undefined = 0, + constant = 1, + clamp_to_edge = 2, + repeat = 3, + repeat_mirrored = 4, +}; +pub const TensorAddressingOperands = packed struct { + tensor_view: bool = false, + decode_func: bool = false, + _reserved_bit_2: bool = false, + _reserved_bit_3: bool = false, + _reserved_bit_4: bool = false, + _reserved_bit_5: bool = false, + _reserved_bit_6: bool = false, + _reserved_bit_7: bool = false, + _reserved_bit_8: bool = false, + _reserved_bit_9: bool = false, + _reserved_bit_10: bool = false, + _reserved_bit_11: bool = false, + _reserved_bit_12: bool = false, + _reserved_bit_13: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, + + pub const Extended = struct { + tensor_view: ?struct { id_ref: Id } = null, + decode_func: ?struct { id_ref: Id } = null, + _reserved_bit_2: bool = false, + _reserved_bit_3: bool = false, + _reserved_bit_4: bool = false, + _reserved_bit_5: bool = false, + _reserved_bit_6: bool = false, + _reserved_bit_7: bool = false, + _reserved_bit_8: bool = false, + _reserved_bit_9: bool = false, + _reserved_bit_10: bool = false, + _reserved_bit_11: bool = false, + _reserved_bit_12: bool = false, + _reserved_bit_13: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, + }; }; pub const InitializationModeQualifier = enum(u32) { - InitOnDeviceReprogramINTEL = 0, - InitOnDeviceResetINTEL = 1, + init_on_device_reprogram_intel = 0, + init_on_device_reset_intel = 1, }; pub const LoadCacheControl = enum(u32) { - UncachedINTEL = 0, - CachedINTEL = 1, - StreamingINTEL = 2, - InvalidateAfterReadINTEL = 3, - ConstCachedINTEL = 4, + uncached_intel = 0, + cached_intel = 1, + streaming_intel = 2, + invalidate_after_read_intel = 3, + const_cached_intel = 4, }; pub const StoreCacheControl = enum(u32) { - UncachedINTEL = 0, - WriteThroughINTEL = 1, - WriteBackINTEL = 2, - StreamingINTEL = 3, + uncached_intel = 0, + write_through_intel = 1, + write_back_intel = 2, + streaming_intel = 3, }; pub const NamedMaximumNumberOfRegisters = enum(u32) { - AutoINTEL = 0, + auto_intel = 0, +}; +pub const MatrixMultiplyAccumulateOperands = packed struct { + matrix_a_signed_components_intel: bool = false, + matrix_b_signed_components_intel: bool = false, + matrix_cb_float16intel: bool = false, + matrix_result_b_float16intel: bool = false, + matrix_a_packed_int8intel: bool = false, + matrix_b_packed_int8intel: bool = false, + matrix_a_packed_int4intel: bool = false, + matrix_b_packed_int4intel: bool = false, + matrix_atf32intel: bool = false, + matrix_btf32intel: bool = false, + matrix_a_packed_float16intel: bool = false, + matrix_b_packed_float16intel: bool = false, + matrix_a_packed_b_float16intel: bool = false, + matrix_b_packed_b_float16intel: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, +}; +pub const FPEncoding = enum(u32) { + b_float16khr = 0, + float8e4m3ext = 4214, + float8e5m2ext = 4215, +}; +pub const CooperativeVectorMatrixLayout = enum(u32) { + row_major_nv = 0, + column_major_nv = 1, + inferencing_optimal_nv = 2, + training_optimal_nv = 3, +}; +pub const ComponentType = enum(u32) { + float16nv = 0, + float32nv = 1, + float64nv = 2, + signed_int8nv = 3, + signed_int16nv = 4, + signed_int32nv = 5, + signed_int64nv = 6, + unsigned_int8nv = 7, + unsigned_int16nv = 8, + unsigned_int32nv = 9, + unsigned_int64nv = 10, + signed_int8packed_nv = 1000491000, + unsigned_int8packed_nv = 1000491001, + float_e4m3nv = 1000491002, + float_e5m2nv = 1000491003, +}; +pub const TensorOperands = packed struct { + nontemporal_arm: bool = false, + out_of_bounds_value_arm: bool = false, + make_element_available_arm: bool = false, + make_element_visible_arm: bool = false, + non_private_element_arm: bool = false, + _reserved_bit_5: bool = false, + _reserved_bit_6: bool = false, + _reserved_bit_7: bool = false, + _reserved_bit_8: bool = false, + _reserved_bit_9: bool = false, + _reserved_bit_10: bool = false, + _reserved_bit_11: bool = false, + _reserved_bit_12: bool = false, + _reserved_bit_13: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, + + pub const Extended = struct { + nontemporal_arm: bool = false, + out_of_bounds_value_arm: ?struct { id_ref: Id } = null, + make_element_available_arm: ?struct { id_ref: Id } = null, + make_element_visible_arm: ?struct { id_ref: Id } = null, + non_private_element_arm: bool = false, + _reserved_bit_5: bool = false, + _reserved_bit_6: bool = false, + _reserved_bit_7: bool = false, + _reserved_bit_8: bool = false, + _reserved_bit_9: bool = false, + _reserved_bit_10: bool = false, + _reserved_bit_11: bool = false, + _reserved_bit_12: bool = false, + _reserved_bit_13: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, + }; +}; +pub const @"DebugInfo.DebugInfoFlags" = packed struct { + flag_is_protected: bool = false, + flag_is_private: bool = false, + flag_is_local: bool = false, + flag_is_definition: bool = false, + flag_fwd_decl: bool = false, + flag_artificial: bool = false, + flag_explicit: bool = false, + flag_prototyped: bool = false, + flag_object_pointer: bool = false, + flag_static_member: bool = false, + flag_indirect_variable: bool = false, + flag_l_value_reference: bool = false, + flag_r_value_reference: bool = false, + flag_is_optimized: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, +}; +pub const @"DebugInfo.DebugBaseTypeAttributeEncoding" = enum(u32) { + unspecified = 0, + address = 1, + boolean = 2, + float = 4, + signed = 5, + signed_char = 6, + unsigned = 7, + unsigned_char = 8, +}; +pub const @"DebugInfo.DebugCompositeType" = enum(u32) { + class = 0, + structure = 1, + @"union" = 2, +}; +pub const @"DebugInfo.DebugTypeQualifier" = enum(u32) { + const_type = 0, + volatile_type = 1, + restrict_type = 2, +}; +pub const @"DebugInfo.DebugOperation" = enum(u32) { + deref = 0, + plus = 1, + minus = 2, + plus_uconst = 3, + bit_piece = 4, + swap = 5, + xderef = 6, + stack_value = 7, + constu = 8, + + pub const Extended = union(@"DebugInfo.DebugOperation") { + deref, + plus, + minus, + plus_uconst: struct { literal_integer: LiteralInteger }, + bit_piece: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger }, + swap, + xderef, + stack_value, + constu: struct { literal_integer: LiteralInteger }, + }; }; pub const @"OpenCL.DebugInfo.100.DebugInfoFlags" = packed struct { - FlagIsProtected: bool = false, - FlagIsPrivate: bool = false, - FlagIsLocal: bool = false, - FlagIsDefinition: bool = false, - FlagFwdDecl: bool = false, - FlagArtificial: bool = false, - FlagExplicit: bool = false, - FlagPrototyped: bool = false, - FlagObjectPointer: bool = false, - FlagStaticMember: bool = false, - FlagIndirectVariable: bool = false, - FlagLValueReference: bool = false, - FlagRValueReference: bool = false, - FlagIsOptimized: bool = false, - FlagIsEnumClass: bool = false, - FlagTypePassByValue: bool = false, - FlagTypePassByReference: bool = false, + flag_is_protected: bool = false, + flag_is_private: bool = false, + flag_is_local: bool = false, + flag_is_definition: bool = false, + flag_fwd_decl: bool = false, + flag_artificial: bool = false, + flag_explicit: bool = false, + flag_prototyped: bool = false, + flag_object_pointer: bool = false, + flag_static_member: bool = false, + flag_indirect_variable: bool = false, + flag_l_value_reference: bool = false, + flag_r_value_reference: bool = false, + flag_is_optimized: bool = false, + flag_is_enum_class: bool = false, + flag_type_pass_by_value: bool = false, + flag_type_pass_by_reference: bool = false, _reserved_bit_17: bool = false, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, @@ -4998,74 +5596,108 @@ pub const @"OpenCL.DebugInfo.100.DebugInfoFlags" = packed struct { _reserved_bit_31: bool = false, }; pub const @"OpenCL.DebugInfo.100.DebugBaseTypeAttributeEncoding" = enum(u32) { - Unspecified = 0, - Address = 1, - Boolean = 2, - Float = 3, - Signed = 4, - SignedChar = 5, - Unsigned = 6, - UnsignedChar = 7, + unspecified = 0, + address = 1, + boolean = 2, + float = 3, + signed = 4, + signed_char = 5, + unsigned = 6, + unsigned_char = 7, }; pub const @"OpenCL.DebugInfo.100.DebugCompositeType" = enum(u32) { - Class = 0, - Structure = 1, - Union = 2, + class = 0, + structure = 1, + @"union" = 2, }; pub const @"OpenCL.DebugInfo.100.DebugTypeQualifier" = enum(u32) { - ConstType = 0, - VolatileType = 1, - RestrictType = 2, - AtomicType = 3, + const_type = 0, + volatile_type = 1, + restrict_type = 2, + atomic_type = 3, }; pub const @"OpenCL.DebugInfo.100.DebugOperation" = enum(u32) { - Deref = 0, - Plus = 1, - Minus = 2, - PlusUconst = 3, - BitPiece = 4, - Swap = 5, - Xderef = 6, - StackValue = 7, - Constu = 8, - Fragment = 9, + deref = 0, + plus = 1, + minus = 2, + plus_uconst = 3, + bit_piece = 4, + swap = 5, + xderef = 6, + stack_value = 7, + constu = 8, + fragment = 9, pub const Extended = union(@"OpenCL.DebugInfo.100.DebugOperation") { - Deref, - Plus, - Minus, - PlusUconst: struct { literal_integer: LiteralInteger }, - BitPiece: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger }, - Swap, - Xderef, - StackValue, - Constu: struct { literal_integer: LiteralInteger }, - Fragment: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger }, + deref, + plus, + minus, + plus_uconst: struct { literal_integer: LiteralInteger }, + bit_piece: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger }, + swap, + xderef, + stack_value, + constu: struct { literal_integer: LiteralInteger }, + fragment: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger }, }; }; pub const @"OpenCL.DebugInfo.100.DebugImportedEntity" = enum(u32) { - ImportedModule = 0, - ImportedDeclaration = 1, + imported_module = 0, + imported_declaration = 1, +}; +pub const @"NonSemantic.ClspvReflection.6.KernelPropertyFlags" = packed struct { + may_use_printf: bool = false, + _reserved_bit_1: bool = false, + _reserved_bit_2: bool = false, + _reserved_bit_3: bool = false, + _reserved_bit_4: bool = false, + _reserved_bit_5: bool = false, + _reserved_bit_6: bool = false, + _reserved_bit_7: bool = false, + _reserved_bit_8: bool = false, + _reserved_bit_9: bool = false, + _reserved_bit_10: bool = false, + _reserved_bit_11: bool = false, + _reserved_bit_12: bool = false, + _reserved_bit_13: bool = false, + _reserved_bit_14: bool = false, + _reserved_bit_15: bool = false, + _reserved_bit_16: bool = false, + _reserved_bit_17: bool = false, + _reserved_bit_18: bool = false, + _reserved_bit_19: bool = false, + _reserved_bit_20: bool = false, + _reserved_bit_21: bool = false, + _reserved_bit_22: bool = false, + _reserved_bit_23: bool = false, + _reserved_bit_24: bool = false, + _reserved_bit_25: bool = false, + _reserved_bit_26: bool = false, + _reserved_bit_27: bool = false, + _reserved_bit_28: bool = false, + _reserved_bit_29: bool = false, + _reserved_bit_30: bool = false, + _reserved_bit_31: bool = false, }; pub const @"NonSemantic.Shader.DebugInfo.100.DebugInfoFlags" = packed struct { - FlagIsProtected: bool = false, - FlagIsPrivate: bool = false, - FlagIsLocal: bool = false, - FlagIsDefinition: bool = false, - FlagFwdDecl: bool = false, - FlagArtificial: bool = false, - FlagExplicit: bool = false, - FlagPrototyped: bool = false, - FlagObjectPointer: bool = false, - FlagStaticMember: bool = false, - FlagIndirectVariable: bool = false, - FlagLValueReference: bool = false, - FlagRValueReference: bool = false, - FlagIsOptimized: bool = false, - FlagIsEnumClass: bool = false, - FlagTypePassByValue: bool = false, - FlagTypePassByReference: bool = false, - FlagUnknownPhysicalLayout: bool = false, + flag_is_protected: bool = false, + flag_is_private: bool = false, + flag_is_local: bool = false, + flag_is_definition: bool = false, + flag_fwd_decl: bool = false, + flag_artificial: bool = false, + flag_explicit: bool = false, + flag_prototyped: bool = false, + flag_object_pointer: bool = false, + flag_static_member: bool = false, + flag_indirect_variable: bool = false, + flag_l_value_reference: bool = false, + flag_r_value_reference: bool = false, + flag_is_optimized: bool = false, + flag_is_enum_class: bool = false, + flag_type_pass_by_value: bool = false, + flag_type_pass_by_reference: bool = false, + flag_unknown_physical_layout: bool = false, _reserved_bit_18: bool = false, _reserved_bit_19: bool = false, _reserved_bit_20: bool = false, @@ -5082,7 +5714,7 @@ pub const @"NonSemantic.Shader.DebugInfo.100.DebugInfoFlags" = packed struct { _reserved_bit_31: bool = false, }; pub const @"NonSemantic.Shader.DebugInfo.100.BuildIdentifierFlags" = packed struct { - IdentifierPossibleDuplicates: bool = false, + identifier_possible_duplicates: bool = false, _reserved_bit_1: bool = false, _reserved_bit_2: bool = false, _reserved_bit_3: bool = false, @@ -5116,11415 +5748,12668 @@ pub const @"NonSemantic.Shader.DebugInfo.100.BuildIdentifierFlags" = packed stru _reserved_bit_31: bool = false, }; pub const @"NonSemantic.Shader.DebugInfo.100.DebugBaseTypeAttributeEncoding" = enum(u32) { - Unspecified = 0, - Address = 1, - Boolean = 2, - Float = 3, - Signed = 4, - SignedChar = 5, - Unsigned = 6, - UnsignedChar = 7, + unspecified = 0, + address = 1, + boolean = 2, + float = 3, + signed = 4, + signed_char = 5, + unsigned = 6, + unsigned_char = 7, }; pub const @"NonSemantic.Shader.DebugInfo.100.DebugCompositeType" = enum(u32) { - Class = 0, - Structure = 1, - Union = 2, + class = 0, + structure = 1, + @"union" = 2, }; pub const @"NonSemantic.Shader.DebugInfo.100.DebugTypeQualifier" = enum(u32) { - ConstType = 0, - VolatileType = 1, - RestrictType = 2, - AtomicType = 3, + const_type = 0, + volatile_type = 1, + restrict_type = 2, + atomic_type = 3, }; pub const @"NonSemantic.Shader.DebugInfo.100.DebugOperation" = enum(u32) { - Deref = 0, - Plus = 1, - Minus = 2, - PlusUconst = 3, - BitPiece = 4, - Swap = 5, - Xderef = 6, - StackValue = 7, - Constu = 8, - Fragment = 9, + deref = 0, + plus = 1, + minus = 2, + plus_uconst = 3, + bit_piece = 4, + swap = 5, + xderef = 6, + stack_value = 7, + constu = 8, + fragment = 9, pub const Extended = union(@"NonSemantic.Shader.DebugInfo.100.DebugOperation") { - Deref, - Plus, - Minus, - PlusUconst: struct { id_ref: IdRef }, - BitPiece: struct { id_ref_0: IdRef, id_ref_1: IdRef }, - Swap, - Xderef, - StackValue, - Constu: struct { id_ref: IdRef }, - Fragment: struct { id_ref_0: IdRef, id_ref_1: IdRef }, + deref, + plus, + minus, + plus_uconst: struct { id_ref: Id }, + bit_piece: struct { id_ref_0: Id, id_ref_1: Id }, + swap, + xderef, + stack_value, + constu: struct { id_ref: Id }, + fragment: struct { id_ref_0: Id, id_ref_1: Id }, }; }; pub const @"NonSemantic.Shader.DebugInfo.100.DebugImportedEntity" = enum(u32) { - ImportedModule = 0, - ImportedDeclaration = 1, -}; -pub const @"NonSemantic.ClspvReflection.6.KernelPropertyFlags" = packed struct { - MayUsePrintf: bool = false, - _reserved_bit_1: bool = false, - _reserved_bit_2: bool = false, - _reserved_bit_3: bool = false, - _reserved_bit_4: bool = false, - _reserved_bit_5: bool = false, - _reserved_bit_6: bool = false, - _reserved_bit_7: bool = false, - _reserved_bit_8: bool = false, - _reserved_bit_9: bool = false, - _reserved_bit_10: bool = false, - _reserved_bit_11: bool = false, - _reserved_bit_12: bool = false, - _reserved_bit_13: bool = false, - _reserved_bit_14: bool = false, - _reserved_bit_15: bool = false, - _reserved_bit_16: bool = false, - _reserved_bit_17: bool = false, - _reserved_bit_18: bool = false, - _reserved_bit_19: bool = false, - _reserved_bit_20: bool = false, - _reserved_bit_21: bool = false, - _reserved_bit_22: bool = false, - _reserved_bit_23: bool = false, - _reserved_bit_24: bool = false, - _reserved_bit_25: bool = false, - _reserved_bit_26: bool = false, - _reserved_bit_27: bool = false, - _reserved_bit_28: bool = false, - _reserved_bit_29: bool = false, - _reserved_bit_30: bool = false, - _reserved_bit_31: bool = false, -}; -pub const @"DebugInfo.DebugInfoFlags" = packed struct { - FlagIsProtected: bool = false, - FlagIsPrivate: bool = false, - FlagIsLocal: bool = false, - FlagIsDefinition: bool = false, - FlagFwdDecl: bool = false, - FlagArtificial: bool = false, - FlagExplicit: bool = false, - FlagPrototyped: bool = false, - FlagObjectPointer: bool = false, - FlagStaticMember: bool = false, - FlagIndirectVariable: bool = false, - FlagLValueReference: bool = false, - FlagRValueReference: bool = false, - FlagIsOptimized: bool = false, - _reserved_bit_14: bool = false, - _reserved_bit_15: bool = false, - _reserved_bit_16: bool = false, - _reserved_bit_17: bool = false, - _reserved_bit_18: bool = false, - _reserved_bit_19: bool = false, - _reserved_bit_20: bool = false, - _reserved_bit_21: bool = false, - _reserved_bit_22: bool = false, - _reserved_bit_23: bool = false, - _reserved_bit_24: bool = false, - _reserved_bit_25: bool = false, - _reserved_bit_26: bool = false, - _reserved_bit_27: bool = false, - _reserved_bit_28: bool = false, - _reserved_bit_29: bool = false, - _reserved_bit_30: bool = false, - _reserved_bit_31: bool = false, -}; -pub const @"DebugInfo.DebugBaseTypeAttributeEncoding" = enum(u32) { - Unspecified = 0, - Address = 1, - Boolean = 2, - Float = 4, - Signed = 5, - SignedChar = 6, - Unsigned = 7, - UnsignedChar = 8, -}; -pub const @"DebugInfo.DebugCompositeType" = enum(u32) { - Class = 0, - Structure = 1, - Union = 2, -}; -pub const @"DebugInfo.DebugTypeQualifier" = enum(u32) { - ConstType = 0, - VolatileType = 1, - RestrictType = 2, -}; -pub const @"DebugInfo.DebugOperation" = enum(u32) { - Deref = 0, - Plus = 1, - Minus = 2, - PlusUconst = 3, - BitPiece = 4, - Swap = 5, - Xderef = 6, - StackValue = 7, - Constu = 8, - - pub const Extended = union(@"DebugInfo.DebugOperation") { - Deref, - Plus, - Minus, - PlusUconst: struct { literal_integer: LiteralInteger }, - BitPiece: struct { literal_integer_0: LiteralInteger, literal_integer_1: LiteralInteger }, - Swap, - Xderef, - StackValue, - Constu: struct { literal_integer: LiteralInteger }, - }; + imported_module = 0, + imported_declaration = 1, }; pub const InstructionSet = enum { core, - @"OpenCL.std", - @"GLSL.std.450", - @"OpenCL.DebugInfo.100", - SPV_AMD_shader_ballot, - @"NonSemantic.Shader.DebugInfo.100", - @"NonSemantic.VkspReflection", - @"NonSemantic.ClspvReflection.6", - SPV_AMD_gcn_shader, - SPV_AMD_shader_trinary_minmax, - DebugInfo, - @"NonSemantic.DebugPrintf", - SPV_AMD_shader_explicit_vertex_parameter, - @"NonSemantic.DebugBreak", + spv_amd_shader_trinary_minmax, + spv_ext_inst_type_tosa_001000_1, + non_semantic_vksp_reflection, + spv_amd_shader_explicit_vertex_parameter, + debug_info, + non_semantic_debug_break, + open_cl_debug_info_100, + non_semantic_clspv_reflection_6, + glsl_std_450, + spv_amd_shader_ballot, + non_semantic_debug_printf, + spv_amd_gcn_shader, + open_cl_std, + non_semantic_shader_debug_info_100, zig, pub fn instructions(self: InstructionSet) []const Instruction { return switch (self) { - .core => &[_]Instruction{ + .core => &.{ .{ .name = "OpNop", .opcode = 0, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpUndef", .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSourceContinued", .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpSource", .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .SourceLanguage, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .LiteralString, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .source_language, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .literal_string, .quantifier = .optional }, }, }, .{ .name = "OpSourceExtension", .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpName", .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpMemberName", .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpString", .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpLine", .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpExtension", .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpExtInstImport", .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpExtInst", .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralExtInstInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_ext_inst_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpMemoryModel", .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .AddressingModel, .quantifier = .required }, - .{ .kind = .MemoryModel, .quantifier = .required }, + .operands = &.{ + .{ .kind = .addressing_model, .quantifier = .required }, + .{ .kind = .memory_model, .quantifier = .required }, }, }, .{ .name = "OpEntryPoint", .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .ExecutionModel, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .execution_model, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpExecutionMode", .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ExecutionMode, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .execution_mode, .quantifier = .required }, }, }, .{ .name = "OpCapability", .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .Capability, .quantifier = .required }, + .operands = &.{ + .{ .kind = .capability, .quantifier = .required }, }, }, .{ .name = "OpTypeVoid", .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeBool", .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeInt", .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpTypeFloat", .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .fp_encoding, .quantifier = .optional }, }, }, .{ .name = "OpTypeVector", .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpTypeMatrix", .opcode = 24, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpTypeImage", .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .Dim, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .ImageFormat, .quantifier = .required }, - .{ .kind = .AccessQualifier, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .dim, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .image_format, .quantifier = .required }, + .{ .kind = .access_qualifier, .quantifier = .optional }, }, }, .{ .name = "OpTypeSampler", .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeSampledImage", .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeArray", .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeRuntimeArray", .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeStruct", .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpTypeOpaque", .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpTypePointer", .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .StorageClass, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeFunction", .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpTypeEvent", .opcode = 34, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeDeviceEvent", .opcode = 35, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeReserveId", .opcode = 36, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeQueue", .opcode = 37, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypePipe", .opcode = 38, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .AccessQualifier, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .access_qualifier, .quantifier = .required }, }, }, .{ .name = "OpTypeForwardPointer", .opcode = 39, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .StorageClass, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, }, }, .{ .name = "OpConstantTrue", .opcode = 41, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpConstantFalse", .opcode = 42, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpConstant", .opcode = 43, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralContextDependentNumber, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_context_dependent_number, .quantifier = .required }, }, }, .{ .name = "OpConstantComposite", .opcode = 44, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpConstantSampler", .opcode = 45, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .SamplerAddressingMode, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .SamplerFilterMode, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .sampler_addressing_mode, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .sampler_filter_mode, .quantifier = .required }, }, }, .{ .name = "OpConstantNull", .opcode = 46, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSpecConstantTrue", .opcode = 48, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSpecConstantFalse", .opcode = 49, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSpecConstant", .opcode = 50, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralContextDependentNumber, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_context_dependent_number, .quantifier = .required }, }, }, .{ .name = "OpSpecConstantComposite", .opcode = 51, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpSpecConstantOp", .opcode = 52, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralSpecConstantOpInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_spec_constant_op_integer, .quantifier = .required }, }, }, .{ .name = "OpFunction", .opcode = 54, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .FunctionControl, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .function_control, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFunctionParameter", .opcode = 55, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpFunctionEnd", .opcode = 56, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpFunctionCall", .opcode = 57, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpVariable", .opcode = 59, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .StorageClass, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpImageTexelPointer", .opcode = 60, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLoad", .opcode = 61, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpStore", .opcode = 62, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpCopyMemory", .opcode = 63, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpCopyMemorySized", .opcode = 64, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpAccessChain", .opcode = 65, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpInBoundsAccessChain", .opcode = 66, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpPtrAccessChain", .opcode = 67, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpArrayLength", .opcode = 68, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpGenericPtrMemSemantics", .opcode = 69, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpInBoundsPtrAccessChain", .opcode = 70, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpDecorate", .opcode = 71, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .decoration, .quantifier = .required }, }, }, .{ .name = "OpMemberDecorate", .opcode = 72, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .decoration, .quantifier = .required }, }, }, .{ .name = "OpDecorationGroup", .opcode = 73, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpGroupDecorate", .opcode = 74, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpGroupMemberDecorate", .opcode = 75, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PairIdRefLiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .pair_id_ref_literal_integer, .quantifier = .variadic }, }, }, .{ .name = "OpVectorExtractDynamic", .opcode = 77, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpVectorInsertDynamic", .opcode = 78, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpVectorShuffle", .opcode = 79, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .variadic }, }, }, .{ .name = "OpCompositeConstruct", .opcode = 80, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpCompositeExtract", .opcode = 81, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .variadic }, }, }, .{ .name = "OpCompositeInsert", .opcode = 82, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .variadic }, }, }, .{ .name = "OpCopyObject", .opcode = 83, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTranspose", .opcode = 84, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSampledImage", .opcode = 86, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageSampleImplicitLod", .opcode = 87, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSampleExplicitLod", .opcode = 88, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSampleDrefImplicitLod", .opcode = 89, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSampleDrefExplicitLod", .opcode = 90, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSampleProjImplicitLod", .opcode = 91, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSampleProjExplicitLod", .opcode = 92, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSampleProjDrefImplicitLod", .opcode = 93, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSampleProjDrefExplicitLod", .opcode = 94, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageFetch", .opcode = 95, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageGather", .opcode = 96, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageDrefGather", .opcode = 97, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageRead", .opcode = 98, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageWrite", .opcode = 99, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImage", .opcode = 100, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQueryFormat", .opcode = 101, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQueryOrder", .opcode = 102, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQuerySizeLod", .opcode = 103, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQuerySize", .opcode = 104, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQueryLod", .opcode = 105, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQueryLevels", .opcode = 106, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageQuerySamples", .opcode = 107, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertFToU", .opcode = 109, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertFToS", .opcode = 110, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertSToF", .opcode = 111, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertUToF", .opcode = 112, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUConvert", .opcode = 113, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSConvert", .opcode = 114, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFConvert", .opcode = 115, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpQuantizeToF16", .opcode = 116, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertPtrToU", .opcode = 117, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSatConvertSToU", .opcode = 118, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSatConvertUToS", .opcode = 119, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertUToPtr", .opcode = 120, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpPtrCastToGeneric", .opcode = 121, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGenericCastToPtr", .opcode = 122, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGenericCastToPtrExplicit", .opcode = 123, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .StorageClass, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, }, }, .{ .name = "OpBitcast", .opcode = 124, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSNegate", .opcode = 126, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFNegate", .opcode = 127, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIAdd", .opcode = 128, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFAdd", .opcode = 129, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpISub", .opcode = 130, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFSub", .opcode = 131, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIMul", .opcode = 132, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFMul", .opcode = 133, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUDiv", .opcode = 134, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSDiv", .opcode = 135, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFDiv", .opcode = 136, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUMod", .opcode = 137, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSRem", .opcode = 138, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSMod", .opcode = 139, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFRem", .opcode = 140, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFMod", .opcode = 141, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpVectorTimesScalar", .opcode = 142, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpMatrixTimesScalar", .opcode = 143, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpVectorTimesMatrix", .opcode = 144, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpMatrixTimesVector", .opcode = 145, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpMatrixTimesMatrix", .opcode = 146, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpOuterProduct", .opcode = 147, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDot", .opcode = 148, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIAddCarry", .opcode = 149, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpISubBorrow", .opcode = 150, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUMulExtended", .opcode = 151, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSMulExtended", .opcode = 152, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAny", .opcode = 154, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAll", .opcode = 155, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIsNan", .opcode = 156, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIsInf", .opcode = 157, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIsFinite", .opcode = 158, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIsNormal", .opcode = 159, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSignBitSet", .opcode = 160, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLessOrGreater", .opcode = 161, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpOrdered", .opcode = 162, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUnordered", .opcode = 163, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLogicalEqual", .opcode = 164, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLogicalNotEqual", .opcode = 165, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLogicalOr", .opcode = 166, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLogicalAnd", .opcode = 167, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpLogicalNot", .opcode = 168, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSelect", .opcode = 169, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIEqual", .opcode = 170, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpINotEqual", .opcode = 171, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUGreaterThan", .opcode = 172, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSGreaterThan", .opcode = 173, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUGreaterThanEqual", .opcode = 174, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSGreaterThanEqual", .opcode = 175, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpULessThan", .opcode = 176, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSLessThan", .opcode = 177, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpULessThanEqual", .opcode = 178, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSLessThanEqual", .opcode = 179, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFOrdEqual", .opcode = 180, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFUnordEqual", .opcode = 181, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFOrdNotEqual", .opcode = 182, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFUnordNotEqual", .opcode = 183, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFOrdLessThan", .opcode = 184, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFUnordLessThan", .opcode = 185, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFOrdGreaterThan", .opcode = 186, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFUnordGreaterThan", .opcode = 187, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFOrdLessThanEqual", .opcode = 188, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFUnordLessThanEqual", .opcode = 189, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFOrdGreaterThanEqual", .opcode = 190, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFUnordGreaterThanEqual", .opcode = 191, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpShiftRightLogical", .opcode = 194, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpShiftRightArithmetic", .opcode = 195, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpShiftLeftLogical", .opcode = 196, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitwiseOr", .opcode = 197, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitwiseXor", .opcode = 198, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitwiseAnd", .opcode = 199, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpNot", .opcode = 200, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitFieldInsert", .opcode = 201, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitFieldSExtract", .opcode = 202, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitFieldUExtract", .opcode = 203, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitReverse", .opcode = 204, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBitCount", .opcode = 205, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDPdx", .opcode = 207, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDPdy", .opcode = 208, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFwidth", .opcode = 209, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDPdxFine", .opcode = 210, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDPdyFine", .opcode = 211, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFwidthFine", .opcode = 212, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDPdxCoarse", .opcode = 213, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDPdyCoarse", .opcode = 214, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFwidthCoarse", .opcode = 215, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpEmitVertex", .opcode = 218, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpEndPrimitive", .opcode = 219, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpEmitStreamVertex", .opcode = 220, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpEndStreamPrimitive", .opcode = 221, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpControlBarrier", .opcode = 224, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpMemoryBarrier", .opcode = 225, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpAtomicLoad", .opcode = 227, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpAtomicStore", .opcode = 228, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicExchange", .opcode = 229, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicCompareExchange", .opcode = 230, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicCompareExchangeWeak", .opcode = 231, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicIIncrement", .opcode = 232, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpAtomicIDecrement", .opcode = 233, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpAtomicIAdd", .opcode = 234, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicISub", .opcode = 235, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicSMin", .opcode = 236, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicUMin", .opcode = 237, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicSMax", .opcode = 238, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicUMax", .opcode = 239, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicAnd", .opcode = 240, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicOr", .opcode = 241, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicXor", .opcode = 242, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpPhi", .opcode = 245, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .PairIdRefIdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .pair_id_ref_id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpLoopMerge", .opcode = 246, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LoopControl, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .loop_control, .quantifier = .required }, }, }, .{ .name = "OpSelectionMerge", .opcode = 247, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .SelectionControl, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .selection_control, .quantifier = .required }, }, }, .{ .name = "OpLabel", .opcode = 248, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpBranch", .opcode = 249, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBranchConditional", .opcode = 250, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .variadic }, }, }, .{ .name = "OpSwitch", .opcode = 251, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PairLiteralIntegerIdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .pair_literal_integer_id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpKill", .opcode = 252, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpReturn", .opcode = 253, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpReturnValue", .opcode = 254, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUnreachable", .opcode = 255, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpLifetimeStart", .opcode = 256, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpLifetimeStop", .opcode = 257, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpGroupAsyncCopy", .opcode = 259, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupWaitEvents", .opcode = 260, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupAll", .opcode = 261, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupAny", .opcode = 262, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupBroadcast", .opcode = 263, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupIAdd", .opcode = 264, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFAdd", .opcode = 265, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFMin", .opcode = 266, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupUMin", .opcode = 267, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupSMin", .opcode = 268, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFMax", .opcode = 269, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupUMax", .opcode = 270, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupSMax", .opcode = 271, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReadPipe", .opcode = 274, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpWritePipe", .opcode = 275, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReservedReadPipe", .opcode = 276, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReservedWritePipe", .opcode = 277, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReserveReadPipePackets", .opcode = 278, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReserveWritePipePackets", .opcode = 279, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCommitReadPipe", .opcode = 280, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCommitWritePipe", .opcode = 281, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIsValidReserveId", .opcode = 282, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetNumPipePackets", .opcode = 283, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetMaxPipePackets", .opcode = 284, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupReserveReadPipePackets", .opcode = 285, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupReserveWritePipePackets", .opcode = 286, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupCommitReadPipe", .opcode = 287, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupCommitWritePipe", .opcode = 288, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpEnqueueMarker", .opcode = 291, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpEnqueueKernel", .opcode = 292, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpGetKernelNDrangeSubGroupCount", .opcode = 293, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetKernelNDrangeMaxSubGroupSize", .opcode = 294, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetKernelWorkGroupSize", .opcode = 295, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetKernelPreferredWorkGroupSizeMultiple", .opcode = 296, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRetainEvent", .opcode = 297, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReleaseEvent", .opcode = 298, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCreateUserEvent", .opcode = 299, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpIsValidEvent", .opcode = 300, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSetUserEventStatus", .opcode = 301, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCaptureEventProfilingInfo", .opcode = 302, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetDefaultQueue", .opcode = 303, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpBuildNDRange", .opcode = 304, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageSparseSampleImplicitLod", .opcode = 305, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseSampleExplicitLod", .opcode = 306, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSparseSampleDrefImplicitLod", .opcode = 307, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseSampleDrefExplicitLod", .opcode = 308, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSparseSampleProjImplicitLod", .opcode = 309, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseSampleProjExplicitLod", .opcode = 310, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSparseSampleProjDrefImplicitLod", .opcode = 311, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseSampleProjDrefExplicitLod", .opcode = 312, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .required }, }, }, .{ .name = "OpImageSparseFetch", .opcode = 313, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseGather", .opcode = 314, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseDrefGather", .opcode = 315, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpImageSparseTexelsResident", .opcode = 316, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpNoLine", .opcode = 317, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpAtomicFlagTestAndSet", .opcode = 318, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpAtomicFlagClear", .opcode = 319, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpImageSparseRead", .opcode = 320, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, }, }, .{ .name = "OpSizeOf", .opcode = 321, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypePipeStorage", .opcode = 322, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpConstantPipeStorage", .opcode = 323, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpCreatePipeFromPipeStorage", .opcode = 324, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetKernelLocalSizeForSubgroupCount", .opcode = 325, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGetKernelMaxNumSubgroups", .opcode = 326, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeNamedBarrier", .opcode = 327, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpNamedBarrierInitialize", .opcode = 328, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpMemoryNamedBarrier", .opcode = 329, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpModuleProcessed", .opcode = 330, - .operands = &[_]Operand{ - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpExecutionModeId", .opcode = 331, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ExecutionMode, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .execution_mode, .quantifier = .required }, }, }, .{ .name = "OpDecorateId", .opcode = 332, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .decoration, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformElect", .opcode = 333, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformAll", .opcode = 334, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformAny", .opcode = 335, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformAllEqual", .opcode = 336, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBroadcast", .opcode = 337, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBroadcastFirst", .opcode = 338, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBallot", .opcode = 339, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformInverseBallot", .opcode = 340, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBallotBitExtract", .opcode = 341, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBallotBitCount", .opcode = 342, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBallotFindLSB", .opcode = 343, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformBallotFindMSB", .opcode = 344, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformShuffle", .opcode = 345, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformShuffleXor", .opcode = 346, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformShuffleUp", .opcode = 347, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformShuffleDown", .opcode = 348, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformIAdd", .opcode = 349, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformFAdd", .opcode = 350, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformIMul", .opcode = 351, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformFMul", .opcode = 352, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformSMin", .opcode = 353, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformUMin", .opcode = 354, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformFMin", .opcode = 355, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformSMax", .opcode = 356, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformUMax", .opcode = 357, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformFMax", .opcode = 358, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformBitwiseAnd", .opcode = 359, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformBitwiseOr", .opcode = 360, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformBitwiseXor", .opcode = 361, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformLogicalAnd", .opcode = 362, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformLogicalOr", .opcode = 363, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformLogicalXor", .opcode = 364, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpGroupNonUniformQuadBroadcast", .opcode = 365, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformQuadSwap", .opcode = 366, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCopyLogical", .opcode = 400, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpPtrEqual", .opcode = 401, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpPtrNotEqual", .opcode = 402, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpPtrDiff", .opcode = 403, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpColorAttachmentReadEXT", .opcode = 4160, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpDepthAttachmentReadEXT", .opcode = 4161, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpStencilAttachmentReadEXT", .opcode = 4162, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "OpTypeTensorARM", + .opcode = 4163, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "OpTensorReadARM", + .opcode = 4164, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .tensor_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpTensorWriteARM", + .opcode = 4165, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .tensor_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpTensorQuerySizeARM", + .opcode = 4166, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpGraphConstantARM", + .opcode = 4181, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "OpGraphEntryPointARM", + .opcode = 4182, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpGraphARM", + .opcode = 4183, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + }, + }, + .{ + .name = "OpGraphInputARM", + .opcode = 4184, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpGraphSetOutputARM", + .opcode = 4185, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpGraphEndARM", + .opcode = 4186, + .operands = &.{}, + }, + .{ + .name = "OpTypeGraphARM", + .opcode = 4190, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpTerminateInvocation", .opcode = 4416, - .operands = &[_]Operand{}, + .operands = &.{}, + }, + .{ + .name = "OpTypeUntypedPointerKHR", + .opcode = 4417, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, + }, + }, + .{ + .name = "OpUntypedVariableKHR", + .opcode = 4418, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "OpUntypedAccessChainKHR", + .opcode = 4419, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpUntypedInBoundsAccessChainKHR", + .opcode = 4420, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, }, .{ .name = "OpSubgroupBallotKHR", .opcode = 4421, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupFirstInvocationKHR", .opcode = 4422, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpUntypedPtrAccessChainKHR", + .opcode = 4423, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpUntypedInBoundsPtrAccessChainKHR", + .opcode = 4424, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpUntypedArrayLengthKHR", + .opcode = 4425, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "OpUntypedPrefetchKHR", + .opcode = 4426, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpSubgroupAllKHR", .opcode = 4428, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAnyKHR", .opcode = 4429, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAllEqualKHR", .opcode = 4430, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformRotateKHR", .opcode = 4431, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpSubgroupReadInvocationKHR", .opcode = 4432, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpExtInstWithForwardRefsKHR", + .opcode = 4433, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_ext_inst_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpTraceRayKHR", .opcode = 4445, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpExecuteCallableKHR", .opcode = 4446, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertUToAccelerationStructureKHR", .opcode = 4447, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIgnoreIntersectionKHR", .opcode = 4448, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpTerminateRayKHR", .opcode = 4449, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpSDot", .opcode = 4450, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, - }, - }, - .{ - .name = "OpSDotKHR", - .opcode = 4450, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .packed_vector_format, .quantifier = .optional }, }, }, .{ .name = "OpUDot", .opcode = 4451, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, - }, - }, - .{ - .name = "OpUDotKHR", - .opcode = 4451, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .packed_vector_format, .quantifier = .optional }, }, }, .{ .name = "OpSUDot", .opcode = 4452, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, - }, - }, - .{ - .name = "OpSUDotKHR", - .opcode = 4452, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .packed_vector_format, .quantifier = .optional }, }, }, .{ .name = "OpSDotAccSat", .opcode = 4453, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, - }, - }, - .{ - .name = "OpSDotAccSatKHR", - .opcode = 4453, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .packed_vector_format, .quantifier = .optional }, }, }, .{ .name = "OpUDotAccSat", .opcode = 4454, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, - }, - }, - .{ - .name = "OpUDotAccSatKHR", - .opcode = 4454, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .packed_vector_format, .quantifier = .optional }, }, }, .{ .name = "OpSUDotAccSat", .opcode = 4455, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, - }, - }, - .{ - .name = "OpSUDotAccSatKHR", - .opcode = 4455, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PackedVectorFormat, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .packed_vector_format, .quantifier = .optional }, }, }, .{ .name = "OpTypeCooperativeMatrixKHR", .opcode = 4456, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCooperativeMatrixLoadKHR", .opcode = 4457, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpCooperativeMatrixStoreKHR", .opcode = 4458, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpCooperativeMatrixMulAddKHR", .opcode = 4459, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .CooperativeMatrixOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .cooperative_matrix_operands, .quantifier = .optional }, }, }, .{ .name = "OpCooperativeMatrixLengthKHR", .opcode = 4460, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpConstantCompositeReplicateEXT", + .opcode = 4461, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpSpecConstantCompositeReplicateEXT", + .opcode = 4462, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpCompositeConstructReplicateEXT", + .opcode = 4463, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeRayQueryKHR", .opcode = 4472, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpRayQueryInitializeKHR", .opcode = 4473, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryTerminateKHR", .opcode = 4474, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGenerateIntersectionKHR", .opcode = 4475, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryConfirmIntersectionKHR", .opcode = 4476, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryProceedKHR", .opcode = 4477, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionTypeKHR", .opcode = 4479, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageSampleWeightedQCOM", .opcode = 4480, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBoxFilterQCOM", .opcode = 4481, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBlockMatchSSDQCOM", .opcode = 4482, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBlockMatchSADQCOM", .opcode = 4483, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBlockMatchWindowSSDQCOM", .opcode = 4500, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBlockMatchWindowSADQCOM", .opcode = 4501, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBlockMatchGatherSSDQCOM", .opcode = 4502, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpImageBlockMatchGatherSADQCOM", .opcode = 4503, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupIAddNonUniformAMD", .opcode = 5000, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFAddNonUniformAMD", .opcode = 5001, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFMinNonUniformAMD", .opcode = 5002, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupUMinNonUniformAMD", .opcode = 5003, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupSMinNonUniformAMD", .opcode = 5004, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFMaxNonUniformAMD", .opcode = 5005, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupUMaxNonUniformAMD", .opcode = 5006, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupSMaxNonUniformAMD", .opcode = 5007, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFragmentMaskFetchAMD", .opcode = 5011, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFragmentFetchAMD", .opcode = 5012, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReadClockKHR", .opcode = 5056, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, }, }, .{ - .name = "OpFinalizeNodePayloadsAMDX", + .name = "OpAllocateNodePayloadsAMDX", + .opcode = 5074, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpEnqueueNodePayloadsAMDX", .opcode = 5075, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpTypeNodePayloadArrayAMDX", + .opcode = 5076, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFinishWritingNodePayloadAMDX", .opcode = 5078, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ - .name = "OpInitializeNodePayloadsAMDX", + .name = "OpNodePayloadArrayLengthAMDX", .opcode = 5090, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpIsNodePayloadValidAMDX", + .opcode = 5101, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpConstantStringAMDX", + .opcode = 5103, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, + }, + }, + .{ + .name = "OpSpecConstantStringAMDX", + .opcode = 5104, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformQuadAllKHR", .opcode = 5110, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformQuadAnyKHR", .opcode = 5111, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordHitMotionNV", .opcode = 5249, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordHitWithIndexMotionNV", .opcode = 5250, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordMissMotionNV", .opcode = 5251, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetWorldToObjectNV", .opcode = 5252, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetObjectToWorldNV", .opcode = 5253, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetObjectRayDirectionNV", .opcode = 5254, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetObjectRayOriginNV", .opcode = 5255, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectTraceRayMotionNV", .opcode = 5256, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetShaderRecordBufferHandleNV", .opcode = 5257, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetShaderBindingTableRecordIndexNV", .opcode = 5258, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordEmptyNV", .opcode = 5259, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectTraceRayNV", .opcode = 5260, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordHitNV", .opcode = 5261, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordHitWithIndexNV", .opcode = 5262, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectRecordMissNV", .opcode = 5263, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectExecuteShaderNV", .opcode = 5264, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetCurrentTimeNV", .opcode = 5265, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetAttributesNV", .opcode = 5266, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetHitKindNV", .opcode = 5267, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetPrimitiveIndexNV", .opcode = 5268, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetGeometryIndexNV", .opcode = 5269, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetInstanceIdNV", .opcode = 5270, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetInstanceCustomIndexNV", .opcode = 5271, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetWorldRayDirectionNV", .opcode = 5272, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetWorldRayOriginNV", .opcode = 5273, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetRayTMaxNV", .opcode = 5274, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectGetRayTMinNV", .opcode = 5275, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectIsEmptyNV", .opcode = 5276, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectIsHitNV", .opcode = 5277, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpHitObjectIsMissNV", .opcode = 5278, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReorderThreadWithHitObjectNV", .opcode = 5279, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpReorderThreadWithHintNV", .opcode = 5280, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeHitObjectNV", .opcode = 5281, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpImageSampleFootprintNV", .opcode = 5283, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .ImageOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .image_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpTypeCooperativeVectorNV", + .opcode = 5288, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpCooperativeVectorMatrixMulNV", + .opcode = 5289, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .cooperative_matrix_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpCooperativeVectorOuterProductAccumulateNV", + .opcode = 5290, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "OpCooperativeVectorReduceSumAccumulateNV", + .opcode = 5291, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpCooperativeVectorMatrixMulAddNV", + .opcode = 5292, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .cooperative_matrix_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpCooperativeMatrixConvertNV", + .opcode = 5293, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpEmitMeshTasksEXT", .opcode = 5294, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpSetMeshOutputsEXT", .opcode = 5295, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupNonUniformPartitionNV", .opcode = 5296, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpWritePackedPrimitiveIndices4x8NV", .opcode = 5299, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFetchMicroTriangleVertexPositionNV", .opcode = 5300, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFetchMicroTriangleVertexBarycentricNV", .opcode = 5301, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ - .name = "OpReportIntersectionNV", - .opcode = 5334, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .name = "OpCooperativeVectorLoadNV", + .opcode = 5302, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, + }, + }, + .{ + .name = "OpCooperativeVectorStoreNV", + .opcode = 5303, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpReportIntersectionKHR", .opcode = 5334, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIgnoreIntersectionNV", .opcode = 5335, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpTerminateRayNV", .opcode = 5336, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpTraceNV", .opcode = 5337, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTraceMotionNV", .opcode = 5338, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTraceRayMotionNV", .opcode = 5339, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionTriangleVertexPositionsKHR", .opcode = 5340, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "OpTypeAccelerationStructureNV", - .opcode = 5341, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeAccelerationStructureKHR", .opcode = 5341, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpExecuteCallableNV", .opcode = 5344, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryGetClusterIdNV", + .opcode = 5345, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectGetClusterIdNV", + .opcode = 5346, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeCooperativeMatrixNV", .opcode = 5358, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCooperativeMatrixLoadNV", .opcode = 5359, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpCooperativeMatrixStoreNV", .opcode = 5360, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .MemoryAccess, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, }, }, .{ .name = "OpCooperativeMatrixMulAddNV", .opcode = 5361, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCooperativeMatrixLengthNV", .opcode = 5362, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpBeginInvocationInterlockEXT", .opcode = 5364, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpEndInvocationInterlockEXT", .opcode = 5365, - .operands = &[_]Operand{}, + .operands = &.{}, + }, + .{ + .name = "OpCooperativeMatrixReduceNV", + .opcode = 5366, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .cooperative_matrix_reduce, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpCooperativeMatrixLoadTensorNV", + .opcode = 5367, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .required }, + .{ .kind = .tensor_addressing_operands, .quantifier = .required }, + }, + }, + .{ + .name = "OpCooperativeMatrixStoreTensorNV", + .opcode = 5368, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .required }, + .{ .kind = .tensor_addressing_operands, .quantifier = .required }, + }, + }, + .{ + .name = "OpCooperativeMatrixPerElementOpNV", + .opcode = 5369, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpTypeTensorLayoutNV", + .opcode = 5370, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpTypeTensorViewNV", + .opcode = 5371, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpCreateTensorLayoutNV", + .opcode = 5372, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + }, + }, + .{ + .name = "OpTensorLayoutSetDimensionNV", + .opcode = 5373, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpTensorLayoutSetStrideNV", + .opcode = 5374, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpTensorLayoutSliceNV", + .opcode = 5375, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpTensorLayoutSetClampValueNV", + .opcode = 5376, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpCreateTensorViewNV", + .opcode = 5377, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + }, + }, + .{ + .name = "OpTensorViewSetDimensionNV", + .opcode = 5378, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpTensorViewSetStrideNV", + .opcode = 5379, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, }, .{ .name = "OpDemoteToHelperInvocation", .opcode = 5380, - .operands = &[_]Operand{}, - }, - .{ - .name = "OpDemoteToHelperInvocationEXT", - .opcode = 5380, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "OpIsHelperInvocationEXT", .opcode = 5381, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + }, + }, + .{ + .name = "OpTensorViewSetClipNV", + .opcode = 5382, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpTensorLayoutSetBlockSizeNV", + .opcode = 5384, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpCooperativeMatrixTransposeNV", + .opcode = 5390, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertUToImageNV", .opcode = 5391, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertUToSamplerNV", .opcode = 5392, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertImageToUNV", .opcode = 5393, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertSamplerToUNV", .opcode = 5394, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertUToSampledImageNV", .opcode = 5395, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertSampledImageToUNV", .opcode = 5396, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSamplerImageAddressingModeNV", .opcode = 5397, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpRawAccessChainNV", .opcode = 5398, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .RawAccessChainOperands, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .raw_access_chain_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpRayQueryGetIntersectionSpherePositionNV", + .opcode = 5427, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryGetIntersectionSphereRadiusNV", + .opcode = 5428, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryGetIntersectionLSSPositionsNV", + .opcode = 5429, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryGetIntersectionLSSRadiiNV", + .opcode = 5430, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryGetIntersectionLSSHitValueNV", + .opcode = 5431, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectGetSpherePositionNV", + .opcode = 5432, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectGetSphereRadiusNV", + .opcode = 5433, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectGetLSSPositionsNV", + .opcode = 5434, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectGetLSSRadiiNV", + .opcode = 5435, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectIsSphereHitNV", + .opcode = 5436, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpHitObjectIsLSSHitNV", + .opcode = 5437, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryIsSphereHitNV", + .opcode = 5438, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRayQueryIsLSSHitNV", + .opcode = 5439, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupShuffleINTEL", .opcode = 5571, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupShuffleDownINTEL", .opcode = 5572, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupShuffleUpINTEL", .opcode = 5573, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupShuffleXorINTEL", .opcode = 5574, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupBlockReadINTEL", .opcode = 5575, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupBlockWriteINTEL", .opcode = 5576, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupImageBlockReadINTEL", .opcode = 5577, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupImageBlockWriteINTEL", .opcode = 5578, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupImageMediaBlockReadINTEL", .opcode = 5580, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupImageMediaBlockWriteINTEL", .opcode = 5581, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUCountLeadingZerosINTEL", .opcode = 5585, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUCountTrailingZerosINTEL", .opcode = 5586, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAbsISubINTEL", .opcode = 5587, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAbsUSubINTEL", .opcode = 5588, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIAddSatINTEL", .opcode = 5589, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUAddSatINTEL", .opcode = 5590, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIAverageINTEL", .opcode = 5591, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUAverageINTEL", .opcode = 5592, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIAverageRoundedINTEL", .opcode = 5593, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUAverageRoundedINTEL", .opcode = 5594, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpISubSatINTEL", .opcode = 5595, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUSubSatINTEL", .opcode = 5596, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpIMul32x16INTEL", .opcode = 5597, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpUMul32x16INTEL", .opcode = 5598, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConstantFunctionPointerINTEL", .opcode = 5600, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFunctionPointerCallINTEL", .opcode = 5601, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpAsmTargetINTEL", .opcode = 5609, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpAsmINTEL", .opcode = 5610, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, + .{ .kind = .literal_string, .quantifier = .required }, }, }, .{ .name = "OpAsmCallINTEL", .opcode = 5611, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpAtomicFMinEXT", .opcode = 5614, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicFMaxEXT", .opcode = 5615, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAssumeTrueKHR", .opcode = 5630, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpExpectKHR", .opcode = 5631, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpDecorateString", .opcode = 5632, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, - }, - }, - .{ - .name = "OpDecorateStringGOOGLE", - .opcode = 5632, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .decoration, .quantifier = .required }, }, }, .{ .name = "OpMemberDecorateString", .opcode = 5633, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, - }, - }, - .{ - .name = "OpMemberDecorateStringGOOGLE", - .opcode = 5633, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .Decoration, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .decoration, .quantifier = .required }, }, }, .{ .name = "OpVmeImageINTEL", .opcode = 5699, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeVmeImageINTEL", .opcode = 5700, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcImePayloadINTEL", .opcode = 5701, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcRefPayloadINTEL", .opcode = 5702, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcSicPayloadINTEL", .opcode = 5703, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcMcePayloadINTEL", .opcode = 5704, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcMceResultINTEL", .opcode = 5705, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcImeResultINTEL", .opcode = 5706, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcImeResultSingleReferenceStreamoutINTEL", .opcode = 5707, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcImeResultDualReferenceStreamoutINTEL", .opcode = 5708, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcImeSingleReferenceStreaminINTEL", .opcode = 5709, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcImeDualReferenceStreaminINTEL", .opcode = 5710, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcRefResultINTEL", .opcode = 5711, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpTypeAvcSicResultINTEL", .opcode = 5712, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", .opcode = 5713, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", .opcode = 5714, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL", .opcode = 5715, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetInterShapePenaltyINTEL", .opcode = 5716, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", .opcode = 5717, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL", .opcode = 5718, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", .opcode = 5719, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", .opcode = 5720, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL", .opcode = 5721, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL", .opcode = 5722, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL", .opcode = 5723, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL", .opcode = 5724, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", .opcode = 5725, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL", .opcode = 5726, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL", .opcode = 5727, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetAcOnlyHaarINTEL", .opcode = 5728, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", .opcode = 5729, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", .opcode = 5730, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", .opcode = 5731, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceConvertToImePayloadINTEL", .opcode = 5732, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceConvertToImeResultINTEL", .opcode = 5733, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceConvertToRefPayloadINTEL", .opcode = 5734, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceConvertToRefResultINTEL", .opcode = 5735, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceConvertToSicPayloadINTEL", .opcode = 5736, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceConvertToSicResultINTEL", .opcode = 5737, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetMotionVectorsINTEL", .opcode = 5738, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterDistortionsINTEL", .opcode = 5739, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetBestInterDistortionsINTEL", .opcode = 5740, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterMajorShapeINTEL", .opcode = 5741, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterMinorShapeINTEL", .opcode = 5742, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterDirectionsINTEL", .opcode = 5743, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterMotionVectorCountINTEL", .opcode = 5744, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterReferenceIdsINTEL", .opcode = 5745, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", .opcode = 5746, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeInitializeINTEL", .opcode = 5747, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeSetSingleReferenceINTEL", .opcode = 5748, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeSetDualReferenceINTEL", .opcode = 5749, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeRefWindowSizeINTEL", .opcode = 5750, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeAdjustRefOffsetINTEL", .opcode = 5751, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeConvertToMcePayloadINTEL", .opcode = 5752, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL", .opcode = 5753, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL", .opcode = 5754, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", .opcode = 5755, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeSetWeightedSadINTEL", .opcode = 5756, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL", .opcode = 5757, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL", .opcode = 5758, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", .opcode = 5759, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", .opcode = 5760, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", .opcode = 5761, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", .opcode = 5762, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", .opcode = 5763, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", .opcode = 5764, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeConvertToMceResultINTEL", .opcode = 5765, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL", .opcode = 5766, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetDualReferenceStreaminINTEL", .opcode = 5767, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL", .opcode = 5768, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL", .opcode = 5769, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", .opcode = 5770, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", .opcode = 5771, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", .opcode = 5772, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", .opcode = 5773, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", .opcode = 5774, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", .opcode = 5775, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetBorderReachedINTEL", .opcode = 5776, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL", .opcode = 5777, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", .opcode = 5778, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", .opcode = 5779, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", .opcode = 5780, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcFmeInitializeINTEL", .opcode = 5781, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcBmeInitializeINTEL", .opcode = 5782, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefConvertToMcePayloadINTEL", .opcode = 5783, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL", .opcode = 5784, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefSetBilinearFilterEnableINTEL", .opcode = 5785, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL", .opcode = 5786, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL", .opcode = 5787, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL", .opcode = 5788, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", .opcode = 5789, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcRefConvertToMceResultINTEL", .opcode = 5790, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicInitializeINTEL", .opcode = 5791, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicConfigureSkcINTEL", .opcode = 5792, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicConfigureIpeLumaINTEL", .opcode = 5793, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL", .opcode = 5794, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetMotionVectorMaskINTEL", .opcode = 5795, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicConvertToMcePayloadINTEL", .opcode = 5796, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL", .opcode = 5797, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", .opcode = 5798, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", .opcode = 5799, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicSetBilinearFilterEnableINTEL", .opcode = 5800, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL", .opcode = 5801, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL", .opcode = 5802, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicEvaluateIpeINTEL", .opcode = 5803, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL", .opcode = 5804, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL", .opcode = 5805, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL", .opcode = 5806, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", .opcode = 5807, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicConvertToMceResultINTEL", .opcode = 5808, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetIpeLumaShapeINTEL", .opcode = 5809, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL", .opcode = 5810, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL", .opcode = 5811, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL", .opcode = 5812, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetIpeChromaModeINTEL", .opcode = 5813, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", .opcode = 5814, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", .opcode = 5815, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSubgroupAvcSicGetInterRawSadsINTEL", .opcode = 5816, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpVariableLengthArrayINTEL", .opcode = 5818, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpSaveMemoryINTEL", .opcode = 5819, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, }, }, .{ .name = "OpRestoreMemoryINTEL", .opcode = 5820, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatSinCosPiINTEL", .opcode = 5840, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatCastINTEL", .opcode = 5841, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatCastFromIntINTEL", .opcode = 5842, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatCastToIntINTEL", .opcode = 5843, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatAddINTEL", .opcode = 5846, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatSubINTEL", .opcode = 5847, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatMulINTEL", .opcode = 5848, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatDivINTEL", .opcode = 5849, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatGTINTEL", .opcode = 5850, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatGEINTEL", .opcode = 5851, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatLTINTEL", .opcode = 5852, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatLEINTEL", .opcode = 5853, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatEQINTEL", .opcode = 5854, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatRecipINTEL", .opcode = 5855, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatRSqrtINTEL", .opcode = 5856, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatCbrtINTEL", .opcode = 5857, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatHypotINTEL", .opcode = 5858, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatSqrtINTEL", .opcode = 5859, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatLogINTEL", .opcode = 5860, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatLog2INTEL", .opcode = 5861, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatLog10INTEL", .opcode = 5862, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatLog1pINTEL", .opcode = 5863, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatExpINTEL", .opcode = 5864, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatExp2INTEL", .opcode = 5865, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatExp10INTEL", .opcode = 5866, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatExpm1INTEL", .opcode = 5867, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatSinINTEL", .opcode = 5868, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatCosINTEL", .opcode = 5869, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatSinCosINTEL", .opcode = 5870, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatSinPiINTEL", .opcode = 5871, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatCosPiINTEL", .opcode = 5872, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatASinINTEL", .opcode = 5873, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatASinPiINTEL", .opcode = 5874, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatACosINTEL", .opcode = 5875, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatACosPiINTEL", .opcode = 5876, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatATanINTEL", .opcode = 5877, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatATanPiINTEL", .opcode = 5878, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatATan2INTEL", .opcode = 5879, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatPowINTEL", .opcode = 5880, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatPowRINTEL", .opcode = 5881, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpArbitraryFloatPowNINTEL", .opcode = 5882, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpLoopControlINTEL", .opcode = 5887, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .literal_integer, .quantifier = .variadic }, }, }, .{ .name = "OpAliasDomainDeclINTEL", .opcode = 5911, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpAliasScopeDeclINTEL", .opcode = 5912, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "OpAliasScopeListDeclINTEL", .opcode = 5913, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpFixedSqrtINTEL", .opcode = 5923, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedRecipINTEL", .opcode = 5924, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedRsqrtINTEL", .opcode = 5925, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedSinINTEL", .opcode = 5926, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedCosINTEL", .opcode = 5927, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedSinCosINTEL", .opcode = 5928, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedSinPiINTEL", .opcode = 5929, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedCosPiINTEL", .opcode = 5930, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedSinCosPiINTEL", .opcode = 5931, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedLogINTEL", .opcode = 5932, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpFixedExpINTEL", .opcode = 5933, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "OpPtrCastToCrossWorkgroupINTEL", .opcode = 5934, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpCrossWorkgroupCastToPtrINTEL", .opcode = 5938, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpReadPipeBlockingINTEL", .opcode = 5946, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpWritePipeBlockingINTEL", .opcode = 5947, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpFPGARegINTEL", .opcode = 5949, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetRayTMinKHR", .opcode = 6016, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetRayFlagsKHR", .opcode = 6017, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionTKHR", .opcode = 6018, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionInstanceCustomIndexKHR", .opcode = 6019, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionInstanceIdKHR", .opcode = 6020, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", .opcode = 6021, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionGeometryIndexKHR", .opcode = 6022, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionPrimitiveIndexKHR", .opcode = 6023, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionBarycentricsKHR", .opcode = 6024, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionFrontFaceKHR", .opcode = 6025, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR", .opcode = 6026, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionObjectRayDirectionKHR", .opcode = 6027, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionObjectRayOriginKHR", .opcode = 6028, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetWorldRayDirectionKHR", .opcode = 6029, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetWorldRayOriginKHR", .opcode = 6030, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionObjectToWorldKHR", .opcode = 6031, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpRayQueryGetIntersectionWorldToObjectKHR", .opcode = 6032, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpAtomicFAddEXT", .opcode = 6035, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpTypeBufferSurfaceINTEL", .opcode = 6086, - .operands = &[_]Operand{ - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .AccessQualifier, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .access_qualifier, .quantifier = .required }, }, }, .{ .name = "OpTypeStructContinuedINTEL", .opcode = 6090, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpConstantCompositeContinuedINTEL", .opcode = 6091, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpSpecConstantCompositeContinuedINTEL", .opcode = 6092, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpCompositeConstructContinuedINTEL", .opcode = 6096, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "OpConvertFToBF16INTEL", .opcode = 6116, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpConvertBF16ToFINTEL", .opcode = 6117, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpControlBarrierArriveINTEL", .opcode = 6142, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, }, }, .{ .name = "OpControlBarrierWaitINTEL", .opcode = 6143, - .operands = &[_]Operand{ - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .IdMemorySemantics, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .id_memory_semantics, .quantifier = .required }, + }, + }, + .{ + .name = "OpArithmeticFenceEXT", + .opcode = 6145, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpTaskSequenceCreateINTEL", + .opcode = 6163, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "OpTaskSequenceAsyncINTEL", + .opcode = 6164, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "OpTaskSequenceGetINTEL", + .opcode = 6165, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpTaskSequenceReleaseINTEL", + .opcode = 6166, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpTypeTaskSequenceINTEL", + .opcode = 6199, + .operands = &.{ + .{ .kind = .id_result, .quantifier = .required }, + }, + }, + .{ + .name = "OpSubgroupBlockPrefetchINTEL", + .opcode = 6221, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .memory_access, .quantifier = .optional }, + }, + }, + .{ + .name = "OpSubgroup2DBlockLoadINTEL", + .opcode = 6231, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpSubgroup2DBlockLoadTransformINTEL", + .opcode = 6232, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpSubgroup2DBlockLoadTransposeINTEL", + .opcode = 6233, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpSubgroup2DBlockPrefetchINTEL", + .opcode = 6234, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpSubgroup2DBlockStoreINTEL", + .opcode = 6235, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpSubgroupMatrixMultiplyAccumulateINTEL", + .opcode = 6237, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .matrix_multiply_accumulate_operands, .quantifier = .optional }, + }, + }, + .{ + .name = "OpBitwiseFunctionINTEL", + .opcode = 6242, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupIMulKHR", .opcode = 6401, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupFMulKHR", .opcode = 6402, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupBitwiseAndKHR", .opcode = 6403, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupBitwiseOrKHR", .opcode = 6404, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupBitwiseXorKHR", .opcode = 6405, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupLogicalAndKHR", .opcode = 6406, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupLogicalOrKHR", .opcode = 6407, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpGroupLogicalXorKHR", .opcode = 6408, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdScope, .quantifier = .required }, - .{ .kind = .GroupOperation, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_scope, .quantifier = .required }, + .{ .kind = .group_operation, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpRoundFToTF32INTEL", + .opcode = 6426, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpMaskedGatherINTEL", .opcode = 6428, - .operands = &[_]Operand{ - .{ .kind = .IdResultType, .quantifier = .required }, - .{ .kind = .IdResult, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "OpMaskedScatterINTEL", .opcode = 6429, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpConvertHandleToImageINTEL", + .opcode = 6529, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpConvertHandleToSamplerINTEL", + .opcode = 6530, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "OpConvertHandleToSampledImageINTEL", + .opcode = 6531, + .operands = &.{ + .{ .kind = .id_result_type, .quantifier = .required }, + .{ .kind = .id_result, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, }, - .@"OpenCL.std" => &[_]Instruction{ - .{ - .name = "acos", - .opcode = 0, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "acosh", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "acospi", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "asin", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "asinh", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "asinpi", - .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "atan", - .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "atan2", - .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "atanh", - .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "atanpi", - .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "atan2pi", - .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "cbrt", - .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ceil", - .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "copysign", - .opcode = 13, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "cos", - .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "cosh", - .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "cospi", - .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "erfc", - .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "erf", - .opcode = 18, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "exp", - .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "exp2", - .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "exp10", - .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "expm1", - .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fabs", - .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fdim", - .opcode = 24, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "floor", - .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fma", - .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fmax", - .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fmin", - .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fmod", - .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fract", - .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "frexp", - .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "hypot", - .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ilogb", - .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ldexp", - .opcode = 34, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "lgamma", - .opcode = 35, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "lgamma_r", - .opcode = 36, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "log", - .opcode = 37, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "log2", - .opcode = 38, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "log10", - .opcode = 39, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "log1p", - .opcode = 40, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "logb", - .opcode = 41, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "mad", - .opcode = 42, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "maxmag", - .opcode = 43, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "minmag", - .opcode = 44, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "modf", - .opcode = 45, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "nan", - .opcode = 46, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "nextafter", - .opcode = 47, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "pow", - .opcode = 48, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "pown", - .opcode = 49, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "powr", - .opcode = 50, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "remainder", - .opcode = 51, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "remquo", - .opcode = 52, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "rint", - .opcode = 53, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "rootn", - .opcode = 54, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "round", - .opcode = 55, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "rsqrt", - .opcode = 56, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "sin", - .opcode = 57, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "sincos", - .opcode = 58, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "sinh", - .opcode = 59, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "sinpi", - .opcode = 60, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "sqrt", - .opcode = 61, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "tan", - .opcode = 62, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "tanh", - .opcode = 63, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "tanpi", - .opcode = 64, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "tgamma", - .opcode = 65, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "trunc", - .opcode = 66, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_cos", - .opcode = 67, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_divide", - .opcode = 68, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_exp", - .opcode = 69, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_exp2", - .opcode = 70, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_exp10", - .opcode = 71, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_log", - .opcode = 72, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_log2", - .opcode = 73, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_log10", - .opcode = 74, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_powr", - .opcode = 75, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_recip", - .opcode = 76, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_rsqrt", - .opcode = 77, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_sin", - .opcode = 78, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_sqrt", - .opcode = 79, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "half_tan", - .opcode = 80, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_cos", - .opcode = 81, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_divide", - .opcode = 82, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_exp", - .opcode = 83, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_exp2", - .opcode = 84, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_exp10", - .opcode = 85, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_log", - .opcode = 86, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_log2", - .opcode = 87, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_log10", - .opcode = 88, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_powr", - .opcode = 89, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_recip", - .opcode = 90, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_rsqrt", - .opcode = 91, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_sin", - .opcode = 92, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_sqrt", - .opcode = 93, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "native_tan", - .opcode = 94, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fclamp", - .opcode = 95, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "degrees", - .opcode = 96, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fmax_common", - .opcode = 97, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fmin_common", - .opcode = 98, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "mix", - .opcode = 99, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "radians", - .opcode = 100, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "step", - .opcode = 101, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "smoothstep", - .opcode = 102, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "sign", - .opcode = 103, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "cross", - .opcode = 104, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "distance", - .opcode = 105, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "length", - .opcode = 106, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "normalize", - .opcode = 107, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fast_distance", - .opcode = 108, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fast_length", - .opcode = 109, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "fast_normalize", - .opcode = 110, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_abs", - .opcode = 141, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_abs_diff", - .opcode = 142, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_add_sat", - .opcode = 143, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_add_sat", - .opcode = 144, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_hadd", - .opcode = 145, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_hadd", - .opcode = 146, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_rhadd", - .opcode = 147, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_rhadd", - .opcode = 148, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_clamp", - .opcode = 149, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_clamp", - .opcode = 150, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "clz", - .opcode = 151, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ctz", - .opcode = 152, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_mad_hi", - .opcode = 153, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_mad_sat", - .opcode = 154, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_mad_sat", - .opcode = 155, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_max", - .opcode = 156, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_max", - .opcode = 157, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_min", - .opcode = 158, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_min", - .opcode = 159, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_mul_hi", - .opcode = 160, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "rotate", - .opcode = 161, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_sub_sat", - .opcode = 162, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_sub_sat", - .opcode = 163, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_upsample", - .opcode = 164, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_upsample", - .opcode = 165, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "popcount", - .opcode = 166, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_mad24", - .opcode = 167, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_mad24", - .opcode = 168, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "s_mul24", - .opcode = 169, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_mul24", - .opcode = 170, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "vloadn", - .opcode = 171, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "vstoren", - .opcode = 172, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "vload_half", - .opcode = 173, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "vload_halfn", - .opcode = 174, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "vstore_half", - .opcode = 175, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "vstore_half_r", - .opcode = 176, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .FPRoundingMode, .quantifier = .required }, - }, - }, - .{ - .name = "vstore_halfn", - .opcode = 177, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "vstore_halfn_r", - .opcode = 178, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .FPRoundingMode, .quantifier = .required }, - }, - }, - .{ - .name = "vloada_halfn", - .opcode = 179, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "vstorea_halfn", - .opcode = 180, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "vstorea_halfn_r", - .opcode = 181, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .FPRoundingMode, .quantifier = .required }, - }, - }, - .{ - .name = "shuffle", - .opcode = 182, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "shuffle2", - .opcode = 183, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "printf", - .opcode = 184, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "prefetch", - .opcode = 185, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "bitselect", - .opcode = 186, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "select", - .opcode = 187, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_abs", - .opcode = 201, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_abs_diff", - .opcode = 202, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_mul_hi", - .opcode = 203, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "u_mad_hi", - .opcode = 204, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - }, - .@"GLSL.std.450" => &[_]Instruction{ - .{ - .name = "Round", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "RoundEven", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Trunc", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FAbs", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SAbs", - .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FSign", - .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SSign", - .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Floor", - .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Ceil", - .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Fract", - .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Radians", - .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Degrees", - .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Sin", - .opcode = 13, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Cos", - .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Tan", - .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Asin", - .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Acos", - .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Atan", - .opcode = 18, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Sinh", - .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Cosh", - .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Tanh", - .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Asinh", - .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Acosh", - .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Atanh", - .opcode = 24, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Atan2", - .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Pow", - .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Exp", - .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Log", - .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Exp2", - .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Log2", - .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Sqrt", - .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "InverseSqrt", - .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Determinant", - .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "MatrixInverse", - .opcode = 34, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Modf", - .opcode = 35, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ModfStruct", - .opcode = 36, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FMin", - .opcode = 37, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UMin", - .opcode = 38, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SMin", - .opcode = 39, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FMax", - .opcode = 40, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UMax", - .opcode = 41, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SMax", - .opcode = 42, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FClamp", - .opcode = 43, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UClamp", - .opcode = 44, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SClamp", - .opcode = 45, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FMix", - .opcode = 46, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "IMix", - .opcode = 47, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Step", - .opcode = 48, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SmoothStep", - .opcode = 49, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Fma", - .opcode = 50, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Frexp", - .opcode = 51, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FrexpStruct", - .opcode = 52, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Ldexp", - .opcode = 53, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PackSnorm4x8", - .opcode = 54, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PackUnorm4x8", - .opcode = 55, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PackSnorm2x16", - .opcode = 56, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PackUnorm2x16", - .opcode = 57, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PackHalf2x16", - .opcode = 58, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PackDouble2x32", - .opcode = 59, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UnpackSnorm2x16", - .opcode = 60, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UnpackUnorm2x16", - .opcode = 61, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UnpackHalf2x16", - .opcode = 62, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UnpackSnorm4x8", - .opcode = 63, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UnpackUnorm4x8", - .opcode = 64, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "UnpackDouble2x32", - .opcode = 65, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Length", - .opcode = 66, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Distance", - .opcode = 67, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Cross", - .opcode = 68, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Normalize", - .opcode = 69, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FaceForward", - .opcode = 70, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Reflect", - .opcode = 71, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "Refract", - .opcode = 72, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FindILsb", - .opcode = 73, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FindSMsb", - .opcode = 74, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "FindUMsb", - .opcode = 75, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "InterpolateAtCentroid", - .opcode = 76, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "InterpolateAtSample", - .opcode = 77, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "InterpolateAtOffset", - .opcode = 78, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "NMin", - .opcode = 79, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "NMax", - .opcode = 80, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "NClamp", - .opcode = 81, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - }, - .@"OpenCL.DebugInfo.100" => &[_]Instruction{ - .{ - .name = "DebugInfoNone", - .opcode = 0, - .operands = &[_]Operand{}, - }, - .{ - .name = "DebugCompilationUnit", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .SourceLanguage, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeBasic", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugBaseTypeAttributeEncoding", .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypePointer", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .StorageClass, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeQualifier", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugTypeQualifier", .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeArray", - .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeVector", - .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypedef", - .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeFunction", - .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeEnum", - .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .PairIdRefIdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeComposite", - .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugCompositeType", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeMember", - .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugTypeInheritance", - .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypePtrToMember", - .opcode = 13, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeTemplate", - .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeTemplateParameter", - .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeTemplateTemplateParameter", - .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeTemplateParameterPack", - .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugGlobalVariable", - .opcode = 18, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugFunctionDeclaration", - .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - }, - }, - .{ - .name = "DebugFunction", - .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugLexicalBlock", - .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugLexicalBlockDiscriminator", - .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugScope", - .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugNoScope", - .opcode = 24, - .operands = &[_]Operand{}, - }, - .{ - .name = "DebugInlinedAt", - .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugLocalVariable", - .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugInlinedVariable", - .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugDeclare", - .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugValue", - .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugOperation", - .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .@"OpenCL.DebugInfo.100.DebugOperation", .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugExpression", - .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugMacroDef", - .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugMacroUndef", - .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugImportedEntity", - .opcode = 34, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"OpenCL.DebugInfo.100.DebugImportedEntity", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugSource", - .opcode = 35, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugModuleINTEL", - .opcode = 36, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - }, - .SPV_AMD_shader_ballot => &[_]Instruction{ - .{ - .name = "SwizzleInvocationsAMD", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SwizzleInvocationsMaskedAMD", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "WriteInvocationAMD", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "MbcntAMD", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - }, - .@"NonSemantic.Shader.DebugInfo.100" => &[_]Instruction{ - .{ - .name = "DebugInfoNone", - .opcode = 0, - .operands = &[_]Operand{}, - }, - .{ - .name = "DebugCompilationUnit", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeBasic", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypePointer", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeQualifier", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeArray", - .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeVector", - .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypedef", - .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeFunction", - .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeEnum", - .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .PairIdRefIdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeComposite", - .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeMember", - .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugTypeInheritance", - .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypePtrToMember", - .opcode = 13, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeTemplate", - .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugTypeTemplateParameter", - .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeTemplateTemplateParameter", - .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeTemplateParameterPack", - .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugGlobalVariable", - .opcode = 18, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugFunctionDeclaration", - .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugFunction", - .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugLexicalBlock", - .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugLexicalBlockDiscriminator", - .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugScope", - .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugNoScope", - .opcode = 24, - .operands = &[_]Operand{}, - }, - .{ - .name = "DebugInlinedAt", - .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugLocalVariable", - .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugInlinedVariable", - .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugDeclare", - .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugValue", - .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugOperation", - .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugExpression", - .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "DebugMacroDef", - .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugMacroUndef", - .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugImportedEntity", - .opcode = 34, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugSource", - .opcode = 35, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "DebugFunctionDefinition", - .opcode = 101, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugSourceContinued", - .opcode = 102, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugLine", - .opcode = 103, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugNoLine", - .opcode = 104, - .operands = &[_]Operand{}, - }, - .{ - .name = "DebugBuildIdentifier", - .opcode = 105, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugStoragePath", - .opcode = 106, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugEntryPoint", - .opcode = 107, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "DebugTypeMatrix", - .opcode = 108, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - }, - .@"NonSemantic.VkspReflection" => &[_]Instruction{ - .{ - .name = "Configuration", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "StartCounter", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .LiteralString, .quantifier = .required }, - }, - }, - .{ - .name = "StopCounter", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstants", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralString, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "SpecializationMapEntry", - .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "DescriptorSetBuffer", - .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "DescriptorSetImage", - .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - .{ - .name = "DescriptorSetSampler", - .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralFloat, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralFloat, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralFloat, .quantifier = .required }, - .{ .kind = .LiteralFloat, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - }, - }, - }, - .@"NonSemantic.ClspvReflection.6" => &[_]Instruction{ - .{ - .name = "Kernel", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentInfo", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .IdRef, .quantifier = .optional }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentStorageBuffer", - .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentUniform", - .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentPodStorageBuffer", - .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentPodUniform", - .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentPodPushConstant", - .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentSampledImage", - .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentStorageImage", - .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentSampler", - .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentWorkgroup", - .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "SpecConstantWorkgroupSize", - .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SpecConstantGlobalOffset", - .opcode = 13, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SpecConstantWorkDim", - .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstantGlobalOffset", - .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstantEnqueuedLocalSize", - .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstantGlobalSize", - .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstantRegionOffset", - .opcode = 18, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstantNumWorkgroups", - .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PushConstantRegionGroupOffset", - .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ConstantDataStorageBuffer", - .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ConstantDataUniform", - .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "LiteralSampler", - .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PropertyRequiredWorkgroupSize", - .opcode = 24, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "SpecConstantSubgroupMaxSize", - .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ArgumentPointerPushConstant", - .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentPointerUniform", - .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ProgramScopeVariablesStorageBuffer", - .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ProgramScopeVariablePointerRelocation", - .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ImageArgumentInfoChannelOrderPushConstant", - .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ImageArgumentInfoChannelDataTypePushConstant", - .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ImageArgumentInfoChannelOrderUniform", - .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ImageArgumentInfoChannelDataTypeUniform", - .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ArgumentStorageTexelBuffer", - .opcode = 34, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ArgumentUniformTexelBuffer", - .opcode = 35, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, - }, - }, - .{ - .name = "ConstantDataPointerPushConstant", - .opcode = 36, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "ProgramScopeVariablePointerPushConstant", - .opcode = 37, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PrintfInfo", - .opcode = 38, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - .{ - .name = "PrintfBufferStorageBuffer", - .opcode = 39, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "PrintfBufferPointerPushConstant", - .opcode = 40, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "NormalizedSamplerMaskPushConstant", - .opcode = 41, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - }, - .SPV_AMD_gcn_shader => &[_]Instruction{ - .{ - .name = "CubeFaceIndexAMD", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "CubeFaceCoordAMD", - .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - .{ - .name = "TimeAMD", - .opcode = 3, - .operands = &[_]Operand{}, - }, - }, - .SPV_AMD_shader_trinary_minmax => &[_]Instruction{ + .spv_amd_shader_trinary_minmax => &.{ .{ .name = "FMin3AMD", .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "UMin3AMD", .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "SMin3AMD", .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "FMax3AMD", .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "UMax3AMD", .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "SMax3AMD", .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "FMid3AMD", .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "UMid3AMD", .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "SMid3AMD", .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, }, - .DebugInfo => &[_]Instruction{ + .spv_ext_inst_type_tosa_001000_1 => &.{ + .{ + .name = "ARGMAX", + .opcode = 0, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "AVG_POOL2D", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CONV2D", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CONV3D", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DEPTHWISE_CONV2D", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FFT2D", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MATMUL", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MAX_POOL2D", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RFFT2D", + .opcode = 8, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "TRANSPOSE_CONV2D", + .opcode = 9, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CLAMP", + .opcode = 10, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ERF", + .opcode = 11, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SIGMOID", + .opcode = 12, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "TANH", + .opcode = 13, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ADD", + .opcode = 14, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ARITHMETIC_RIGHT_SHIFT", + .opcode = 15, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "BITWISE_AND", + .opcode = 16, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "BITWISE_OR", + .opcode = 17, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "BITWISE_XOR", + .opcode = 18, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "INTDIV", + .opcode = 19, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOGICAL_AND", + .opcode = 20, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOGICAL_LEFT_SHIFT", + .opcode = 21, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOGICAL_RIGHT_SHIFT", + .opcode = 22, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOGICAL_OR", + .opcode = 23, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOGICAL_XOR", + .opcode = 24, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MAXIMUM", + .opcode = 25, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MINIMUM", + .opcode = 26, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MUL", + .opcode = 27, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "POW", + .opcode = 28, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SUB", + .opcode = 29, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "TABLE", + .opcode = 30, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ABS", + .opcode = 31, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "BITWISE_NOT", + .opcode = 32, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CEIL", + .opcode = 33, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CLZ", + .opcode = 34, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "COS", + .opcode = 35, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "EXP", + .opcode = 36, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FLOOR", + .opcode = 37, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOG", + .opcode = 38, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LOGICAL_NOT", + .opcode = 39, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "NEGATE", + .opcode = 40, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RECIPROCAL", + .opcode = 41, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RSQRT", + .opcode = 42, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SIN", + .opcode = 43, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SELECT", + .opcode = 44, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "EQUAL", + .opcode = 45, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "GREATER", + .opcode = 46, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "GREATER_EQUAL", + .opcode = 47, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REDUCE_ALL", + .opcode = 48, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REDUCE_ANY", + .opcode = 49, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REDUCE_MAX", + .opcode = 50, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REDUCE_MIN", + .opcode = 51, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REDUCE_PRODUCT", + .opcode = 52, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REDUCE_SUM", + .opcode = 53, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CONCAT", + .opcode = 54, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "PAD", + .opcode = 55, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RESHAPE", + .opcode = 56, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "REVERSE", + .opcode = 57, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SLICE", + .opcode = 58, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "TILE", + .opcode = 59, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "TRANSPOSE", + .opcode = 60, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "GATHER", + .opcode = 61, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SCATTER", + .opcode = 62, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RESIZE", + .opcode = 63, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CAST", + .opcode = 64, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RESCALE", + .opcode = 65, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .non_semantic_vksp_reflection => &.{ + .{ + .name = "Configuration", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "StartCounter", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "StopCounter", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstants", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SpecializationMapEntry", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DescriptorSetBuffer", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DescriptorSetImage", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DescriptorSetSampler", + .opcode = 8, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .spv_amd_shader_explicit_vertex_parameter => &.{ + .{ + .name = "InterpolateAtVertexAMD", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .debug_info => &.{ .{ .name = "DebugInfoNone", .opcode = 0, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "DebugCompilationUnit", .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "DebugTypeBasic", .opcode = 2, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugBaseTypeAttributeEncoding", .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_base_type_attribute_encoding, .quantifier = .required }, }, }, .{ .name = "DebugTypePointer", .opcode = 3, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .StorageClass, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, }, }, .{ .name = "DebugTypeQualifier", .opcode = 4, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugTypeQualifier", .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_type_qualifier, .quantifier = .required }, }, }, .{ .name = "DebugTypeArray", .opcode = 5, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugTypeVector", .opcode = 6, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "DebugTypedef", .opcode = 7, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "DebugTypeFunction", .opcode = 8, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugTypeEnum", .opcode = 9, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .PairIdRefIdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, + .{ .kind = .pair_id_ref_id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugTypeComposite", .opcode = 10, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugCompositeType", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_composite_type, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugTypeMember", .opcode = 11, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugTypeInheritance", .opcode = 12, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, }, }, .{ .name = "DebugTypePtrToMember", .opcode = 13, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "DebugTypeTemplate", .opcode = 14, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugTypeTemplateParameter", .opcode = 15, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "DebugTypeTemplateTemplateParameter", .opcode = 16, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, }, }, .{ .name = "DebugTypeTemplateParameterPack", .opcode = 17, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugGlobalVariable", .opcode = 18, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugFunctionDeclaration", .opcode = 19, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, }, }, .{ .name = "DebugFunction", .opcode = 20, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .@"DebugInfo.DebugInfoFlags", .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .debug_info_debug_info_flags, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugLexicalBlock", .opcode = 21, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugLexicalBlockDiscriminator", .opcode = 22, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "DebugScope", .opcode = 23, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugNoScope", .opcode = 24, - .operands = &[_]Operand{}, + .operands = &.{}, }, .{ .name = "DebugInlinedAt", .opcode = 25, - .operands = &[_]Operand{ - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugLocalVariable", .opcode = 26, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .optional }, }, }, .{ .name = "DebugInlinedVariable", .opcode = 27, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "DebugDeclare", .opcode = 28, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, .{ .name = "DebugValue", .opcode = 29, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugOperation", .opcode = 30, - .operands = &[_]Operand{ - .{ .kind = .@"DebugInfo.DebugOperation", .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .debug_info_debug_operation, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .variadic }, }, }, .{ .name = "DebugExpression", .opcode = 31, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .variadic }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .variadic }, }, }, .{ .name = "DebugMacroDef", .opcode = 32, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .optional }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, }, }, .{ .name = "DebugMacroUndef", .opcode = 33, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .LiteralInteger, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, }, }, }, - .@"NonSemantic.DebugPrintf" => &[_]Instruction{ - .{ - .name = "DebugPrintf", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .variadic }, - }, - }, - }, - .SPV_AMD_shader_explicit_vertex_parameter => &[_]Instruction{ - .{ - .name = "InterpolateAtVertexAMD", - .opcode = 1, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, - .{ .kind = .IdRef, .quantifier = .required }, - }, - }, - }, - .@"NonSemantic.DebugBreak" => &[_]Instruction{ + .non_semantic_debug_break => &.{ .{ .name = "DebugBreak", .opcode = 1, - .operands = &[_]Operand{}, + .operands = &.{}, }, }, - .zig => &[_]Instruction{ + .open_cl_debug_info_100 => &.{ + .{ + .name = "DebugInfoNone", + .opcode = 0, + .operands = &.{}, + }, + .{ + .name = "DebugCompilationUnit", + .opcode = 1, + .operands = &.{ + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .source_language, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeBasic", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_base_type_attribute_encoding, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypePointer", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .storage_class, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeQualifier", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_type_qualifier, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeArray", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeVector", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypedef", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeFunction", + .opcode = 8, + .operands = &.{ + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeEnum", + .opcode = 9, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .pair_id_ref_id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeComposite", + .opcode = 10, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_composite_type, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeMember", + .opcode = 11, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugTypeInheritance", + .opcode = 12, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypePtrToMember", + .opcode = 13, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeTemplate", + .opcode = 14, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeTemplateParameter", + .opcode = 15, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeTemplateTemplateParameter", + .opcode = 16, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeTemplateParameterPack", + .opcode = 17, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugGlobalVariable", + .opcode = 18, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugFunctionDeclaration", + .opcode = 19, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + }, + }, + .{ + .name = "DebugFunction", + .opcode = 20, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugLexicalBlock", + .opcode = 21, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugLexicalBlockDiscriminator", + .opcode = 22, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugScope", + .opcode = 23, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugNoScope", + .opcode = 24, + .operands = &.{}, + }, + .{ + .name = "DebugInlinedAt", + .opcode = 25, + .operands = &.{ + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugLocalVariable", + .opcode = 26, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_info_flags, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugInlinedVariable", + .opcode = 27, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugDeclare", + .opcode = 28, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugValue", + .opcode = 29, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugOperation", + .opcode = 30, + .operands = &.{ + .{ .kind = .open_cl_debug_info_100_debug_operation, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugExpression", + .opcode = 31, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugMacroDef", + .opcode = 32, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugMacroUndef", + .opcode = 33, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugImportedEntity", + .opcode = 34, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .open_cl_debug_info_100_debug_imported_entity, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugSource", + .opcode = 35, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugModuleINTEL", + .opcode = 36, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + }, + .non_semantic_clspv_reflection_6 => &.{ + .{ + .name = "Kernel", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentInfo", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentStorageBuffer", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentUniform", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentPodStorageBuffer", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentPodUniform", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentPodPushConstant", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentSampledImage", + .opcode = 8, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentStorageImage", + .opcode = 9, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentSampler", + .opcode = 10, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentWorkgroup", + .opcode = 11, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "SpecConstantWorkgroupSize", + .opcode = 12, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SpecConstantGlobalOffset", + .opcode = 13, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SpecConstantWorkDim", + .opcode = 14, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstantGlobalOffset", + .opcode = 15, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstantEnqueuedLocalSize", + .opcode = 16, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstantGlobalSize", + .opcode = 17, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstantRegionOffset", + .opcode = 18, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstantNumWorkgroups", + .opcode = 19, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PushConstantRegionGroupOffset", + .opcode = 20, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ConstantDataStorageBuffer", + .opcode = 21, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ConstantDataUniform", + .opcode = 22, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "LiteralSampler", + .opcode = 23, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PropertyRequiredWorkgroupSize", + .opcode = 24, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SpecConstantSubgroupMaxSize", + .opcode = 25, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ArgumentPointerPushConstant", + .opcode = 26, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentPointerUniform", + .opcode = 27, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ProgramScopeVariablesStorageBuffer", + .opcode = 28, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ProgramScopeVariablePointerRelocation", + .opcode = 29, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ImageArgumentInfoChannelOrderPushConstant", + .opcode = 30, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ImageArgumentInfoChannelDataTypePushConstant", + .opcode = 31, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ImageArgumentInfoChannelOrderUniform", + .opcode = 32, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ImageArgumentInfoChannelDataTypeUniform", + .opcode = 33, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ArgumentStorageTexelBuffer", + .opcode = 34, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ArgumentUniformTexelBuffer", + .opcode = 35, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "ConstantDataPointerPushConstant", + .opcode = 36, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ProgramScopeVariablePointerPushConstant", + .opcode = 37, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PrintfInfo", + .opcode = 38, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "PrintfBufferStorageBuffer", + .opcode = 39, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PrintfBufferPointerPushConstant", + .opcode = 40, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "NormalizedSamplerMaskPushConstant", + .opcode = 41, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "WorkgroupVariableSize", + .opcode = 42, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .glsl_std_450 => &.{ + .{ + .name = "Round", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "RoundEven", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Trunc", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FAbs", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SAbs", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FSign", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SSign", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Floor", + .opcode = 8, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Ceil", + .opcode = 9, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Fract", + .opcode = 10, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Radians", + .opcode = 11, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Degrees", + .opcode = 12, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Sin", + .opcode = 13, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Cos", + .opcode = 14, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Tan", + .opcode = 15, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Asin", + .opcode = 16, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Acos", + .opcode = 17, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Atan", + .opcode = 18, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Sinh", + .opcode = 19, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Cosh", + .opcode = 20, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Tanh", + .opcode = 21, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Asinh", + .opcode = 22, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Acosh", + .opcode = 23, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Atanh", + .opcode = 24, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Atan2", + .opcode = 25, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Pow", + .opcode = 26, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Exp", + .opcode = 27, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Log", + .opcode = 28, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Exp2", + .opcode = 29, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Log2", + .opcode = 30, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Sqrt", + .opcode = 31, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "InverseSqrt", + .opcode = 32, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Determinant", + .opcode = 33, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MatrixInverse", + .opcode = 34, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Modf", + .opcode = 35, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ModfStruct", + .opcode = 36, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FMin", + .opcode = 37, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UMin", + .opcode = 38, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SMin", + .opcode = 39, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FMax", + .opcode = 40, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UMax", + .opcode = 41, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SMax", + .opcode = 42, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FClamp", + .opcode = 43, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UClamp", + .opcode = 44, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SClamp", + .opcode = 45, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FMix", + .opcode = 46, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "IMix", + .opcode = 47, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Step", + .opcode = 48, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SmoothStep", + .opcode = 49, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Fma", + .opcode = 50, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Frexp", + .opcode = 51, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FrexpStruct", + .opcode = 52, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Ldexp", + .opcode = 53, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PackSnorm4x8", + .opcode = 54, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PackUnorm4x8", + .opcode = 55, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PackSnorm2x16", + .opcode = 56, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PackUnorm2x16", + .opcode = 57, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PackHalf2x16", + .opcode = 58, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "PackDouble2x32", + .opcode = 59, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UnpackSnorm2x16", + .opcode = 60, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UnpackUnorm2x16", + .opcode = 61, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UnpackHalf2x16", + .opcode = 62, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UnpackSnorm4x8", + .opcode = 63, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UnpackUnorm4x8", + .opcode = 64, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "UnpackDouble2x32", + .opcode = 65, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Length", + .opcode = 66, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Distance", + .opcode = 67, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Cross", + .opcode = 68, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Normalize", + .opcode = 69, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FaceForward", + .opcode = 70, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Reflect", + .opcode = 71, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "Refract", + .opcode = 72, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FindILsb", + .opcode = 73, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FindSMsb", + .opcode = 74, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "FindUMsb", + .opcode = 75, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "InterpolateAtCentroid", + .opcode = 76, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "InterpolateAtSample", + .opcode = 77, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "InterpolateAtOffset", + .opcode = 78, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "NMin", + .opcode = 79, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "NMax", + .opcode = 80, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "NClamp", + .opcode = 81, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .spv_amd_shader_ballot => &.{ + .{ + .name = "SwizzleInvocationsAMD", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "SwizzleInvocationsMaskedAMD", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "WriteInvocationAMD", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "MbcntAMD", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .non_semantic_debug_printf => &.{ + .{ + .name = "DebugPrintf", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + }, + .spv_amd_gcn_shader => &.{ + .{ + .name = "CubeFaceIndexAMD", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "CubeFaceCoordAMD", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "TimeAMD", + .opcode = 3, + .operands = &.{}, + }, + }, + .open_cl_std => &.{ + .{ + .name = "acos", + .opcode = 0, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "acosh", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "acospi", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "asin", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "asinh", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "asinpi", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "atan", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "atan2", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "atanh", + .opcode = 8, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "atanpi", + .opcode = 9, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "atan2pi", + .opcode = 10, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "cbrt", + .opcode = 11, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ceil", + .opcode = 12, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "copysign", + .opcode = 13, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "cos", + .opcode = 14, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "cosh", + .opcode = 15, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "cospi", + .opcode = 16, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "erfc", + .opcode = 17, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "erf", + .opcode = 18, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "exp", + .opcode = 19, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "exp2", + .opcode = 20, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "exp10", + .opcode = 21, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "expm1", + .opcode = 22, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fabs", + .opcode = 23, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fdim", + .opcode = 24, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "floor", + .opcode = 25, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fma", + .opcode = 26, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fmax", + .opcode = 27, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fmin", + .opcode = 28, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fmod", + .opcode = 29, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fract", + .opcode = 30, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "frexp", + .opcode = 31, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "hypot", + .opcode = 32, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ilogb", + .opcode = 33, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ldexp", + .opcode = 34, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "lgamma", + .opcode = 35, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "lgamma_r", + .opcode = 36, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "log", + .opcode = 37, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "log2", + .opcode = 38, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "log10", + .opcode = 39, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "log1p", + .opcode = 40, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "logb", + .opcode = 41, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "mad", + .opcode = 42, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "maxmag", + .opcode = 43, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "minmag", + .opcode = 44, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "modf", + .opcode = 45, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "nan", + .opcode = 46, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "nextafter", + .opcode = 47, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "pow", + .opcode = 48, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "pown", + .opcode = 49, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "powr", + .opcode = 50, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "remainder", + .opcode = 51, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "remquo", + .opcode = 52, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "rint", + .opcode = 53, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "rootn", + .opcode = 54, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "round", + .opcode = 55, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "rsqrt", + .opcode = 56, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "sin", + .opcode = 57, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "sincos", + .opcode = 58, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "sinh", + .opcode = 59, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "sinpi", + .opcode = 60, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "sqrt", + .opcode = 61, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "tan", + .opcode = 62, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "tanh", + .opcode = 63, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "tanpi", + .opcode = 64, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "tgamma", + .opcode = 65, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "trunc", + .opcode = 66, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_cos", + .opcode = 67, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_divide", + .opcode = 68, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_exp", + .opcode = 69, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_exp2", + .opcode = 70, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_exp10", + .opcode = 71, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_log", + .opcode = 72, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_log2", + .opcode = 73, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_log10", + .opcode = 74, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_powr", + .opcode = 75, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_recip", + .opcode = 76, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_rsqrt", + .opcode = 77, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_sin", + .opcode = 78, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_sqrt", + .opcode = 79, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "half_tan", + .opcode = 80, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_cos", + .opcode = 81, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_divide", + .opcode = 82, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_exp", + .opcode = 83, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_exp2", + .opcode = 84, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_exp10", + .opcode = 85, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_log", + .opcode = 86, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_log2", + .opcode = 87, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_log10", + .opcode = 88, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_powr", + .opcode = 89, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_recip", + .opcode = 90, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_rsqrt", + .opcode = 91, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_sin", + .opcode = 92, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_sqrt", + .opcode = 93, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "native_tan", + .opcode = 94, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fclamp", + .opcode = 95, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "degrees", + .opcode = 96, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fmax_common", + .opcode = 97, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fmin_common", + .opcode = 98, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "mix", + .opcode = 99, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "radians", + .opcode = 100, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "step", + .opcode = 101, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "smoothstep", + .opcode = 102, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "sign", + .opcode = 103, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "cross", + .opcode = 104, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "distance", + .opcode = 105, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "length", + .opcode = 106, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "normalize", + .opcode = 107, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fast_distance", + .opcode = 108, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fast_length", + .opcode = 109, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "fast_normalize", + .opcode = 110, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_abs", + .opcode = 141, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_abs_diff", + .opcode = 142, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_add_sat", + .opcode = 143, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_add_sat", + .opcode = 144, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_hadd", + .opcode = 145, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_hadd", + .opcode = 146, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_rhadd", + .opcode = 147, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_rhadd", + .opcode = 148, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_clamp", + .opcode = 149, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_clamp", + .opcode = 150, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "clz", + .opcode = 151, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "ctz", + .opcode = 152, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_mad_hi", + .opcode = 153, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_mad_sat", + .opcode = 154, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_mad_sat", + .opcode = 155, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_max", + .opcode = 156, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_max", + .opcode = 157, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_min", + .opcode = 158, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_min", + .opcode = 159, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_mul_hi", + .opcode = 160, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "rotate", + .opcode = 161, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_sub_sat", + .opcode = 162, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_sub_sat", + .opcode = 163, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_upsample", + .opcode = 164, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_upsample", + .opcode = 165, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "popcount", + .opcode = 166, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_mad24", + .opcode = 167, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_mad24", + .opcode = 168, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "s_mul24", + .opcode = 169, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_mul24", + .opcode = 170, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "vloadn", + .opcode = 171, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "vstoren", + .opcode = 172, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "vload_half", + .opcode = 173, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "vload_halfn", + .opcode = 174, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "vstore_half", + .opcode = 175, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "vstore_half_r", + .opcode = 176, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .fp_rounding_mode, .quantifier = .required }, + }, + }, + .{ + .name = "vstore_halfn", + .opcode = 177, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "vstore_halfn_r", + .opcode = 178, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .fp_rounding_mode, .quantifier = .required }, + }, + }, + .{ + .name = "vloada_halfn", + .opcode = 179, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .literal_integer, .quantifier = .required }, + }, + }, + .{ + .name = "vstorea_halfn", + .opcode = 180, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "vstorea_halfn_r", + .opcode = 181, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .fp_rounding_mode, .quantifier = .required }, + }, + }, + .{ + .name = "shuffle", + .opcode = 182, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "shuffle2", + .opcode = 183, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "printf", + .opcode = 184, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "prefetch", + .opcode = 185, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "bitselect", + .opcode = 186, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "select", + .opcode = 187, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_abs", + .opcode = 201, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_abs_diff", + .opcode = 202, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_mul_hi", + .opcode = 203, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "u_mad_hi", + .opcode = 204, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .non_semantic_shader_debug_info_100 => &.{ + .{ + .name = "DebugInfoNone", + .opcode = 0, + .operands = &.{}, + }, + .{ + .name = "DebugCompilationUnit", + .opcode = 1, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeBasic", + .opcode = 2, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypePointer", + .opcode = 3, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeQualifier", + .opcode = 4, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeArray", + .opcode = 5, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeVector", + .opcode = 6, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypedef", + .opcode = 7, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeFunction", + .opcode = 8, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeEnum", + .opcode = 9, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .pair_id_ref_id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeComposite", + .opcode = 10, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeMember", + .opcode = 11, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugTypeInheritance", + .opcode = 12, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypePtrToMember", + .opcode = 13, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeTemplate", + .opcode = 14, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugTypeTemplateParameter", + .opcode = 15, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeTemplateTemplateParameter", + .opcode = 16, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeTemplateParameterPack", + .opcode = 17, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugGlobalVariable", + .opcode = 18, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugFunctionDeclaration", + .opcode = 19, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugFunction", + .opcode = 20, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugLexicalBlock", + .opcode = 21, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugLexicalBlockDiscriminator", + .opcode = 22, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugScope", + .opcode = 23, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugNoScope", + .opcode = 24, + .operands = &.{}, + }, + .{ + .name = "DebugInlinedAt", + .opcode = 25, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugLocalVariable", + .opcode = 26, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugInlinedVariable", + .opcode = 27, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugDeclare", + .opcode = 28, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugValue", + .opcode = 29, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugOperation", + .opcode = 30, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugExpression", + .opcode = 31, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .variadic }, + }, + }, + .{ + .name = "DebugMacroDef", + .opcode = 32, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugMacroUndef", + .opcode = 33, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugImportedEntity", + .opcode = 34, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugSource", + .opcode = 35, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .optional }, + }, + }, + .{ + .name = "DebugFunctionDefinition", + .opcode = 101, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugSourceContinued", + .opcode = 102, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugLine", + .opcode = 103, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugNoLine", + .opcode = 104, + .operands = &.{}, + }, + .{ + .name = "DebugBuildIdentifier", + .opcode = 105, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugStoragePath", + .opcode = 106, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugEntryPoint", + .opcode = 107, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + .{ + .name = "DebugTypeMatrix", + .opcode = 108, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + .{ .kind = .id_ref, .quantifier = .required }, + }, + }, + }, + .zig => &.{ .{ .name = "InvocationGlobal", .opcode = 0, - .operands = &[_]Operand{ - .{ .kind = .IdRef, .quantifier = .required }, + .operands = &.{ + .{ .kind = .id_ref, .quantifier = .required }, }, }, }, diff --git a/src/libs/libcxx.zig b/src/libs/libcxx.zig index eebbb9cb73..12c9bdedde 100644 --- a/src/libs/libcxx.zig +++ b/src/libs/libcxx.zig @@ -211,6 +211,10 @@ pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError! try cflags.append("-DLIBCXX_BUILDING_LIBCXXABI"); try cflags.append("-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER"); + if (target.os.tag == .wasi) { + try cflags.append("-fno-exceptions"); + } + try cflags.append("-fvisibility=hidden"); try cflags.append("-fvisibility-inlines-hidden"); @@ -388,6 +392,9 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr for (libcxxabi_files) |cxxabi_src| { if (!comp.config.any_non_single_threaded and std.mem.startsWith(u8, cxxabi_src, "src/cxa_thread_atexit.cpp")) continue; + if (target.os.tag == .wasi and + (std.mem.eql(u8, cxxabi_src, "src/cxa_exception.cpp") or std.mem.eql(u8, cxxabi_src, "src/cxa_personality.cpp"))) + continue; var cflags = std.ArrayList([]const u8).init(arena); @@ -403,6 +410,10 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr try cflags.append("-DHAVE___CXA_THREAD_ATEXIT_IMPL"); } + if (target.os.tag == .wasi) { + try cflags.append("-fno-exceptions"); + } + try cflags.append("-fvisibility=hidden"); try cflags.append("-fvisibility-inlines-hidden"); diff --git a/src/link/Elf/Object.zig b/src/link/Elf/Object.zig index d202ba7f8a..8422ac0ef5 100644 --- a/src/link/Elf/Object.zig +++ b/src/link/Elf/Object.zig @@ -106,6 +106,9 @@ pub fn parseCommon( const header_buffer = try Elf.preadAllAlloc(gpa, handle, offset, @sizeOf(elf.Elf64_Ehdr)); defer gpa.free(header_buffer); self.header = @as(*align(1) const elf.Elf64_Ehdr, @ptrCast(header_buffer)).*; + if (!mem.eql(u8, self.header.?.e_ident[0..4], elf.MAGIC)) { + return diags.failParse(path, "not an ELF file", .{}); + } const em = target.toElfMachine(); if (em != self.header.?.e_machine) { diff --git a/src/link/SpirV.zig b/src/link/SpirV.zig index 93f7000401..01e88ce2d9 100644 --- a/src/link/SpirV.zig +++ b/src/link/SpirV.zig @@ -42,7 +42,7 @@ const Value = @import("../Value.zig"); const SpvModule = @import("../codegen/spirv/Module.zig"); const Section = @import("../codegen/spirv/Section.zig"); const spec = @import("../codegen/spirv/spec.zig"); -const IdResult = spec.IdResult; +const Id = spec.Id; const Word = spec.Word; const BinaryModule = @import("SpirV/BinaryModule.zig"); @@ -144,15 +144,15 @@ pub fn updateExports( const cc = Type.fromInterned(nav_ty).fnCallingConvention(zcu); const exec_model: spec.ExecutionModel = switch (target.os.tag) { .vulkan, .opengl => switch (cc) { - .spirv_vertex => .Vertex, - .spirv_fragment => .Fragment, - .spirv_kernel => .GLCompute, + .spirv_vertex => .vertex, + .spirv_fragment => .fragment, + .spirv_kernel => .gl_compute, // TODO: We should integrate with the Linkage capability and export this function .spirv_device => return, else => unreachable, }, .opencl => switch (cc) { - .spirv_kernel => .Kernel, + .spirv_kernel => .kernel, // TODO: We should integrate with the Linkage capability and export this function .spirv_device => return, else => unreachable, diff --git a/src/link/SpirV/BinaryModule.zig b/src/link/SpirV/BinaryModule.zig index c80bf9b06a..7ba9e80bdc 100644 --- a/src/link/SpirV/BinaryModule.zig +++ b/src/link/SpirV/BinaryModule.zig @@ -7,7 +7,7 @@ const spec = @import("../../codegen/spirv/spec.zig"); const Opcode = spec.Opcode; const Word = spec.Word; const InstructionSet = spec.InstructionSet; -const ResultId = spec.IdResult; +const ResultId = spec.Id; const BinaryModule = @This(); @@ -254,8 +254,8 @@ pub const Parser = struct { // with ALL operations that return an int or float. const spec_operands = inst_spec.operands; if (spec_operands.len >= 2 and - spec_operands[0].kind == .IdResultType and - spec_operands[1].kind == .IdResult) + spec_operands[0].kind == .id_result_type and + spec_operands[1].kind == .id_result) { if (operands.len < 2) return error.InvalidOperands; if (binary.arith_type_width.get(@enumFromInt(operands[0]))) |width| { @@ -288,8 +288,8 @@ pub const Parser = struct { var offset: usize = 0; switch (inst.opcode) { .OpSpecConstantOp => { - assert(operands[0].kind == .IdResultType); - assert(operands[1].kind == .IdResult); + assert(operands[0].kind == .id_result_type); + assert(operands[1].kind == .id_result); offset = try self.parseOperandsResultIds(binary, inst, operands[0..2], offset, offsets); if (offset >= inst.operands.len) return error.InvalidPhysicalFormat; @@ -297,13 +297,13 @@ pub const Parser = struct { const spec_index = self.opcode_table.get(mapSetAndOpcode(.core, spec_opcode)) orelse return error.InvalidPhysicalFormat; const spec_operands = InstructionSet.core.instructions()[spec_index].operands; - assert(spec_operands[0].kind == .IdResultType); - assert(spec_operands[1].kind == .IdResult); + assert(spec_operands[0].kind == .id_result_type); + assert(spec_operands[1].kind == .id_result); offset = try self.parseOperandsResultIds(binary, inst, spec_operands[2..], offset + 1, offsets); }, .OpExtInst => { - assert(operands[0].kind == .IdResultType); - assert(operands[1].kind == .IdResult); + assert(operands[0].kind == .id_result_type); + assert(operands[1].kind == .id_result); offset = try self.parseOperandsResultIds(binary, inst, operands[0..2], offset, offsets); if (offset + 1 >= inst.operands.len) return error.InvalidPhysicalFormat; @@ -405,8 +405,8 @@ pub const Parser = struct { offset += 1; }, else => switch (kind) { - .LiteralInteger, .LiteralFloat => offset += 1, - .LiteralString => while (true) { + .literal_integer, .literal_float => offset += 1, + .literal_string => while (true) { if (offset >= inst.operands.len) return error.InvalidPhysicalFormat; const word = inst.operands[offset]; offset += 1; @@ -419,7 +419,7 @@ pub const Parser = struct { break; } }, - .LiteralContextDependentNumber => { + .literal_context_dependent_number => { assert(inst.opcode == .OpConstant or inst.opcode == .OpSpecConstantOp); const bit_width = binary.arith_type_width.get(@enumFromInt(inst.operands[0])) orelse { log.err("invalid LiteralContextDependentNumber type {}", .{inst.operands[0]}); @@ -431,9 +431,9 @@ pub const Parser = struct { else => unreachable, }; }, - .LiteralExtInstInteger => unreachable, - .LiteralSpecConstantOpInteger => unreachable, - .PairLiteralIntegerIdRef => { // Switch case + .literal_ext_inst_integer => unreachable, + .literal_spec_constant_op_integer => unreachable, + .pair_literal_integer_id_ref => { // Switch case assert(inst.opcode == .OpSwitch); const bit_width = binary.arith_type_width.get(@enumFromInt(inst.operands[0])) orelse { log.err("invalid OpSwitch type {}", .{inst.operands[0]}); @@ -447,11 +447,11 @@ pub const Parser = struct { try offsets.append(@intCast(offset)); offset += 1; }, - .PairIdRefLiteralInteger => { + .pair_id_ref_literal_integer => { try offsets.append(@intCast(offset)); offset += 2; }, - .PairIdRefIdRef => { + .pair_id_ref_id_ref => { try offsets.append(@intCast(offset)); try offsets.append(@intCast(offset + 1)); offset += 2; diff --git a/src/link/SpirV/deduplicate.zig b/src/link/SpirV/deduplicate.zig index 46b9642458..04b916e130 100644 --- a/src/link/SpirV/deduplicate.zig +++ b/src/link/SpirV/deduplicate.zig @@ -7,7 +7,7 @@ const BinaryModule = @import("BinaryModule.zig"); const Section = @import("../../codegen/spirv/Section.zig"); const spec = @import("../../codegen/spirv/spec.zig"); const Opcode = spec.Opcode; -const ResultId = spec.IdResult; +const ResultId = spec.Id; const Word = spec.Word; fn canDeduplicate(opcode: Opcode) bool { @@ -20,9 +20,9 @@ fn canDeduplicate(opcode: Opcode) bool { // Debug decoration-style instructions .OpName, .OpMemberName => true, else => switch (opcode.class()) { - .TypeDeclaration, - .ConstantCreation, - .Annotation, + .type_declaration, + .constant_creation, + .annotation, => true, else => false, }, @@ -86,8 +86,8 @@ const ModuleInfo = struct { if (!canDeduplicate(inst.opcode)) continue; const result_id_index: u16 = switch (inst.opcode.class()) { - .TypeDeclaration, .Annotation, .Debug => 0, - .ConstantCreation => 1, + .type_declaration, .annotation, .debug => 0, + .constant_creation => 1, else => unreachable, }; @@ -101,13 +101,13 @@ const ModuleInfo = struct { }; switch (inst.opcode.class()) { - .Annotation, .Debug => { + .annotation, .debug => { try decorations.append(arena, .{ .target_id = result_id, .entity = entity, }); }, - .TypeDeclaration, .ConstantCreation => { + .type_declaration, .constant_creation => { const entry = try entities.getOrPut(result_id); if (entry.found_existing) { log.err("type or constant {f} has duplicate definition", .{result_id}); @@ -469,7 +469,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule, progress: std.Pr const inst_spec = parser.getInstSpec(inst.opcode).?; const maybe_result_id_offset: ?u16 = for (0..2) |i| { - if (inst_spec.operands.len > i and inst_spec.operands[i].kind == .IdResult) { + if (inst_spec.operands.len > i and inst_spec.operands[i].kind == .id_result) { break @intCast(i); } } else null; @@ -488,7 +488,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule, progress: std.Pr } switch (inst.opcode.class()) { - .Annotation, .Debug => { + .annotation, .debug => { // For decoration-style instructions, only emit them // if the target is not removed. const target: ResultId = @enumFromInt(inst.operands[0]); @@ -515,7 +515,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule, progress: std.Pr // Debug and Annotation instructions don't need the forward pointer, and it // messes up the logical layout of the module. switch (inst.opcode.class()) { - .TypeDeclaration, .ConstantCreation, .Memory => {}, + .type_declaration, .constant_creation, .memory => {}, else => continue, } diff --git a/src/link/SpirV/lower_invocation_globals.zig b/src/link/SpirV/lower_invocation_globals.zig index 5a64f38a35..8136baf305 100644 --- a/src/link/SpirV/lower_invocation_globals.zig +++ b/src/link/SpirV/lower_invocation_globals.zig @@ -6,7 +6,7 @@ const log = std.log.scoped(.spirv_link); const BinaryModule = @import("BinaryModule.zig"); const Section = @import("../../codegen/spirv/Section.zig"); const spec = @import("../../codegen/spirv/spec.zig"); -const ResultId = spec.IdResult; +const ResultId = spec.Id; const Word = spec.Word; /// This structure contains all the stuff that we need to parse from the module in @@ -626,7 +626,7 @@ const ModuleBuilder = struct { try self.section.emit(self.arena, .OpVariable, .{ .id_result_type = global_info.ty, .id_result = id, - .storage_class = .Function, + .storage_class = .function, .initializer = null, }); } diff --git a/src/link/SpirV/prune_unused.zig b/src/link/SpirV/prune_unused.zig index 275458564e..87fb047f53 100644 --- a/src/link/SpirV/prune_unused.zig +++ b/src/link/SpirV/prune_unused.zig @@ -15,14 +15,14 @@ const BinaryModule = @import("BinaryModule.zig"); const Section = @import("../../codegen/spirv/Section.zig"); const spec = @import("../../codegen/spirv/spec.zig"); const Opcode = spec.Opcode; -const ResultId = spec.IdResult; +const ResultId = spec.Id; const Word = spec.Word; /// Return whether a particular opcode's instruction can be pruned. /// These are idempotent instructions at globals scope and instructions /// within functions that do not have any side effects. /// The opcodes that return true here do not necessarily need to -/// have an .IdResult. If they don't, then they are regarded +/// have an .Id. If they don't, then they are regarded /// as 'decoration'-style instructions that don't keep their /// operands alive, but will be emitted if they are. fn canPrune(op: Opcode) bool { @@ -34,12 +34,12 @@ fn canPrune(op: Opcode) bool { // instruction has any non-trivial side effects (like OpLoad // with the Volatile memory semantics). return switch (op.class()) { - .TypeDeclaration, - .Conversion, - .Arithmetic, - .RelationalAndLogical, - .Bit, - .Annotation, + .type_declaration, + .conversion, + .arithmetic, + .relational_and_logical, + .bit, + .annotation, => true, else => switch (op) { .OpFunction, @@ -111,7 +111,7 @@ const ModuleInfo = struct { // Result-id can only be the first or second operand const maybe_result_id: ?ResultId = for (0..2) |i| { - if (inst_spec.operands.len > i and inst_spec.operands[i].kind == .IdResult) { + if (inst_spec.operands.len > i and inst_spec.operands[i].kind == .id_result) { break @enumFromInt(inst.operands[i]); } } else null; @@ -305,7 +305,7 @@ pub fn run(parser: *BinaryModule.Parser, binary: *BinaryModule, progress: std.Pr // Result-id can only be the first or second operand const result_id: ResultId = for (0..2) |i| { - if (inst_spec.operands.len > i and inst_spec.operands[i].kind == .IdResult) { + if (inst_spec.operands.len > i and inst_spec.operands[i].kind == .id_result) { break @enumFromInt(inst.operands[i]); } } else { diff --git a/src/link/Wasm/Flush.zig b/src/link/Wasm/Flush.zig index d1cfa83cc1..311846bc5b 100644 --- a/src/link/Wasm/Flush.zig +++ b/src/link/Wasm/Flush.zig @@ -146,7 +146,7 @@ pub fn finish(f: *Flush, wasm: *Wasm) !void { const int_tag_ty = Zcu.Type.fromInterned(data.ip_index).intTagType(zcu); gop.value_ptr.* = .{ .tag_name = .{ .symbol_name = try wasm.internStringFmt("__zig_tag_name_{d}", .{@intFromEnum(data.ip_index)}), - .type_index = try wasm.internFunctionType(.Unspecified, &.{int_tag_ty.ip_index}, .slice_const_u8_sentinel_0, target), + .type_index = try wasm.internFunctionType(.auto, &.{int_tag_ty.ip_index}, .slice_const_u8_sentinel_0, target), .table_index = @intCast(wasm.tag_name_offs.items.len), } }; try wasm.functions.put(gpa, .fromZcuFunc(wasm, @enumFromInt(gop.index)), {}); diff --git a/src/target.zig b/src/target.zig index 8c33a26939..dcacc65fad 100644 --- a/src/target.zig +++ b/src/target.zig @@ -868,10 +868,16 @@ pub inline fn backendSupportsFeature(backend: std.builtin.CompilerBackend, compt else => false, }, .separate_thread => switch (backend) { + // Supports a separate thread but does not support N separate + // threads because they would all just be locking the same mutex to + // protect Builder. .stage2_llvm => false, - .stage2_c, .stage2_wasm, .stage2_x86_64 => true, - // TODO: most self-hosted backends should be able to support this without too much work. - else => false, + // Same problem. Frontend needs to allow this backend to run in the + // linker thread. + .stage2_spirv => false, + // Please do not make any more exceptions. Backends must support + // being run in a separate thread from now on. + else => true, }, }; } diff --git a/test/behavior/fn.zig b/test/behavior/fn.zig index a60ac12191..6fe569a1f6 100644 --- a/test/behavior/fn.zig +++ b/test/behavior/fn.zig @@ -153,9 +153,9 @@ test "extern struct with stdcallcc fn pointer" { if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; const S = extern struct { - ptr: *const fn () callconv(if (builtin.target.cpu.arch == .x86) .Stdcall else .c) i32, + ptr: *const fn () callconv(if (builtin.target.cpu.arch == .x86) .{ .x86_stdcall = .{} } else .c) i32, - fn foo() callconv(if (builtin.target.cpu.arch == .x86) .Stdcall else .c) i32 { + fn foo() callconv(if (builtin.target.cpu.arch == .x86) .{ .x86_stdcall = .{} } else .c) i32 { return 1234; } }; @@ -170,8 +170,8 @@ fn fComplexCallconvRet(x: u32) callconv(blk: { const s: struct { n: u32 } = .{ .n = nComplexCallconv }; break :blk switch (s.n) { 0 => .c, - 1 => .Inline, - else => .Unspecified, + 1 => .@"inline", + else => .auto, }; }) struct { x: u32 } { return .{ .x = x * x }; diff --git a/test/behavior/switch_loop.zig b/test/behavior/switch_loop.zig index 687ed466d9..98605692be 100644 --- a/test/behavior/switch_loop.zig +++ b/test/behavior/switch_loop.zig @@ -216,3 +216,13 @@ test "switch loop with pointer capture" { try S.doTheTest(); try comptime S.doTheTest(); } + +test "unanalyzed continue with operand" { + if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO + + @setRuntimeSafety(false); + label: switch (false) { + false => if (false) continue :label true, + true => {}, + } +} diff --git a/test/behavior/type.zig b/test/behavior/type.zig index 53df9fc0d0..a2f2afa348 100644 --- a/test/behavior/type.zig +++ b/test/behavior/type.zig @@ -670,7 +670,7 @@ test "reified function type params initialized with field pointer" { }; const Bar = @Type(.{ .@"fn" = .{ - .calling_convention = .Unspecified, + .calling_convention = .auto, .is_generic = false, .is_var_args = false, .return_type = void, diff --git a/test/c_abi/main.zig b/test/c_abi/main.zig index e876c95adc..2b2001367f 100644 --- a/test/c_abi/main.zig +++ b/test/c_abi/main.zig @@ -5763,7 +5763,7 @@ test "f128 f128 struct" { } // The stdcall attribute on C functions is ignored when compiled on non-x86 -const stdcall_callconv: std.builtin.CallingConvention = if (builtin.cpu.arch == .x86) .Stdcall else .C; +const stdcall_callconv: std.builtin.CallingConvention = if (builtin.cpu.arch == .x86) .{ .x86_stdcall = .{} } else .c; extern fn stdcall_scalars(i8, i16, i32, f32, f64) callconv(stdcall_callconv) void; test "Stdcall ABI scalars" { diff --git a/test/cases/compile_errors/callconv_from_global_variable.zig b/test/cases/compile_errors/callconv_from_global_variable.zig index 26b63b453c..08de574e0b 100644 --- a/test/cases/compile_errors/callconv_from_global_variable.zig +++ b/test/cases/compile_errors/callconv_from_global_variable.zig @@ -1,4 +1,4 @@ -var cc: @import("std").builtin.CallingConvention = .C; +var cc: @import("std").builtin.CallingConvention = .c; export fn foo() callconv(cc) void {} // error diff --git a/test/cases/compile_errors/implicit_cast_of_error_set_not_a_subset.zig b/test/cases/compile_errors/implicit_cast_of_error_set_not_a_subset.zig index 617e638627..1dab9d81c9 100644 --- a/test/cases/compile_errors/implicit_cast_of_error_set_not_a_subset.zig +++ b/test/cases/compile_errors/implicit_cast_of_error_set_not_a_subset.zig @@ -12,5 +12,5 @@ fn foo(set1: Set1) void { // backend=stage2 // target=native // -// :7:21: error: expected type 'error{C,A}', found 'error{A,B}' +// :7:21: error: expected type 'error{A,C}', found 'error{A,B}' // :7:21: note: 'error.B' not a member of destination error set diff --git a/test/cases/compile_errors/reify_type.Fn_with_is_generic_true.zig b/test/cases/compile_errors/reify_type.Fn_with_is_generic_true.zig index d2e69c2924..4b838fbdd6 100644 --- a/test/cases/compile_errors/reify_type.Fn_with_is_generic_true.zig +++ b/test/cases/compile_errors/reify_type.Fn_with_is_generic_true.zig @@ -1,6 +1,6 @@ const Foo = @Type(.{ .@"fn" = .{ - .calling_convention = .Unspecified, + .calling_convention = .auto, .is_generic = true, .is_var_args = false, .return_type = u0, diff --git a/test/cases/compile_errors/reify_type.Fn_with_is_var_args_true_and_non-C_callconv.zig b/test/cases/compile_errors/reify_type.Fn_with_is_var_args_true_and_non-C_callconv.zig index 7986f2ef3f..e72dc41b6e 100644 --- a/test/cases/compile_errors/reify_type.Fn_with_is_var_args_true_and_non-C_callconv.zig +++ b/test/cases/compile_errors/reify_type.Fn_with_is_var_args_true_and_non-C_callconv.zig @@ -1,6 +1,6 @@ const Foo = @Type(.{ .@"fn" = .{ - .calling_convention = .Unspecified, + .calling_convention = .auto, .is_generic = false, .is_var_args = true, .return_type = u0, diff --git a/test/cases/compile_errors/reify_type.Fn_with_return_type_null.zig b/test/cases/compile_errors/reify_type.Fn_with_return_type_null.zig index 50e0b7bc4c..9dc21ca91e 100644 --- a/test/cases/compile_errors/reify_type.Fn_with_return_type_null.zig +++ b/test/cases/compile_errors/reify_type.Fn_with_return_type_null.zig @@ -1,6 +1,6 @@ const Foo = @Type(.{ .@"fn" = .{ - .calling_convention = .Unspecified, + .calling_convention = .auto, .is_generic = false, .is_var_args = false, .return_type = null, diff --git a/test/src/LlvmIr.zig b/test/src/LlvmIr.zig index 76200455b9..cebceb55d6 100644 --- a/test/src/LlvmIr.zig +++ b/test/src/LlvmIr.zig @@ -90,19 +90,21 @@ pub fn addCase(self: *LlvmIr, case: TestCase) void { const obj = self.b.addObject(.{ .name = "test", - .root_source_file = self.b.addWriteFiles().add("test.zig", case.source), - .use_llvm = true, + .root_module = self.b.createModule(.{ + .root_source_file = self.b.addWriteFiles().add("test.zig", case.source), - .code_model = case.params.code_model, - .error_tracing = case.params.error_tracing, - .omit_frame_pointer = case.params.omit_frame_pointer, - .optimize = case.params.optimize, - .pic = case.params.pic, - .sanitize_thread = case.params.sanitize_thread, - .single_threaded = case.params.single_threaded, - .strip = case.params.strip, - .target = target, - .unwind_tables = case.params.unwind_tables, + .code_model = case.params.code_model, + .error_tracing = case.params.error_tracing, + .omit_frame_pointer = case.params.omit_frame_pointer, + .optimize = case.params.optimize, + .pic = case.params.pic, + .sanitize_thread = case.params.sanitize_thread, + .single_threaded = case.params.single_threaded, + .strip = case.params.strip, + .target = target, + .unwind_tables = case.params.unwind_tables, + }), + .use_llvm = true, }); obj.dll_export_fns = case.params.dll_export_fns; diff --git a/test/standalone/c_embed_path/build.zig b/test/standalone/c_embed_path/build.zig index 0247c99a45..a314847ba6 100644 --- a/test/standalone/c_embed_path/build.zig +++ b/test/standalone/c_embed_path/build.zig @@ -8,8 +8,10 @@ pub fn build(b: *std.Build) void { const exe = b.addExecutable(.{ .name = "test", - .target = b.graph.host, - .optimize = optimize, + .root_module = b.createModule(.{ + .target = b.graph.host, + .optimize = optimize, + }), }); exe.addCSourceFile(.{ .file = b.path("test.c"), diff --git a/test/standalone/config_header/build.zig b/test/standalone/config_header/build.zig index 423e9d3823..3432685fce 100644 --- a/test/standalone/config_header/build.zig +++ b/test/standalone/config_header/build.zig @@ -2,7 +2,7 @@ const std = @import("std"); pub fn build(b: *std.Build) void { const config_header = b.addConfigHeader( - .{ .style = .{ .autoconf = b.path("config.h.in") } }, + .{ .style = .{ .autoconf_undef = b.path("config.h.in") } }, .{ .SOME_NO = null, .SOME_TRUE = true, diff --git a/test/tests.zig b/test/tests.zig index 3693e18d91..812681354c 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -438,7 +438,7 @@ const test_targets = blk: { .os_tag = .linux, .abi = .none, }, - // https://github.com/ziglang/zig/issues/23696 + // https://github.com/ziglang/zig/issues/21646 .skip_modules = &.{"std"}, }, .{ @@ -448,7 +448,7 @@ const test_targets = blk: { .abi = .musl, }, .link_libc = true, - // https://github.com/ziglang/zig/issues/23696 + // https://github.com/ziglang/zig/issues/21646 .skip_modules = &.{"std"}, }, .{ @@ -459,7 +459,7 @@ const test_targets = blk: { }, .linkage = .dynamic, .link_libc = true, - // https://github.com/ziglang/zig/issues/23696 + // https://github.com/ziglang/zig/issues/21646 .skip_modules = &.{"std"}, .extra_target = true, }, @@ -470,7 +470,7 @@ const test_targets = blk: { .abi = .gnu, }, .link_libc = true, - // https://github.com/ziglang/zig/issues/23696 + // https://github.com/ziglang/zig/issues/21646 .skip_modules = &.{"std"}, }, @@ -2369,6 +2369,11 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { if (options.skip_single_threaded and test_target.single_threaded == true) continue; + // https://github.com/ziglang/zig/issues/24405 + if (!builtin.cpu.arch.isLoongArch() and target.cpu.arch.isLoongArch() and + (mem.eql(u8, options.name, "behavior") or mem.eql(u8, options.name, "std"))) + continue; + // TODO get compiler-rt tests passing for self-hosted backends. if ((target.cpu.arch != .x86_64 or target.ofmt != .elf) and test_target.use_llvm == false and mem.eql(u8, options.name, "compiler-rt")) diff --git a/tools/docgen.zig b/tools/docgen.zig index 3f48ba39a8..9f98968c9e 100644 --- a/tools/docgen.zig +++ b/tools/docgen.zig @@ -10,7 +10,7 @@ const mem = std.mem; const testing = std.testing; const Allocator = std.mem.Allocator; const getExternalExecutor = std.zig.system.getExternalExecutor; -const fatal = std.zig.fatal; +const fatal = std.process.fatal; const max_doc_file_size = 10 * 1024 * 1024; diff --git a/tools/doctest.zig b/tools/doctest.zig index 8f9d1fe8cf..9cb402465b 100644 --- a/tools/doctest.zig +++ b/tools/doctest.zig @@ -1,6 +1,6 @@ const builtin = @import("builtin"); const std = @import("std"); -const fatal = std.zig.fatal; +const fatal = std.process.fatal; const mem = std.mem; const fs = std.fs; const process = std.process; diff --git a/tools/gen_spirv_spec.zig b/tools/gen_spirv_spec.zig index a772d99660..8840a476c4 100644 --- a/tools/gen_spirv_spec.zig +++ b/tools/gen_spirv_spec.zig @@ -59,26 +59,28 @@ const set_names = std.StaticStringMap([]const u8).initComptime(.{ .{ "nonsemantic.debugprintf", "NonSemantic.DebugPrintf" }, .{ "spv-amd-shader-explicit-vertex-parameter", "SPV_AMD_shader_explicit_vertex_parameter" }, .{ "nonsemantic.debugbreak", "NonSemantic.DebugBreak" }, + .{ "tosa.001000.1", "SPV_EXT_INST_TYPE_TOSA_001000_1" }, .{ "zig", "zig" }, }); -pub fn main() !void { - var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); - defer arena.deinit(); - const a = arena.allocator(); +var arena = std.heap.ArenaAllocator.init(std.heap.smp_allocator); +const allocator = arena.allocator(); - const args = try std.process.argsAlloc(a); +pub fn main() !void { + defer arena.deinit(); + + const args = try std.process.argsAlloc(allocator); if (args.len != 3) { usageAndExit(args[0], 1); } - const json_path = try std.fs.path.join(a, &.{ args[1], "include/spirv/unified1/" }); + const json_path = try std.fs.path.join(allocator, &.{ args[1], "include/spirv/unified1/" }); const dir = try std.fs.cwd().openDir(json_path, .{ .iterate = true }); - const core_spec = try readRegistry(CoreRegistry, a, dir, "spirv.core.grammar.json"); + const core_spec = try readRegistry(CoreRegistry, dir, "spirv.core.grammar.json"); std.sort.block(Instruction, core_spec.instructions, CmpInst{}, CmpInst.lt); - var exts = std.ArrayList(Extension).init(a); + var exts = std.ArrayList(Extension).init(allocator); var it = dir.iterate(); while (try it.next()) |entry| { @@ -86,18 +88,43 @@ pub fn main() !void { continue; } - try readExtRegistry(&exts, a, dir, entry.name); + try readExtRegistry(&exts, dir, entry.name); } - try readExtRegistry(&exts, a, std.fs.cwd(), args[2]); + try readExtRegistry(&exts, std.fs.cwd(), args[2]); - var buffer: [4000]u8 = undefined; - var w = std.fs.File.stdout().writerStreaming(&buffer); - try render(&w, a, core_spec, exts.items); - try w.flush(); + const output_buf = try allocator.alloc(u8, 1024 * 1024); + var fbs = std.io.fixedBufferStream(output_buf); + var adapter = fbs.writer().adaptToNewApi(); + const w = &adapter.new_interface; + try render(w, core_spec, exts.items); + var output: [:0]u8 = @ptrCast(fbs.getWritten()); + output[output.len] = 0; + + var tree = try std.zig.Ast.parse(allocator, output, .zig); + var color: std.zig.Color = .on; + + if (tree.errors.len != 0) { + try std.zig.printAstErrorsToStderr(allocator, tree, "", color); + return; + } + + var zir = try std.zig.AstGen.generate(allocator, tree); + if (zir.hasCompileErrors()) { + var wip_errors: std.zig.ErrorBundle.Wip = undefined; + try wip_errors.init(allocator); + defer wip_errors.deinit(); + try wip_errors.addZirErrorMessages(zir, tree, output, ""); + var error_bundle = try wip_errors.toOwnedBundle(""); + defer error_bundle.deinit(allocator); + error_bundle.renderToStdErr(color.renderOptions()); + } + + const formatted_output = try tree.render(allocator); + _ = try std.fs.File.stdout().write(formatted_output); } -fn readExtRegistry(exts: *std.ArrayList(Extension), a: Allocator, dir: std.fs.Dir, sub_path: []const u8) !void { +fn readExtRegistry(exts: *std.ArrayList(Extension), dir: std.fs.Dir, sub_path: []const u8) !void { const filename = std.fs.path.basename(sub_path); if (!std.mem.startsWith(u8, filename, "extinst.")) { return; @@ -105,22 +132,22 @@ fn readExtRegistry(exts: *std.ArrayList(Extension), a: Allocator, dir: std.fs.Di std.debug.assert(std.mem.endsWith(u8, filename, ".grammar.json")); const name = filename["extinst.".len .. filename.len - ".grammar.json".len]; - const spec = try readRegistry(ExtensionRegistry, a, dir, sub_path); + const spec = try readRegistry(ExtensionRegistry, dir, sub_path); std.sort.block(Instruction, spec.instructions, CmpInst{}, CmpInst.lt); try exts.append(.{ .name = set_names.get(name).?, .spec = spec }); } -fn readRegistry(comptime RegistryType: type, a: Allocator, dir: std.fs.Dir, path: []const u8) !RegistryType { - const spec = try dir.readFileAlloc(a, path, std.math.maxInt(usize)); +fn readRegistry(comptime RegistryType: type, dir: std.fs.Dir, path: []const u8) !RegistryType { + const spec = try dir.readFileAlloc(allocator, path, std.math.maxInt(usize)); // Required for json parsing. @setEvalBranchQuota(10000); - var scanner = std.json.Scanner.initCompleteInput(a, spec); + var scanner = std.json.Scanner.initCompleteInput(allocator, spec); var diagnostics = std.json.Diagnostics{}; scanner.enableDiagnostics(&diagnostics); - const parsed = std.json.parseFromTokenSource(RegistryType, a, &scanner, .{}) catch |err| { + const parsed = std.json.parseFromTokenSource(RegistryType, allocator, &scanner, .{}) catch |err| { std.debug.print("{s}:{}:{}:\n", .{ path, diagnostics.getLine(), diagnostics.getColumn() }); return err; }; @@ -129,11 +156,8 @@ fn readRegistry(comptime RegistryType: type, a: Allocator, dir: std.fs.Dir, path /// Returns a set with types that require an extra struct for the `Instruction` interface /// to the spir-v spec, or whether the original type can be used. -fn extendedStructs( - a: Allocator, - kinds: []const OperandKind, -) !ExtendedStructSet { - var map = ExtendedStructSet.init(a); +fn extendedStructs(kinds: []const OperandKind) !ExtendedStructSet { + var map = ExtendedStructSet.init(allocator); try map.ensureTotalCapacity(@as(u32, @intCast(kinds.len))); for (kinds) |kind| { @@ -167,7 +191,7 @@ fn tagPriorityScore(tag: []const u8) usize { } } -fn render(writer: *std.io.Writer, a: Allocator, registry: CoreRegistry, extensions: []const Extension) !void { +fn render(writer: *std.io.Writer, registry: CoreRegistry, extensions: []const Extension) !void { try writer.writeAll( \\//! This file is auto-generated by tools/gen_spirv_spec.zig. \\ @@ -185,22 +209,17 @@ fn render(writer: *std.io.Writer, a: Allocator, registry: CoreRegistry, extensio \\}; \\ \\pub const Word = u32; - \\pub const IdResult = enum(Word) { + \\pub const Id = enum(Word) { \\ none, \\ _, \\ - \\ pub fn format(self: IdResult, writer: *std.io.Writer) std.io.Writer.Error!void { + \\ pub fn format(self: Id, writer: *std.io.Writer) std.io.Writer.Error!void { \\ switch (self) { \\ .none => try writer.writeAll("(none)"), \\ else => try writer.print("%{d}", .{@intFromEnum(self)}), \\ } \\ } \\}; - \\pub const IdResultType = IdResult; - \\pub const IdRef = IdResult; - \\ - \\pub const IdMemorySemantics = IdRef; - \\pub const IdScope = IdRef; \\ \\pub const LiteralInteger = Word; \\pub const LiteralFloat = Word; @@ -215,9 +234,9 @@ fn render(writer: *std.io.Writer, a: Allocator, registry: CoreRegistry, extensio \\}; \\pub const LiteralExtInstInteger = struct{ inst: Word }; \\pub const LiteralSpecConstantOpInteger = struct { opcode: Opcode }; - \\pub const PairLiteralIntegerIdRef = struct { value: LiteralInteger, label: IdRef }; - \\pub const PairIdRefLiteralInteger = struct { target: IdRef, member: LiteralInteger }; - \\pub const PairIdRefIdRef = [2]IdRef; + \\pub const PairLiteralIntegerIdRef = struct { value: LiteralInteger, label: Id }; + \\pub const PairIdRefLiteralInteger = struct { target: Id, member: LiteralInteger }; + \\pub const PairIdRefIdRef = [2]Id; \\ \\pub const Quantifier = enum { \\ required, @@ -255,7 +274,7 @@ fn render(writer: *std.io.Writer, a: Allocator, registry: CoreRegistry, extensio ); try writer.print( - \\pub const version = Version{{ .major = {}, .minor = {}, .patch = {} }}; + \\pub const version: Version = .{{ .major = {}, .minor = {}, .patch = {} }}; \\pub const magic_number: Word = {s}; \\ \\ @@ -266,7 +285,7 @@ fn render(writer: *std.io.Writer, a: Allocator, registry: CoreRegistry, extensio // Merge the operand kinds from all extensions together. // var all_operand_kinds = std.ArrayList(OperandKind).init(a); // try all_operand_kinds.appendSlice(registry.operand_kinds); - var all_operand_kinds = OperandKindMap.init(a); + var all_operand_kinds = OperandKindMap.init(allocator); for (registry.operand_kinds) |kind| { try all_operand_kinds.putNoClobber(.{ "core", kind.kind }, kind); } @@ -279,35 +298,33 @@ fn render(writer: *std.io.Writer, a: Allocator, registry: CoreRegistry, extensio try all_operand_kinds.ensureUnusedCapacity(ext.spec.operand_kinds.len); for (ext.spec.operand_kinds) |kind| { var new_kind = kind; - new_kind.kind = try std.mem.join(a, ".", &.{ ext.name, kind.kind }); + new_kind.kind = try std.mem.join(allocator, ".", &.{ ext.name, kind.kind }); try all_operand_kinds.putNoClobber(.{ ext.name, kind.kind }, new_kind); } } - const extended_structs = try extendedStructs(a, all_operand_kinds.values()); + const extended_structs = try extendedStructs(all_operand_kinds.values()); // Note: extensions don't seem to have class. - try renderClass(writer, a, registry.instructions); + try renderClass(writer, registry.instructions); try renderOperandKind(writer, all_operand_kinds.values()); - try renderOpcodes(writer, a, registry.instructions, extended_structs); - try renderOperandKinds(writer, a, all_operand_kinds.values(), extended_structs); - try renderInstructionSet(writer, a, registry, extensions, all_operand_kinds); + try renderOpcodes(writer, registry.instructions, extended_structs); + try renderOperandKinds(writer, all_operand_kinds.values(), extended_structs); + try renderInstructionSet(writer, registry, extensions, all_operand_kinds); } fn renderInstructionSet( writer: anytype, - a: Allocator, core: CoreRegistry, extensions: []const Extension, all_operand_kinds: OperandKindMap, ) !void { - _ = a; try writer.writeAll( \\pub const InstructionSet = enum { \\ core, ); for (extensions) |ext| { - try writer.print("{p},\n", .{std.zig.fmtId(ext.name)}); + try writer.print("{f},\n", .{formatId(ext.name)}); } try writer.writeAll( @@ -340,14 +357,14 @@ fn renderInstructionsCase( // but there aren't so many total aliases and that would add more overhead in total. We will // just filter those out when needed. - try writer.print(".{p_} => &[_]Instruction{{\n", .{std.zig.fmtId(set_name)}); + try writer.print(".{f} => &.{{\n", .{formatId(set_name)}); for (instructions) |inst| { try writer.print( \\.{{ \\ .name = "{s}", \\ .opcode = {}, - \\ .operands = &[_]Operand{{ + \\ .operands = &.{{ \\ , .{ inst.opname, inst.opcode }); @@ -362,7 +379,7 @@ fn renderInstructionsCase( const kind = all_operand_kinds.get(.{ set_name, operand.kind }) orelse all_operand_kinds.get(.{ "core", operand.kind }).?; - try writer.print(".{{.kind = .{p_}, .quantifier = .{s}}},\n", .{ std.zig.fmtId(kind.kind), quantifier }); + try writer.print(".{{.kind = .{f}, .quantifier = .{s}}},\n", .{ formatId(kind.kind), quantifier }); } try writer.writeAll( @@ -378,54 +395,69 @@ fn renderInstructionsCase( ); } -fn renderClass(writer: anytype, a: Allocator, instructions: []const Instruction) !void { - var class_map = std.StringArrayHashMap(void).init(a); +fn renderClass(writer: anytype, instructions: []const Instruction) !void { + var class_map = std.StringArrayHashMap(void).init(allocator); for (instructions) |inst| { - if (std.mem.eql(u8, inst.class.?, "@exclude")) { - continue; - } + if (std.mem.eql(u8, inst.class.?, "@exclude")) continue; try class_map.put(inst.class.?, {}); } try writer.writeAll("pub const Class = enum {\n"); for (class_map.keys()) |class| { - try renderInstructionClass(writer, class); - try writer.writeAll(",\n"); + try writer.print("{f},\n", .{formatId(class)}); } try writer.writeAll("};\n\n"); } -fn renderInstructionClass(writer: anytype, class: []const u8) !void { - // Just assume that these wont clobber zig builtin types. - var prev_was_sep = true; - for (class) |c| { - switch (c) { - '-', '_' => prev_was_sep = true, - else => if (prev_was_sep) { - try writer.writeByte(std.ascii.toUpper(c)); - prev_was_sep = false; - } else { - try writer.writeByte(std.ascii.toLower(c)); - }, +const Formatter = struct { + data: []const u8, + + fn format(f: Formatter, writer: *std.io.Writer) std.io.Writer.Error!void { + var id_buf: [128]u8 = undefined; + var fbs = std.io.fixedBufferStream(&id_buf); + const fw = fbs.writer(); + for (f.data, 0..) |c, i| { + switch (c) { + '-', '_', '.', '~', ' ' => fw.writeByte('_') catch return error.WriteFailed, + 'a'...'z', '0'...'9' => fw.writeByte(c) catch return error.WriteFailed, + 'A'...'Z' => { + if ((i > 0 and std.ascii.isLower(f.data[i - 1])) or + (i > 0 and std.ascii.isUpper(f.data[i - 1]) and + i + 1 < f.data.len and std.ascii.isLower(f.data[i + 1]))) + { + _ = fw.write(&.{ '_', std.ascii.toLower(c) }) catch return error.WriteFailed; + } else { + fw.writeByte(std.ascii.toLower(c)) catch return error.WriteFailed; + } + }, + else => unreachable, + } } + + // make sure that this won't clobber with zig keywords + try writer.print("{f}", .{std.zig.fmtId(fbs.getWritten())}); } +}; + +fn formatId(identifier: []const u8) std.fmt.Alt(Formatter, Formatter.format) { + return .{ .data = .{ .data = identifier } }; } fn renderOperandKind(writer: anytype, operands: []const OperandKind) !void { try writer.writeAll( \\pub const OperandKind = enum { - \\ Opcode, + \\ opcode, \\ ); for (operands) |operand| { - try writer.print("{p},\n", .{std.zig.fmtId(operand.kind)}); + try writer.print("{f},\n", .{formatId(operand.kind)}); } try writer.writeAll( \\ \\pub fn category(self: OperandKind) OperandCategory { \\ return switch (self) { - \\ .Opcode => .literal, + \\ .opcode => .literal, \\ ); for (operands) |operand| { @@ -436,26 +468,26 @@ fn renderOperandKind(writer: anytype, operands: []const OperandKind) !void { .Literal => "literal", .Composite => "composite", }; - try writer.print(".{p_} => .{s},\n", .{ std.zig.fmtId(operand.kind), cat }); + try writer.print(".{f} => .{s},\n", .{ formatId(operand.kind), cat }); } try writer.writeAll( \\ }; \\} \\pub fn enumerants(self: OperandKind) []const Enumerant { \\ return switch (self) { - \\ .Opcode => unreachable, + \\ .opcode => unreachable, \\ ); for (operands) |operand| { switch (operand.category) { .BitEnum, .ValueEnum => {}, else => { - try writer.print(".{p_} => unreachable,\n", .{std.zig.fmtId(operand.kind)}); + try writer.print(".{f} => unreachable,\n", .{formatId(operand.kind)}); continue; }, } - try writer.print(".{p_} => &[_]Enumerant{{", .{std.zig.fmtId(operand.kind)}); + try writer.print(".{f} => &.{{", .{formatId(operand.kind)}); for (operand.enumerants.?) |enumerant| { if (enumerant.value == .bitflag and std.mem.eql(u8, enumerant.enumerant, "None")) { continue; @@ -474,32 +506,30 @@ fn renderEnumerant(writer: anytype, enumerant: Enumerant) !void { .bitflag => |flag| try writer.writeAll(flag), .int => |int| try writer.print("{}", .{int}), } - try writer.writeAll(", .parameters = &[_]OperandKind{"); + try writer.writeAll(", .parameters = &.{"); for (enumerant.parameters, 0..) |param, i| { if (i != 0) try writer.writeAll(", "); // Note, param.quantifier will always be one. - try writer.print(".{p_}", .{std.zig.fmtId(param.kind)}); + try writer.print(".{f}", .{formatId(param.kind)}); } try writer.writeAll("}}"); } fn renderOpcodes( writer: anytype, - a: Allocator, instructions: []const Instruction, extended_structs: ExtendedStructSet, ) !void { - var inst_map = std.AutoArrayHashMap(u32, usize).init(a); + var inst_map = std.AutoArrayHashMap(u32, usize).init(allocator); try inst_map.ensureTotalCapacity(instructions.len); - var aliases = std.ArrayList(struct { inst: usize, alias: usize }).init(a); + var aliases = std.ArrayList(struct { inst: usize, alias: usize }).init(allocator); try aliases.ensureTotalCapacity(instructions.len); for (instructions, 0..) |inst, i| { - if (std.mem.eql(u8, inst.class.?, "@exclude")) { - continue; - } + if (std.mem.eql(u8, inst.class.?, "@exclude")) continue; + const result = inst_map.getOrPutAssumeCapacity(inst.opcode); if (!result.found_existing) { result.value_ptr.* = i; @@ -525,7 +555,7 @@ fn renderOpcodes( try writer.writeAll("pub const Opcode = enum(u16) {\n"); for (instructions_indices) |i| { const inst = instructions[i]; - try writer.print("{p} = {},\n", .{ std.zig.fmtId(inst.opname), inst.opcode }); + try writer.print("{f} = {},\n", .{ std.zig.fmtId(inst.opname), inst.opcode }); } try writer.writeAll( @@ -533,9 +563,9 @@ fn renderOpcodes( ); for (aliases.items) |alias| { - try writer.print("pub const {} = Opcode.{p_};\n", .{ - std.zig.fmtId(instructions[alias.inst].opname), - std.zig.fmtId(instructions[alias.alias].opname), + try writer.print("pub const {f} = Opcode.{f};\n", .{ + formatId(instructions[alias.inst].opname), + formatId(instructions[alias.alias].opname), }); } @@ -548,7 +578,7 @@ fn renderOpcodes( for (instructions_indices) |i| { const inst = instructions[i]; - try renderOperand(writer, .instruction, inst.opname, inst.operands, extended_structs); + try renderOperand(writer, .instruction, inst.opname, inst.operands, extended_structs, false); } try writer.writeAll( @@ -561,9 +591,7 @@ fn renderOpcodes( for (instructions_indices) |i| { const inst = instructions[i]; - try writer.print(".{p_} => .", .{std.zig.fmtId(inst.opname)}); - try renderInstructionClass(writer, inst.class.?); - try writer.writeAll(",\n"); + try writer.print(".{f} => .{f},\n", .{ std.zig.fmtId(inst.opname), formatId(inst.class.?) }); } try writer.writeAll( @@ -576,14 +604,13 @@ fn renderOpcodes( fn renderOperandKinds( writer: anytype, - a: Allocator, kinds: []const OperandKind, extended_structs: ExtendedStructSet, ) !void { for (kinds) |kind| { switch (kind.category) { - .ValueEnum => try renderValueEnum(writer, a, kind, extended_structs), - .BitEnum => try renderBitEnum(writer, a, kind, extended_structs), + .ValueEnum => try renderValueEnum(writer, kind, extended_structs), + .BitEnum => try renderBitEnum(writer, kind, extended_structs), else => {}, } } @@ -591,20 +618,18 @@ fn renderOperandKinds( fn renderValueEnum( writer: anytype, - a: Allocator, enumeration: OperandKind, extended_structs: ExtendedStructSet, ) !void { const enumerants = enumeration.enumerants orelse return error.InvalidRegistry; - var enum_map = std.AutoArrayHashMap(u32, usize).init(a); + var enum_map = std.AutoArrayHashMap(u32, usize).init(allocator); try enum_map.ensureTotalCapacity(enumerants.len); - var aliases = std.ArrayList(struct { enumerant: usize, alias: usize }).init(a); + var aliases = std.ArrayList(struct { enumerant: usize, alias: usize }).init(allocator); try aliases.ensureTotalCapacity(enumerants.len); for (enumerants, 0..) |enumerant, i| { - try writer.context.flush(); const value: u31 = switch (enumerant.value) { .int => |value| value, // Some extensions declare ints as string @@ -632,25 +657,25 @@ fn renderValueEnum( const enum_indices = enum_map.values(); - try writer.print("pub const {} = enum(u32) {{\n", .{std.zig.fmtId(enumeration.kind)}); + try writer.print("pub const {f} = enum(u32) {{\n", .{std.zig.fmtId(enumeration.kind)}); for (enum_indices) |i| { const enumerant = enumerants[i]; // if (enumerant.value != .int) return error.InvalidRegistry; switch (enumerant.value) { - .int => |value| try writer.print("{p} = {},\n", .{ std.zig.fmtId(enumerant.enumerant), value }), - .bitflag => |value| try writer.print("{p} = {s},\n", .{ std.zig.fmtId(enumerant.enumerant), value }), + .int => |value| try writer.print("{f} = {},\n", .{ formatId(enumerant.enumerant), value }), + .bitflag => |value| try writer.print("{f} = {s},\n", .{ formatId(enumerant.enumerant), value }), } } try writer.writeByte('\n'); for (aliases.items) |alias| { - try writer.print("pub const {} = {}.{p_};\n", .{ - std.zig.fmtId(enumerants[alias.enumerant].enumerant), + try writer.print("pub const {f} = {f}.{f};\n", .{ + formatId(enumerants[alias.enumerant].enumerant), std.zig.fmtId(enumeration.kind), - std.zig.fmtId(enumerants[alias.alias].enumerant), + formatId(enumerants[alias.alias].enumerant), }); } @@ -659,11 +684,11 @@ fn renderValueEnum( return; } - try writer.print("\npub const Extended = union({}) {{\n", .{std.zig.fmtId(enumeration.kind)}); + try writer.print("\npub const Extended = union({f}) {{\n", .{std.zig.fmtId(enumeration.kind)}); for (enum_indices) |i| { const enumerant = enumerants[i]; - try renderOperand(writer, .@"union", enumerant.enumerant, enumerant.parameters, extended_structs); + try renderOperand(writer, .@"union", enumerant.enumerant, enumerant.parameters, extended_structs, true); } try writer.writeAll("};\n};\n"); @@ -671,16 +696,15 @@ fn renderValueEnum( fn renderBitEnum( writer: anytype, - a: Allocator, enumeration: OperandKind, extended_structs: ExtendedStructSet, ) !void { - try writer.print("pub const {} = packed struct {{\n", .{std.zig.fmtId(enumeration.kind)}); + try writer.print("pub const {f} = packed struct {{\n", .{std.zig.fmtId(enumeration.kind)}); var flags_by_bitpos = [_]?usize{null} ** 32; const enumerants = enumeration.enumerants orelse return error.InvalidRegistry; - var aliases = std.ArrayList(struct { flag: usize, alias: u5 }).init(a); + var aliases = std.ArrayList(struct { flag: usize, alias: u5 }).init(allocator); try aliases.ensureTotalCapacity(enumerants.len); for (enumerants, 0..) |enumerant, i| { @@ -715,7 +739,7 @@ fn renderBitEnum( for (flags_by_bitpos, 0..) |maybe_flag_index, bitpos| { if (maybe_flag_index) |flag_index| { - try writer.print("{p_}", .{std.zig.fmtId(enumerants[flag_index].enumerant)}); + try writer.print("{f}", .{formatId(enumerants[flag_index].enumerant)}); } else { try writer.print("_reserved_bit_{}", .{bitpos}); } @@ -726,10 +750,10 @@ fn renderBitEnum( try writer.writeByte('\n'); for (aliases.items) |alias| { - try writer.print("pub const {}: {} = .{{.{p_} = true}};\n", .{ - std.zig.fmtId(enumerants[alias.flag].enumerant), + try writer.print("pub const {f}: {f} = .{{.{f} = true}};\n", .{ + formatId(enumerants[alias.flag].enumerant), std.zig.fmtId(enumeration.kind), - std.zig.fmtId(enumerants[flags_by_bitpos[alias.alias].?].enumerant), + formatId(enumerants[flags_by_bitpos[alias.alias].?].enumerant), }); } @@ -747,7 +771,7 @@ fn renderBitEnum( }; const enumerant = enumerants[flag_index]; - try renderOperand(writer, .mask, enumerant.enumerant, enumerant.parameters, extended_structs); + try renderOperand(writer, .mask, enumerant.enumerant, enumerant.parameters, extended_structs, true); } try writer.writeAll("};\n};\n"); @@ -763,11 +787,18 @@ fn renderOperand( field_name: []const u8, parameters: []const Operand, extended_structs: ExtendedStructSet, + snake_case: bool, ) !void { if (kind == .instruction) { try writer.writeByte('.'); } - try writer.print("{}", .{std.zig.fmtId(field_name)}); + + if (snake_case) { + try writer.print("{f}", .{formatId(field_name)}); + } else { + try writer.print("{f}", .{std.zig.fmtId(field_name)}); + } + if (parameters.len == 0) { switch (kind) { .@"union" => try writer.writeAll(",\n"), @@ -787,7 +818,7 @@ fn renderOperand( try writer.writeByte('?'); } - try writer.writeAll("struct{"); + try writer.writeAll("struct {"); for (parameters, 0..) |param, j| { if (j != 0) { @@ -804,7 +835,11 @@ fn renderOperand( } } - try writer.print("{}", .{std.zig.fmtId(param.kind)}); + if (std.mem.startsWith(u8, param.kind, "Id")) { + _ = try writer.write("Id"); + } else { + try writer.print("{f}", .{std.zig.fmtId(param.kind)}); + } if (extended_structs.contains(param.kind)) { try writer.writeAll(".Extended"); @@ -830,49 +865,24 @@ fn renderOperand( fn renderFieldName(writer: anytype, operands: []const Operand, field_index: usize) !void { const operand = operands[field_index]; - // Should be enough for all names - adjust as needed. - var name_backing_buffer: [64]u8 = undefined; - var name_buffer = std.ArrayListUnmanaged(u8).initBuffer(&name_backing_buffer); - derive_from_kind: { // Operand names are often in the json encoded as "'Name'" (with two sets of quotes). // Additionally, some operands have ~ in them at the end (D~ref~). const name = std.mem.trim(u8, operand.name, "'~"); - if (name.len == 0) { - break :derive_from_kind; - } + if (name.len == 0) break :derive_from_kind; - // Some names have weird characters in them (like newlines) - skip any such ones. - // Use the same loop to transform to snake-case. for (name) |c| { switch (c) { - 'a'...'z', '0'...'9' => name_buffer.appendAssumeCapacity(c), - 'A'...'Z' => name_buffer.appendAssumeCapacity(std.ascii.toLower(c)), - ' ', '~' => name_buffer.appendAssumeCapacity('_'), + 'a'...'z', '0'...'9', 'A'...'Z', ' ', '~' => continue, else => break :derive_from_kind, } } - // Assume there are no duplicate 'name' fields. - try writer.print("{p_}", .{std.zig.fmtId(name_buffer.items)}); + try writer.print("{f}", .{formatId(name)}); return; } - // Translate to snake case. - name_buffer.items.len = 0; - for (operand.kind, 0..) |c, i| { - switch (c) { - 'a'...'z', '0'...'9' => name_buffer.appendAssumeCapacity(c), - 'A'...'Z' => if (i > 0 and std.ascii.isLower(operand.kind[i - 1])) { - name_buffer.appendSliceAssumeCapacity(&[_]u8{ '_', std.ascii.toLower(c) }); - } else { - name_buffer.appendAssumeCapacity(std.ascii.toLower(c)); - }, - else => unreachable, // Assume that the name is valid C-syntax (and contains no underscores). - } - } - - try writer.print("{p_}", .{std.zig.fmtId(name_buffer.items)}); + try writer.print("{f}", .{formatId(operand.kind)}); // For fields derived from type name, there could be any amount. // Simply check against all other fields, and if another similar one exists, add a number. diff --git a/tools/migrate_langref.zig b/tools/migrate_langref.zig index 29108c3501..327bedff74 100644 --- a/tools/migrate_langref.zig +++ b/tools/migrate_langref.zig @@ -7,7 +7,7 @@ const mem = std.mem; const testing = std.testing; const Allocator = std.mem.Allocator; const max_doc_file_size = 10 * 1024 * 1024; -const fatal = std.zig.fatal; +const fatal = std.process.fatal; pub fn main() !void { var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator); diff --git a/tools/spirv/grammar.zig b/tools/spirv/grammar.zig index c077d6e7e4..93bbf561fd 100644 --- a/tools/spirv/grammar.zig +++ b/tools/spirv/grammar.zig @@ -37,9 +37,11 @@ pub const InstructionPrintingClass = struct { pub const Instruction = struct { opname: []const u8, class: ?[]const u8 = null, // Note: Only available in the core registry. + aliases: [][]const u8 = &[_][]const u8{}, opcode: u32, operands: []Operand = &[_]Operand{}, capabilities: [][]const u8 = &[_][]const u8{}, + provisional: bool = false, // DebugModuleINTEL has this... capability: ?[]const u8 = null, extensions: [][]const u8 = &[_][]const u8{}, @@ -81,6 +83,7 @@ pub const OperandKind = struct { pub const Enumerant = struct { enumerant: []const u8, + aliases: [][]const u8 = &[_][]const u8{}, value: union(enum) { bitflag: []const u8, // Hexadecimal representation of the value int: u31, @@ -100,6 +103,7 @@ pub const Enumerant = struct { pub const jsonStringify = @compileError("not supported"); }, capabilities: [][]const u8 = &[_][]const u8{}, + provisional: bool = false, /// Valid for .ValueEnum and .BitEnum extensions: [][]const u8 = &[_][]const u8{}, /// `quantifier` will always be `null`.