Skip to content

Instantly share code, notes, and snippets.

@programmerjake
Last active July 29, 2017 01:07
Show Gist options
  • Save programmerjake/08d79969ba302dd1174b755280664230 to your computer and use it in GitHub Desktop.
Save programmerjake/08d79969ba302dd1174b755280664230 to your computer and use it in GitHub Desktop.
Output from vulkan-cpu as of July 28, 2017
loading test-files/test.spv
Words:
00000000: 07230203 00010000 00080001 0000002C |..#.........,...|
00000004: 00000000 00020011 00000001 00020011 |................|
00000008: 0000000B 0006000B 00000001 4C534C47 |............GLSL|
0000000C: 6474732E 3035342E 00000000 0003000E |.std.450........|
00000010: 00000000 00000001 0007000F 00000000 |................|
00000014: 00000004 6E69616D 00000000 0000000A |....main........|
00000018: 0000000F 00050048 00000008 00000000 |....H...........|
0000001C: 0000000B 00000000 00030047 00000008 |........G.......|
00000020: 00000002 00040047 0000000F 0000001E |....G...........|
00000024: 00000000 00020013 00000002 00030021 |............!...|
00000028: 00000003 00000002 00030016 00000006 |................|
0000002C: 00000020 00040017 00000007 00000006 | ...............|
00000030: 00000004 0003001E 00000008 00000007 |................|
00000034: 00040020 00000009 00000003 00000008 | ...............|
00000038: 0004003B 00000009 0000000A 00000003 |;...............|
0000003C: 00040015 0000000B 00000020 00000001 |........ .......|
00000040: 0004002B 0000000B 0000000C 00000000 |+...............|
00000044: 00040017 0000000D 00000006 00000003 |................|
00000048: 00040020 0000000E 00000001 0000000D | ...............|
0000004C: 0004003B 0000000E 0000000F 00000001 |;...............|
00000050: 0004002B 00000006 00000011 3F800000 |+..............?|
00000054: 00040020 00000016 00000003 00000007 | ...............|
00000058: 00040020 00000018 00000007 0000000B | ...............|
0000005C: 00040015 0000001A 00000020 00000000 |........ .......|
00000060: 0004002B 0000001A 0000001B 00000002 |+...............|
00000064: 00040020 0000001C 00000001 00000006 | ...............|
00000068: 00040015 0000001F 00000040 00000000 |........@.......|
0000006C: 0004002B 00000006 00000028 00000000 |+.......(.......|
00000070: 0004002B 0000001A 00000029 00000000 |+.......).......|
00000074: 00040020 0000002A 00000003 00000006 | ...*...........|
00000078: 00050036 00000002 00000004 00000000 |6...............|
0000007C: 00000003 000200F8 00000005 0004003B |............;...|
00000080: 00000018 00000019 00000007 0004003D |............=...|
00000084: 0000000D 00000010 0000000F 00050051 |............Q...|
00000088: 00000006 00000012 00000010 00000000 |................|
0000008C: 00050051 00000006 00000013 00000010 |Q...............|
00000090: 00000001 00050051 00000006 00000014 |....Q...........|
00000094: 00000010 00000002 00070050 00000007 |........P.......|
00000098: 00000015 00000012 00000013 00000014 |................|
0000009C: 00000011 00050041 00000016 00000017 |....A...........|
000000A0: 0000000A 0000000C 0003003E 00000017 |........>.......|
000000A4: 00000015 00050041 0000001C 0000001D |....A...........|
000000A8: 0000000F 0000001B 0004003D 00000006 |........=.......|
000000AC: 0000001E 0000001D 0004006D 0000001F |........m.......|
000000B0: 00000020 0000001E 00040071 0000001A | .......q.......|
000000B4: 00000021 00000020 0004007C 0000000B |!... ...|.......|
000000B8: 00000022 00000021 0003003E 00000019 |"...!...>.......|
000000BC: 00000022 0004003D 0000000B 00000023 |"...=.......#...|
000000C0: 00000019 000300F7 00000026 00000000 |........&.......|
000000C4: 000C00FB 00000020 00000025 00000001 |.... ...%.......|
000000C8: 00000000 00000024 00000002 00000000 |....$...........|
000000CC: 00000024 00000008 00000000 00000024 |$...........$...|
000000D0: 000200F8 00000025 00060041 0000002A |....%...A...*...|
000000D4: 0000002B 0000000A 0000000C 00000029 |+...........)...|
000000D8: 0003003E 0000002B 00000028 000200F9 |>...+...(.......|
000000DC: 00000026 000200F8 00000024 000200F9 |&.......$.......|
000000E0: 00000026 000200F8 00000026 000100FD |&.......&.......|
000000E4: 00010038 |8...|
SPIR-V Version: 1.0
Generator Magic Number: 0x80001
Id Bound: 44
Instruction Schema (reserved): 0
0x00000005: OpCapability:
Capability: Shader
0x00000007: OpCapability:
Capability: Int64
0x00000009: OpExtInstImport:
IdResult: 1
LiteralString: "GLSL.std.450"
0x0000000F: OpMemoryModel:
AddressingModel: Logical
MemoryModel: GLSL450
0x00000012: OpEntryPoint:
ExecutionModel: Vertex
IdRef: 4
LiteralString: "main"
IdRef: 10
IdRef: 15
0x00000019: OpMemberDecorate:
IdRef: 8
LiteralInteger: 0x0 u64=0 s64=0 u32=0 s32=0
Decoration: BuiltIn:
BuiltIn: Position
0x0000001E: OpDecorate:
IdRef: 8
Decoration: Block
0x00000021: OpDecorate:
IdRef: 15
Decoration: Location:
LiteralInteger: 0x0 u64=0 s64=0 u32=0 s32=0
0x00000025: OpTypeVoid:
IdResult: 2
0x00000027: OpTypeFunction:
IdResult: 3
IdRef: 2
0x0000002A: OpTypeFloat:
IdResult: 6
LiteralInteger: 0x20 u64=32 s64=32 u32=32 s32=32
0x0000002D: OpTypeVector:
IdResult: 7
IdRef: 6
LiteralInteger: 0x4 u64=4 s64=4 u32=4 s32=4
0x00000031: OpTypeStruct:
IdResult: 8
IdRef: 7
0x00000034: OpTypePointer:
IdResult: 9
StorageClass: Output
IdRef: 8
0x00000038: OpVariable:
IdResultType: 9
IdResult: 10
StorageClass: Output
0x0000003C: OpTypeInt:
IdResult: 11
LiteralInteger: 0x20 u64=32 s64=32 u32=32 s32=32
LiteralInteger: 0x1 u64=1 s64=1 u32=1 s32=1
0x00000040: OpConstant:
IdResultType: 11
IdResult: 12
LiteralContextDependentNumber: {0x0}
0x00000044: OpTypeVector:
IdResult: 13
IdRef: 6
LiteralInteger: 0x3 u64=3 s64=3 u32=3 s32=3
0x00000048: OpTypePointer:
IdResult: 14
StorageClass: Input
IdRef: 13
0x0000004C: OpVariable:
IdResultType: 14
IdResult: 15
StorageClass: Input
0x00000050: OpConstant:
IdResultType: 6
IdResult: 17
LiteralContextDependentNumber: {0x3F800000}
0x00000054: OpTypePointer:
IdResult: 22
StorageClass: Output
IdRef: 7
0x00000058: OpTypePointer:
IdResult: 24
StorageClass: Function
IdRef: 11
0x0000005C: OpTypeInt:
IdResult: 26
LiteralInteger: 0x20 u64=32 s64=32 u32=32 s32=32
LiteralInteger: 0x0 u64=0 s64=0 u32=0 s32=0
0x00000060: OpConstant:
IdResultType: 26
IdResult: 27
LiteralContextDependentNumber: {0x2}
0x00000064: OpTypePointer:
IdResult: 28
StorageClass: Input
IdRef: 6
0x00000068: OpTypeInt:
IdResult: 31
LiteralInteger: 0x40 u64=64 s64=64 u32=64 s32=64
LiteralInteger: 0x0 u64=0 s64=0 u32=0 s32=0
0x0000006C: OpConstant:
IdResultType: 6
IdResult: 40
LiteralContextDependentNumber: {0x0}
0x00000070: OpConstant:
IdResultType: 26
IdResult: 41
LiteralContextDependentNumber: {0x0}
0x00000074: OpTypePointer:
IdResult: 42
StorageClass: Output
IdRef: 6
0x00000078: OpFunction:
IdResultType: 2
IdResult: 4
FunctionControl:
None
IdRef: 3
0x0000007D: OpLabel:
IdResult: 5
0x0000007F: OpVariable:
IdResultType: 24
IdResult: 25
StorageClass: Function
0x00000083: OpLoad:
IdResultType: 13
IdResult: 16
IdRef: 15
0x00000087: OpCompositeExtract:
IdResultType: 6
IdResult: 18
IdRef: 16
LiteralInteger: 0x0 u64=0 s64=0 u32=0 s32=0
0x0000008C: OpCompositeExtract:
IdResultType: 6
IdResult: 19
IdRef: 16
LiteralInteger: 0x1 u64=1 s64=1 u32=1 s32=1
0x00000091: OpCompositeExtract:
IdResultType: 6
IdResult: 20
IdRef: 16
LiteralInteger: 0x2 u64=2 s64=2 u32=2 s32=2
0x00000096: OpCompositeConstruct:
IdResultType: 7
IdResult: 21
IdRef: 18
IdRef: 19
IdRef: 20
IdRef: 17
0x0000009D: OpAccessChain:
IdResultType: 22
IdResult: 23
IdRef: 10
IdRef: 12
0x000000A2: OpStore:
IdRef: 23
IdRef: 21
0x000000A5: OpAccessChain:
IdResultType: 28
IdResult: 29
IdRef: 15
IdRef: 27
0x000000AA: OpLoad:
IdResultType: 6
IdResult: 30
IdRef: 29
0x000000AE: OpConvertFToU:
IdResultType: 31
IdResult: 32
IdRef: 30
0x000000B2: OpUConvert:
IdResultType: 26
IdResult: 33
IdRef: 32
0x000000B6: OpBitcast:
IdResultType: 11
IdResult: 34
IdRef: 33
0x000000BA: OpStore:
IdRef: 25
IdRef: 34
0x000000BD: OpLoad:
IdResultType: 11
IdResult: 35
IdRef: 25
0x000000C1: OpSelectionMerge:
IdRef: 38
SelectionControl:
None
0x000000C4: OpSwitch:
IdRef: 32
IdRef: 37
PairLiteralIntegerIdRef:
LiteralInteger: 0x1 u64=1 s64=1 u32=1 s32=1
IdRef: 36
PairLiteralIntegerIdRef:
LiteralInteger: 0x2 u64=2 s64=2 u32=2 s32=2
IdRef: 36
PairLiteralIntegerIdRef:
LiteralInteger: 0x8 u64=8 s64=8 u32=8 s32=8
IdRef: 36
0x000000D0: OpLabel:
IdResult: 37
0x000000D2: OpAccessChain:
IdResultType: 42
IdResult: 43
IdRef: 10
IdRef: 12
IdRef: 41
0x000000D8: OpStore:
IdRef: 43
IdRef: 40
0x000000DB: OpBranch:
IdRef: 38
0x000000DD: OpLabel:
IdResult: 36
0x000000DF: OpBranch:
IdRef: 38
0x000000E1: OpLabel:
IdResult: 38
0x000000E3: OpReturn:
0x000000E4: OpFunctionEnd:
Translation to LLVM succeeded.
; ModuleID = 'shader_1_module'
source_filename = "shader_1_module"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%0 = type { <4 x float> }
%shader_1_Io_struct = type { %shader_1_Inputs, %shader_1_Outputs }
%shader_1_Inputs = type { <3 x float> }
%shader_1_Outputs = type { %0 }
define void @0(%shader_1_Io_struct*) #0 {
%inputs = getelementptr inbounds %shader_1_Io_struct, %shader_1_Io_struct* %0, i32 0, i32 0
%outputs = getelementptr inbounds %shader_1_Io_struct, %shader_1_Io_struct* %0, i32 0, i32 1
%2 = getelementptr inbounds %shader_1_Outputs, %shader_1_Outputs* %outputs, i32 0, i32 0
%3 = getelementptr inbounds %shader_1_Inputs, %shader_1_Inputs* %inputs, i32 0, i32 0
%4 = alloca i32
%5 = load <3 x float>, <3 x float>* %3
%6 = extractelement <3 x float> %5, i32 0
%7 = extractelement <3 x float> %5, i32 1
%8 = extractelement <3 x float> %5, i32 2
%9 = insertelement <4 x float> undef, float %6, i32 0
%10 = insertelement <4 x float> %9, float %7, i32 1
%11 = insertelement <4 x float> %10, float %8, i32 2
%12 = insertelement <4 x float> %11, float 1.000000e+00, i32 3
%13 = getelementptr %0, %0* %2, i32 0, i32 0
store <4 x float> %12, <4 x float>* %13
%14 = getelementptr <3 x float>, <3 x float>* %3, i32 0, i32 2
%15 = load float, float* %14
%16 = fptoui float %15 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %4
%18 = load i32, i32* %4
switch i64 %16, label %20 [
i64 1, label %19
i64 2, label %19
i64 8, label %19
]
; <label>:19: ; preds = %1, %1, %1
br label %22
; <label>:20: ; preds = %1
%21 = getelementptr %0, %0* %2, i32 0, i32 0, i32 0
store float 0.000000e+00, float* %21
br label %22
; <label>:22: ; preds = %19, %20
ret void
}
attributes #0 = { "target-cpu"="znver1" "target-features"="+adx,+aes,+avx,+avx2,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vl,+bmi,+bmi2,+clflushopt,-clwb,+cmov,+cx16,+f16c,+fma,-fma4,+fsgsbase,-hle,-invpcid,+lzcnt,+mmx,+movbe,+mwaitx,+pclmul,-pcommit,-pku,+popcnt,-prefetchwt1,+prfchw,+rdrnd,+rdseed,-rtm,-sgx,+sha,+smap,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+sse4a,+ssse3,-tbm,-xop,+xsave,+xsavec,+xsaveopt,+xsaves" }
/* This file is automatically generated by generate_spirv_parser. DO NOT MODIFY. */
/*
* Copyright (c) 2014-2016 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and/or associated documentation files (the "Materials"),
* to deal in the Materials without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Materials, and to permit persons to whom the
* Materials are furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Materials.
*
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
* STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
* HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
* IN THE MATERIALS.
*/
#include "parser.h"
#include "util/optional.h"
#include "json/json.h"
#include <vector>
#include <cassert>
#include <type_traits>
namespace vulkan_cpu
{
namespace spirv
{
void Dump_callbacks::handle_header(unsigned version_number_major,
unsigned version_number_minor,
Word generator_magic_number,
Word id_bound,
Word instruction_schema)
{
ss << "SPIR-V Version: " << std::dec << version_number_major << '.' << version_number_minor << '\n';
ss << "Generator Magic Number: 0x" << std::hex << generator_magic_number << '\n';
ss << "Id Bound: " << std::dec << id_bound << '\n';
ss << "Instruction Schema (reserved): " << std::dec << instruction_schema << '\n';
}
void Dump_callbacks::dump_operand_image_operands(const Image_operands_with_parameters &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "ImageOperands:\n";
Word bits = static_cast<Word>(operand.value);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Image_operands::bias))
{
write_indent(indent_depth + 1);
ss << "Bias:\n";
bits &= ~static_cast<Word>(Image_operands::bias);
auto &parameters = *operand.bias;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::lod))
{
write_indent(indent_depth + 1);
ss << "Lod:\n";
bits &= ~static_cast<Word>(Image_operands::lod);
auto &parameters = *operand.lod;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::grad))
{
write_indent(indent_depth + 1);
ss << "Grad:\n";
bits &= ~static_cast<Word>(Image_operands::grad);
auto &parameters = *operand.grad;
dump_operand_id_ref(parameters.dx, indent_depth + 2);
dump_operand_id_ref(parameters.dy, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::const_offset))
{
write_indent(indent_depth + 1);
ss << "ConstOffset:\n";
bits &= ~static_cast<Word>(Image_operands::const_offset);
auto &parameters = *operand.const_offset;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::offset))
{
write_indent(indent_depth + 1);
ss << "Offset:\n";
bits &= ~static_cast<Word>(Image_operands::offset);
auto &parameters = *operand.offset;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::const_offsets))
{
write_indent(indent_depth + 1);
ss << "ConstOffsets:\n";
bits &= ~static_cast<Word>(Image_operands::const_offsets);
auto &parameters = *operand.const_offsets;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::sample))
{
write_indent(indent_depth + 1);
ss << "Sample:\n";
bits &= ~static_cast<Word>(Image_operands::sample);
auto &parameters = *operand.sample;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
if(bits & static_cast<Word>(Image_operands::min_lod))
{
write_indent(indent_depth + 1);
ss << "MinLod:\n";
bits &= ~static_cast<Word>(Image_operands::min_lod);
auto &parameters = *operand.min_lod;
dump_operand_id_ref(parameters.ref, indent_depth + 2);
}
}
void Dump_callbacks::dump_operand_fp_fast_math_mode(const Fp_fast_math_mode &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "FPFastMathMode:\n";
Word bits = static_cast<Word>(operand);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Fp_fast_math_mode::not_na_n))
{
write_indent(indent_depth + 1);
ss << "NotNaN\n";
bits &= ~static_cast<Word>(Fp_fast_math_mode::not_na_n);
}
if(bits & static_cast<Word>(Fp_fast_math_mode::not_inf))
{
write_indent(indent_depth + 1);
ss << "NotInf\n";
bits &= ~static_cast<Word>(Fp_fast_math_mode::not_inf);
}
if(bits & static_cast<Word>(Fp_fast_math_mode::nsz))
{
write_indent(indent_depth + 1);
ss << "NSZ\n";
bits &= ~static_cast<Word>(Fp_fast_math_mode::nsz);
}
if(bits & static_cast<Word>(Fp_fast_math_mode::allow_recip))
{
write_indent(indent_depth + 1);
ss << "AllowRecip\n";
bits &= ~static_cast<Word>(Fp_fast_math_mode::allow_recip);
}
if(bits & static_cast<Word>(Fp_fast_math_mode::fast))
{
write_indent(indent_depth + 1);
ss << "Fast\n";
bits &= ~static_cast<Word>(Fp_fast_math_mode::fast);
}
}
void Dump_callbacks::dump_operand_selection_control(const Selection_control &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "SelectionControl:\n";
Word bits = static_cast<Word>(operand);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Selection_control::flatten))
{
write_indent(indent_depth + 1);
ss << "Flatten\n";
bits &= ~static_cast<Word>(Selection_control::flatten);
}
if(bits & static_cast<Word>(Selection_control::dont_flatten))
{
write_indent(indent_depth + 1);
ss << "DontFlatten\n";
bits &= ~static_cast<Word>(Selection_control::dont_flatten);
}
}
void Dump_callbacks::dump_operand_loop_control(const Loop_control_with_parameters &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LoopControl:\n";
Word bits = static_cast<Word>(operand.value);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Loop_control::unroll))
{
write_indent(indent_depth + 1);
ss << "Unroll\n";
bits &= ~static_cast<Word>(Loop_control::unroll);
}
if(bits & static_cast<Word>(Loop_control::dont_unroll))
{
write_indent(indent_depth + 1);
ss << "DontUnroll\n";
bits &= ~static_cast<Word>(Loop_control::dont_unroll);
}
if(bits & static_cast<Word>(Loop_control::dependency_infinite))
{
write_indent(indent_depth + 1);
ss << "DependencyInfinite\n";
bits &= ~static_cast<Word>(Loop_control::dependency_infinite);
}
if(bits & static_cast<Word>(Loop_control::dependency_length))
{
write_indent(indent_depth + 1);
ss << "DependencyLength:\n";
bits &= ~static_cast<Word>(Loop_control::dependency_length);
auto &parameters = *operand.dependency_length;
dump_operand_literal_integer(parameters.literal_integer, indent_depth + 2);
}
}
void Dump_callbacks::dump_operand_function_control(const Function_control &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "FunctionControl:\n";
Word bits = static_cast<Word>(operand);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Function_control::inline_))
{
write_indent(indent_depth + 1);
ss << "Inline\n";
bits &= ~static_cast<Word>(Function_control::inline_);
}
if(bits & static_cast<Word>(Function_control::dont_inline))
{
write_indent(indent_depth + 1);
ss << "DontInline\n";
bits &= ~static_cast<Word>(Function_control::dont_inline);
}
if(bits & static_cast<Word>(Function_control::pure))
{
write_indent(indent_depth + 1);
ss << "Pure\n";
bits &= ~static_cast<Word>(Function_control::pure);
}
if(bits & static_cast<Word>(Function_control::const_))
{
write_indent(indent_depth + 1);
ss << "Const\n";
bits &= ~static_cast<Word>(Function_control::const_);
}
}
void Dump_callbacks::dump_operand_memory_semantics(const Memory_semantics &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "MemorySemantics:\n";
Word bits = static_cast<Word>(operand);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "Relaxed\n";
return;
}
if(bits & static_cast<Word>(Memory_semantics::acquire))
{
write_indent(indent_depth + 1);
ss << "Acquire\n";
bits &= ~static_cast<Word>(Memory_semantics::acquire);
}
if(bits & static_cast<Word>(Memory_semantics::release))
{
write_indent(indent_depth + 1);
ss << "Release\n";
bits &= ~static_cast<Word>(Memory_semantics::release);
}
if(bits & static_cast<Word>(Memory_semantics::acquire_release))
{
write_indent(indent_depth + 1);
ss << "AcquireRelease\n";
bits &= ~static_cast<Word>(Memory_semantics::acquire_release);
}
if(bits & static_cast<Word>(Memory_semantics::sequentially_consistent))
{
write_indent(indent_depth + 1);
ss << "SequentiallyConsistent\n";
bits &= ~static_cast<Word>(Memory_semantics::sequentially_consistent);
}
if(bits & static_cast<Word>(Memory_semantics::uniform_memory))
{
write_indent(indent_depth + 1);
ss << "UniformMemory\n";
bits &= ~static_cast<Word>(Memory_semantics::uniform_memory);
}
if(bits & static_cast<Word>(Memory_semantics::subgroup_memory))
{
write_indent(indent_depth + 1);
ss << "SubgroupMemory\n";
bits &= ~static_cast<Word>(Memory_semantics::subgroup_memory);
}
if(bits & static_cast<Word>(Memory_semantics::workgroup_memory))
{
write_indent(indent_depth + 1);
ss << "WorkgroupMemory\n";
bits &= ~static_cast<Word>(Memory_semantics::workgroup_memory);
}
if(bits & static_cast<Word>(Memory_semantics::cross_workgroup_memory))
{
write_indent(indent_depth + 1);
ss << "CrossWorkgroupMemory\n";
bits &= ~static_cast<Word>(Memory_semantics::cross_workgroup_memory);
}
if(bits & static_cast<Word>(Memory_semantics::atomic_counter_memory))
{
write_indent(indent_depth + 1);
ss << "AtomicCounterMemory\n";
bits &= ~static_cast<Word>(Memory_semantics::atomic_counter_memory);
}
if(bits & static_cast<Word>(Memory_semantics::image_memory))
{
write_indent(indent_depth + 1);
ss << "ImageMemory\n";
bits &= ~static_cast<Word>(Memory_semantics::image_memory);
}
}
void Dump_callbacks::dump_operand_memory_access(const Memory_access_with_parameters &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "MemoryAccess:\n";
Word bits = static_cast<Word>(operand.value);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Memory_access::volatile_))
{
write_indent(indent_depth + 1);
ss << "Volatile\n";
bits &= ~static_cast<Word>(Memory_access::volatile_);
}
if(bits & static_cast<Word>(Memory_access::aligned))
{
write_indent(indent_depth + 1);
ss << "Aligned:\n";
bits &= ~static_cast<Word>(Memory_access::aligned);
auto &parameters = *operand.aligned;
dump_operand_literal_integer(parameters.literal_integer, indent_depth + 2);
}
if(bits & static_cast<Word>(Memory_access::nontemporal))
{
write_indent(indent_depth + 1);
ss << "Nontemporal\n";
bits &= ~static_cast<Word>(Memory_access::nontemporal);
}
}
void Dump_callbacks::dump_operand_kernel_profiling_info(const Kernel_profiling_info &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "KernelProfilingInfo:\n";
Word bits = static_cast<Word>(operand);
if(bits == 0)
{
write_indent(indent_depth + 1);
ss << "None\n";
return;
}
if(bits & static_cast<Word>(Kernel_profiling_info::cmd_exec_time))
{
write_indent(indent_depth + 1);
ss << "CmdExecTime\n";
bits &= ~static_cast<Word>(Kernel_profiling_info::cmd_exec_time);
}
}
void Dump_callbacks::dump_operand_source_language(const Source_language &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "SourceLanguage: ";
switch(operand)
{
case Source_language::unknown:
ss << "Unknown\n";
return;
case Source_language::essl:
ss << "ESSL\n";
return;
case Source_language::glsl:
ss << "GLSL\n";
return;
case Source_language::open_cl_c:
ss << "OpenCL_C\n";
return;
case Source_language::open_cl_cpp:
ss << "OpenCL_CPP\n";
return;
case Source_language::hlsl:
ss << "HLSL\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_execution_model(const Execution_model &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "ExecutionModel: ";
switch(operand)
{
case Execution_model::vertex:
ss << "Vertex\n";
return;
case Execution_model::tessellation_control:
ss << "TessellationControl\n";
return;
case Execution_model::tessellation_evaluation:
ss << "TessellationEvaluation\n";
return;
case Execution_model::geometry:
ss << "Geometry\n";
return;
case Execution_model::fragment:
ss << "Fragment\n";
return;
case Execution_model::gl_compute:
ss << "GLCompute\n";
return;
case Execution_model::kernel:
ss << "Kernel\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_addressing_model(const Addressing_model &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "AddressingModel: ";
switch(operand)
{
case Addressing_model::logical:
ss << "Logical\n";
return;
case Addressing_model::physical32:
ss << "Physical32\n";
return;
case Addressing_model::physical64:
ss << "Physical64\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_memory_model(const Memory_model &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "MemoryModel: ";
switch(operand)
{
case Memory_model::simple:
ss << "Simple\n";
return;
case Memory_model::glsl450:
ss << "GLSL450\n";
return;
case Memory_model::open_cl:
ss << "OpenCL\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_execution_mode(const Execution_mode_with_parameters &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "ExecutionMode: ";
switch(operand.value)
{
case Execution_mode::invocations:
{
ss << "Invocations:\n";
auto &parameters = util::get<Execution_mode_invocations_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.number_of_invocation_invocations, indent_depth + 1);
return;
}
case Execution_mode::spacing_equal:
ss << "SpacingEqual\n";
return;
case Execution_mode::spacing_fractional_even:
ss << "SpacingFractionalEven\n";
return;
case Execution_mode::spacing_fractional_odd:
ss << "SpacingFractionalOdd\n";
return;
case Execution_mode::vertex_order_cw:
ss << "VertexOrderCw\n";
return;
case Execution_mode::vertex_order_ccw:
ss << "VertexOrderCcw\n";
return;
case Execution_mode::pixel_center_integer:
ss << "PixelCenterInteger\n";
return;
case Execution_mode::origin_upper_left:
ss << "OriginUpperLeft\n";
return;
case Execution_mode::origin_lower_left:
ss << "OriginLowerLeft\n";
return;
case Execution_mode::early_fragment_tests:
ss << "EarlyFragmentTests\n";
return;
case Execution_mode::point_mode:
ss << "PointMode\n";
return;
case Execution_mode::xfb:
ss << "Xfb\n";
return;
case Execution_mode::depth_replacing:
ss << "DepthReplacing\n";
return;
case Execution_mode::depth_greater:
ss << "DepthGreater\n";
return;
case Execution_mode::depth_less:
ss << "DepthLess\n";
return;
case Execution_mode::depth_unchanged:
ss << "DepthUnchanged\n";
return;
case Execution_mode::local_size:
{
ss << "LocalSize:\n";
auto &parameters = util::get<Execution_mode_local_size_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.x_size, indent_depth + 1);
dump_operand_literal_integer(parameters.y_size, indent_depth + 1);
dump_operand_literal_integer(parameters.z_size, indent_depth + 1);
return;
}
case Execution_mode::local_size_hint:
{
ss << "LocalSizeHint:\n";
auto &parameters = util::get<Execution_mode_local_size_hint_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.x_size, indent_depth + 1);
dump_operand_literal_integer(parameters.y_size, indent_depth + 1);
dump_operand_literal_integer(parameters.z_size, indent_depth + 1);
return;
}
case Execution_mode::input_points:
ss << "InputPoints\n";
return;
case Execution_mode::input_lines:
ss << "InputLines\n";
return;
case Execution_mode::input_lines_adjacency:
ss << "InputLinesAdjacency\n";
return;
case Execution_mode::triangles:
ss << "Triangles\n";
return;
case Execution_mode::input_triangles_adjacency:
ss << "InputTrianglesAdjacency\n";
return;
case Execution_mode::quads:
ss << "Quads\n";
return;
case Execution_mode::isolines:
ss << "Isolines\n";
return;
case Execution_mode::output_vertices:
{
ss << "OutputVertices:\n";
auto &parameters = util::get<Execution_mode_output_vertices_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.vertex_count, indent_depth + 1);
return;
}
case Execution_mode::output_points:
ss << "OutputPoints\n";
return;
case Execution_mode::output_line_strip:
ss << "OutputLineStrip\n";
return;
case Execution_mode::output_triangle_strip:
ss << "OutputTriangleStrip\n";
return;
case Execution_mode::vec_type_hint:
{
ss << "VecTypeHint:\n";
auto &parameters = util::get<Execution_mode_vec_type_hint_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.vector_type, indent_depth + 1);
return;
}
case Execution_mode::contraction_off:
ss << "ContractionOff\n";
return;
case Execution_mode::initializer:
ss << "Initializer\n";
return;
case Execution_mode::finalizer:
ss << "Finalizer\n";
return;
case Execution_mode::subgroup_size:
{
ss << "SubgroupSize:\n";
auto &parameters = util::get<Execution_mode_subgroup_size_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.subgroup_size, indent_depth + 1);
return;
}
case Execution_mode::subgroups_per_workgroup:
{
ss << "SubgroupsPerWorkgroup:\n";
auto &parameters = util::get<Execution_mode_subgroups_per_workgroup_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.subgroups_per_workgroup, indent_depth + 1);
return;
}
case Execution_mode::subgroups_per_workgroup_id:
{
ss << "SubgroupsPerWorkgroupId:\n";
auto &parameters = util::get<Execution_mode_subgroups_per_workgroup_id_parameters>(operand.parameters);
dump_operand_id_ref(parameters.subgroups_per_workgroup, indent_depth + 1);
return;
}
case Execution_mode::local_size_id:
{
ss << "LocalSizeId:\n";
auto &parameters = util::get<Execution_mode_local_size_id_parameters>(operand.parameters);
dump_operand_id_ref(parameters.x_size, indent_depth + 1);
dump_operand_id_ref(parameters.y_size, indent_depth + 1);
dump_operand_id_ref(parameters.z_size, indent_depth + 1);
return;
}
case Execution_mode::local_size_hint_id:
{
ss << "LocalSizeHintId:\n";
auto &parameters = util::get<Execution_mode_local_size_hint_id_parameters>(operand.parameters);
dump_operand_id_ref(parameters.local_size_hint, indent_depth + 1);
return;
}
}
ss << "<Unknown> (" << static_cast<Word>(operand.value) << ")\n";
}
void Dump_callbacks::dump_operand_storage_class(const Storage_class &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "StorageClass: ";
switch(operand)
{
case Storage_class::uniform_constant:
ss << "UniformConstant\n";
return;
case Storage_class::input:
ss << "Input\n";
return;
case Storage_class::uniform:
ss << "Uniform\n";
return;
case Storage_class::output:
ss << "Output\n";
return;
case Storage_class::workgroup:
ss << "Workgroup\n";
return;
case Storage_class::cross_workgroup:
ss << "CrossWorkgroup\n";
return;
case Storage_class::private_:
ss << "Private\n";
return;
case Storage_class::function:
ss << "Function\n";
return;
case Storage_class::generic:
ss << "Generic\n";
return;
case Storage_class::push_constant:
ss << "PushConstant\n";
return;
case Storage_class::atomic_counter:
ss << "AtomicCounter\n";
return;
case Storage_class::image:
ss << "Image\n";
return;
case Storage_class::storage_buffer:
ss << "StorageBuffer\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_dim(const Dim &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "Dim: ";
switch(operand)
{
case Dim::_1d:
ss << "1D\n";
return;
case Dim::_2d:
ss << "2D\n";
return;
case Dim::_3d:
ss << "3D\n";
return;
case Dim::cube:
ss << "Cube\n";
return;
case Dim::rect:
ss << "Rect\n";
return;
case Dim::buffer:
ss << "Buffer\n";
return;
case Dim::subpass_data:
ss << "SubpassData\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_sampler_addressing_mode(const Sampler_addressing_mode &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "SamplerAddressingMode: ";
switch(operand)
{
case Sampler_addressing_mode::none:
ss << "None\n";
return;
case Sampler_addressing_mode::clamp_to_edge:
ss << "ClampToEdge\n";
return;
case Sampler_addressing_mode::clamp:
ss << "Clamp\n";
return;
case Sampler_addressing_mode::repeat:
ss << "Repeat\n";
return;
case Sampler_addressing_mode::repeat_mirrored:
ss << "RepeatMirrored\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_sampler_filter_mode(const Sampler_filter_mode &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "SamplerFilterMode: ";
switch(operand)
{
case Sampler_filter_mode::nearest:
ss << "Nearest\n";
return;
case Sampler_filter_mode::linear:
ss << "Linear\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_image_format(const Image_format &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "ImageFormat: ";
switch(operand)
{
case Image_format::unknown:
ss << "Unknown\n";
return;
case Image_format::rgba32f:
ss << "Rgba32f\n";
return;
case Image_format::rgba16f:
ss << "Rgba16f\n";
return;
case Image_format::r32f:
ss << "R32f\n";
return;
case Image_format::rgba8:
ss << "Rgba8\n";
return;
case Image_format::rgba8_snorm:
ss << "Rgba8Snorm\n";
return;
case Image_format::rg32f:
ss << "Rg32f\n";
return;
case Image_format::rg16f:
ss << "Rg16f\n";
return;
case Image_format::r11f_g11f_b10f:
ss << "R11fG11fB10f\n";
return;
case Image_format::r16f:
ss << "R16f\n";
return;
case Image_format::rgba16:
ss << "Rgba16\n";
return;
case Image_format::rgb10a2:
ss << "Rgb10A2\n";
return;
case Image_format::rg16:
ss << "Rg16\n";
return;
case Image_format::rg8:
ss << "Rg8\n";
return;
case Image_format::r16:
ss << "R16\n";
return;
case Image_format::r8:
ss << "R8\n";
return;
case Image_format::rgba16_snorm:
ss << "Rgba16Snorm\n";
return;
case Image_format::rg16_snorm:
ss << "Rg16Snorm\n";
return;
case Image_format::rg8_snorm:
ss << "Rg8Snorm\n";
return;
case Image_format::r16_snorm:
ss << "R16Snorm\n";
return;
case Image_format::r8_snorm:
ss << "R8Snorm\n";
return;
case Image_format::rgba32i:
ss << "Rgba32i\n";
return;
case Image_format::rgba16i:
ss << "Rgba16i\n";
return;
case Image_format::rgba8i:
ss << "Rgba8i\n";
return;
case Image_format::r32i:
ss << "R32i\n";
return;
case Image_format::rg32i:
ss << "Rg32i\n";
return;
case Image_format::rg16i:
ss << "Rg16i\n";
return;
case Image_format::rg8i:
ss << "Rg8i\n";
return;
case Image_format::r16i:
ss << "R16i\n";
return;
case Image_format::r8i:
ss << "R8i\n";
return;
case Image_format::rgba32ui:
ss << "Rgba32ui\n";
return;
case Image_format::rgba16ui:
ss << "Rgba16ui\n";
return;
case Image_format::rgba8ui:
ss << "Rgba8ui\n";
return;
case Image_format::r32ui:
ss << "R32ui\n";
return;
case Image_format::rgb10a2ui:
ss << "Rgb10a2ui\n";
return;
case Image_format::rg32ui:
ss << "Rg32ui\n";
return;
case Image_format::rg16ui:
ss << "Rg16ui\n";
return;
case Image_format::rg8ui:
ss << "Rg8ui\n";
return;
case Image_format::r16ui:
ss << "R16ui\n";
return;
case Image_format::r8ui:
ss << "R8ui\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_image_channel_order(const Image_channel_order &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "ImageChannelOrder: ";
switch(operand)
{
case Image_channel_order::r:
ss << "R\n";
return;
case Image_channel_order::a:
ss << "A\n";
return;
case Image_channel_order::rg:
ss << "RG\n";
return;
case Image_channel_order::ra:
ss << "RA\n";
return;
case Image_channel_order::rgb:
ss << "RGB\n";
return;
case Image_channel_order::rgba:
ss << "RGBA\n";
return;
case Image_channel_order::bgra:
ss << "BGRA\n";
return;
case Image_channel_order::argb:
ss << "ARGB\n";
return;
case Image_channel_order::intensity:
ss << "Intensity\n";
return;
case Image_channel_order::luminance:
ss << "Luminance\n";
return;
case Image_channel_order::rx:
ss << "Rx\n";
return;
case Image_channel_order::r_gx:
ss << "RGx\n";
return;
case Image_channel_order::rg_bx:
ss << "RGBx\n";
return;
case Image_channel_order::depth:
ss << "Depth\n";
return;
case Image_channel_order::depth_stencil:
ss << "DepthStencil\n";
return;
case Image_channel_order::s_rgb:
ss << "sRGB\n";
return;
case Image_channel_order::s_rg_bx:
ss << "sRGBx\n";
return;
case Image_channel_order::s_rgba:
ss << "sRGBA\n";
return;
case Image_channel_order::s_bgra:
ss << "sBGRA\n";
return;
case Image_channel_order::abgr:
ss << "ABGR\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_image_channel_data_type(const Image_channel_data_type &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "ImageChannelDataType: ";
switch(operand)
{
case Image_channel_data_type::snorm_int8:
ss << "SnormInt8\n";
return;
case Image_channel_data_type::snorm_int16:
ss << "SnormInt16\n";
return;
case Image_channel_data_type::unorm_int8:
ss << "UnormInt8\n";
return;
case Image_channel_data_type::unorm_int16:
ss << "UnormInt16\n";
return;
case Image_channel_data_type::unorm_short565:
ss << "UnormShort565\n";
return;
case Image_channel_data_type::unorm_short555:
ss << "UnormShort555\n";
return;
case Image_channel_data_type::unorm_int101010:
ss << "UnormInt101010\n";
return;
case Image_channel_data_type::signed_int8:
ss << "SignedInt8\n";
return;
case Image_channel_data_type::signed_int16:
ss << "SignedInt16\n";
return;
case Image_channel_data_type::signed_int32:
ss << "SignedInt32\n";
return;
case Image_channel_data_type::unsigned_int8:
ss << "UnsignedInt8\n";
return;
case Image_channel_data_type::unsigned_int16:
ss << "UnsignedInt16\n";
return;
case Image_channel_data_type::unsigned_int32:
ss << "UnsignedInt32\n";
return;
case Image_channel_data_type::half_float:
ss << "HalfFloat\n";
return;
case Image_channel_data_type::float_:
ss << "Float\n";
return;
case Image_channel_data_type::unorm_int24:
ss << "UnormInt24\n";
return;
case Image_channel_data_type::unorm_int101010_2:
ss << "UnormInt101010_2\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_fp_rounding_mode(const Fp_rounding_mode &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "FPRoundingMode: ";
switch(operand)
{
case Fp_rounding_mode::rte:
ss << "RTE\n";
return;
case Fp_rounding_mode::rtz:
ss << "RTZ\n";
return;
case Fp_rounding_mode::rtp:
ss << "RTP\n";
return;
case Fp_rounding_mode::rtn:
ss << "RTN\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_linkage_type(const Linkage_type &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LinkageType: ";
switch(operand)
{
case Linkage_type::export_:
ss << "Export\n";
return;
case Linkage_type::import_:
ss << "Import\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_access_qualifier(const Access_qualifier &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "AccessQualifier: ";
switch(operand)
{
case Access_qualifier::read_only:
ss << "ReadOnly\n";
return;
case Access_qualifier::write_only:
ss << "WriteOnly\n";
return;
case Access_qualifier::read_write:
ss << "ReadWrite\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_function_parameter_attribute(const Function_parameter_attribute &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "FunctionParameterAttribute: ";
switch(operand)
{
case Function_parameter_attribute::zext:
ss << "Zext\n";
return;
case Function_parameter_attribute::sext:
ss << "Sext\n";
return;
case Function_parameter_attribute::by_val:
ss << "ByVal\n";
return;
case Function_parameter_attribute::sret:
ss << "Sret\n";
return;
case Function_parameter_attribute::no_alias:
ss << "NoAlias\n";
return;
case Function_parameter_attribute::no_capture:
ss << "NoCapture\n";
return;
case Function_parameter_attribute::no_write:
ss << "NoWrite\n";
return;
case Function_parameter_attribute::no_read_write:
ss << "NoReadWrite\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_decoration(const Decoration_with_parameters &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "Decoration: ";
switch(operand.value)
{
case Decoration::relaxed_precision:
ss << "RelaxedPrecision\n";
return;
case Decoration::spec_id:
{
ss << "SpecId:\n";
auto &parameters = util::get<Decoration_spec_id_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.specialization_constant_id, indent_depth + 1);
return;
}
case Decoration::block:
ss << "Block\n";
return;
case Decoration::buffer_block:
ss << "BufferBlock\n";
return;
case Decoration::row_major:
ss << "RowMajor\n";
return;
case Decoration::col_major:
ss << "ColMajor\n";
return;
case Decoration::array_stride:
{
ss << "ArrayStride:\n";
auto &parameters = util::get<Decoration_array_stride_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.array_stride, indent_depth + 1);
return;
}
case Decoration::matrix_stride:
{
ss << "MatrixStride:\n";
auto &parameters = util::get<Decoration_matrix_stride_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.matrix_stride, indent_depth + 1);
return;
}
case Decoration::glsl_shared:
ss << "GLSLShared\n";
return;
case Decoration::glsl_packed:
ss << "GLSLPacked\n";
return;
case Decoration::c_packed:
ss << "CPacked\n";
return;
case Decoration::built_in:
{
ss << "BuiltIn:\n";
auto &parameters = util::get<Decoration_built_in_parameters>(operand.parameters);
dump_operand_built_in(parameters.built_in, indent_depth + 1);
return;
}
case Decoration::no_perspective:
ss << "NoPerspective\n";
return;
case Decoration::flat:
ss << "Flat\n";
return;
case Decoration::patch:
ss << "Patch\n";
return;
case Decoration::centroid:
ss << "Centroid\n";
return;
case Decoration::sample:
ss << "Sample\n";
return;
case Decoration::invariant:
ss << "Invariant\n";
return;
case Decoration::restrict:
ss << "Restrict\n";
return;
case Decoration::aliased:
ss << "Aliased\n";
return;
case Decoration::volatile_:
ss << "Volatile\n";
return;
case Decoration::constant:
ss << "Constant\n";
return;
case Decoration::coherent:
ss << "Coherent\n";
return;
case Decoration::non_writable:
ss << "NonWritable\n";
return;
case Decoration::non_readable:
ss << "NonReadable\n";
return;
case Decoration::uniform:
ss << "Uniform\n";
return;
case Decoration::saturated_conversion:
ss << "SaturatedConversion\n";
return;
case Decoration::stream:
{
ss << "Stream:\n";
auto &parameters = util::get<Decoration_stream_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.stream_number, indent_depth + 1);
return;
}
case Decoration::location:
{
ss << "Location:\n";
auto &parameters = util::get<Decoration_location_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.location, indent_depth + 1);
return;
}
case Decoration::component:
{
ss << "Component:\n";
auto &parameters = util::get<Decoration_component_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.component, indent_depth + 1);
return;
}
case Decoration::index:
{
ss << "Index:\n";
auto &parameters = util::get<Decoration_index_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.index, indent_depth + 1);
return;
}
case Decoration::binding:
{
ss << "Binding:\n";
auto &parameters = util::get<Decoration_binding_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.binding_point, indent_depth + 1);
return;
}
case Decoration::descriptor_set:
{
ss << "DescriptorSet:\n";
auto &parameters = util::get<Decoration_descriptor_set_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.descriptor_set, indent_depth + 1);
return;
}
case Decoration::offset:
{
ss << "Offset:\n";
auto &parameters = util::get<Decoration_offset_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.byte_offset, indent_depth + 1);
return;
}
case Decoration::xfb_buffer:
{
ss << "XfbBuffer:\n";
auto &parameters = util::get<Decoration_xfb_buffer_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.xfb_buffer_number, indent_depth + 1);
return;
}
case Decoration::xfb_stride:
{
ss << "XfbStride:\n";
auto &parameters = util::get<Decoration_xfb_stride_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.xfb_stride, indent_depth + 1);
return;
}
case Decoration::func_param_attr:
{
ss << "FuncParamAttr:\n";
auto &parameters = util::get<Decoration_func_param_attr_parameters>(operand.parameters);
dump_operand_function_parameter_attribute(parameters.function_parameter_attribute, indent_depth + 1);
return;
}
case Decoration::fp_rounding_mode:
{
ss << "FPRoundingMode:\n";
auto &parameters = util::get<Decoration_fp_rounding_mode_parameters>(operand.parameters);
dump_operand_fp_rounding_mode(parameters.floating_point_rounding_mode, indent_depth + 1);
return;
}
case Decoration::fp_fast_math_mode:
{
ss << "FPFastMathMode:\n";
auto &parameters = util::get<Decoration_fp_fast_math_mode_parameters>(operand.parameters);
dump_operand_fp_fast_math_mode(parameters.fast_math_mode, indent_depth + 1);
return;
}
case Decoration::linkage_attributes:
{
ss << "LinkageAttributes:\n";
auto &parameters = util::get<Decoration_linkage_attributes_parameters>(operand.parameters);
dump_operand_literal_string(parameters.name, indent_depth + 1);
dump_operand_linkage_type(parameters.linkage_type, indent_depth + 1);
return;
}
case Decoration::no_contraction:
ss << "NoContraction\n";
return;
case Decoration::input_attachment_index:
{
ss << "InputAttachmentIndex:\n";
auto &parameters = util::get<Decoration_input_attachment_index_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.attachment_index, indent_depth + 1);
return;
}
case Decoration::alignment:
{
ss << "Alignment:\n";
auto &parameters = util::get<Decoration_alignment_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.alignment, indent_depth + 1);
return;
}
case Decoration::max_byte_offset:
{
ss << "MaxByteOffset:\n";
auto &parameters = util::get<Decoration_max_byte_offset_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.max_byte_offset, indent_depth + 1);
return;
}
case Decoration::alignment_id:
{
ss << "AlignmentId:\n";
auto &parameters = util::get<Decoration_alignment_id_parameters>(operand.parameters);
dump_operand_id_ref(parameters.alignment, indent_depth + 1);
return;
}
case Decoration::max_byte_offset_id:
{
ss << "MaxByteOffsetId:\n";
auto &parameters = util::get<Decoration_max_byte_offset_id_parameters>(operand.parameters);
dump_operand_id_ref(parameters.max_byte_offset, indent_depth + 1);
return;
}
case Decoration::override_coverage_nv:
ss << "OverrideCoverageNV\n";
return;
case Decoration::passthrough_nv:
ss << "PassthroughNV\n";
return;
case Decoration::viewport_relative_nv:
ss << "ViewportRelativeNV\n";
return;
case Decoration::secondary_viewport_relative_nv:
{
ss << "SecondaryViewportRelativeNV:\n";
auto &parameters = util::get<Decoration_secondary_viewport_relative_nv_parameters>(operand.parameters);
dump_operand_literal_integer(parameters.offset, indent_depth + 1);
return;
}
}
ss << "<Unknown> (" << static_cast<Word>(operand.value) << ")\n";
}
void Dump_callbacks::dump_operand_built_in(const Built_in &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "BuiltIn: ";
switch(operand)
{
case Built_in::position:
ss << "Position\n";
return;
case Built_in::point_size:
ss << "PointSize\n";
return;
case Built_in::clip_distance:
ss << "ClipDistance\n";
return;
case Built_in::cull_distance:
ss << "CullDistance\n";
return;
case Built_in::vertex_id:
ss << "VertexId\n";
return;
case Built_in::instance_id:
ss << "InstanceId\n";
return;
case Built_in::primitive_id:
ss << "PrimitiveId\n";
return;
case Built_in::invocation_id:
ss << "InvocationId\n";
return;
case Built_in::layer:
ss << "Layer\n";
return;
case Built_in::viewport_index:
ss << "ViewportIndex\n";
return;
case Built_in::tess_level_outer:
ss << "TessLevelOuter\n";
return;
case Built_in::tess_level_inner:
ss << "TessLevelInner\n";
return;
case Built_in::tess_coord:
ss << "TessCoord\n";
return;
case Built_in::patch_vertices:
ss << "PatchVertices\n";
return;
case Built_in::frag_coord:
ss << "FragCoord\n";
return;
case Built_in::point_coord:
ss << "PointCoord\n";
return;
case Built_in::front_facing:
ss << "FrontFacing\n";
return;
case Built_in::sample_id:
ss << "SampleId\n";
return;
case Built_in::sample_position:
ss << "SamplePosition\n";
return;
case Built_in::sample_mask:
ss << "SampleMask\n";
return;
case Built_in::frag_depth:
ss << "FragDepth\n";
return;
case Built_in::helper_invocation:
ss << "HelperInvocation\n";
return;
case Built_in::num_workgroups:
ss << "NumWorkgroups\n";
return;
case Built_in::workgroup_size:
ss << "WorkgroupSize\n";
return;
case Built_in::workgroup_id:
ss << "WorkgroupId\n";
return;
case Built_in::local_invocation_id:
ss << "LocalInvocationId\n";
return;
case Built_in::global_invocation_id:
ss << "GlobalInvocationId\n";
return;
case Built_in::local_invocation_index:
ss << "LocalInvocationIndex\n";
return;
case Built_in::work_dim:
ss << "WorkDim\n";
return;
case Built_in::global_size:
ss << "GlobalSize\n";
return;
case Built_in::enqueued_workgroup_size:
ss << "EnqueuedWorkgroupSize\n";
return;
case Built_in::global_offset:
ss << "GlobalOffset\n";
return;
case Built_in::global_linear_id:
ss << "GlobalLinearId\n";
return;
case Built_in::subgroup_size:
ss << "SubgroupSize\n";
return;
case Built_in::subgroup_max_size:
ss << "SubgroupMaxSize\n";
return;
case Built_in::num_subgroups:
ss << "NumSubgroups\n";
return;
case Built_in::num_enqueued_subgroups:
ss << "NumEnqueuedSubgroups\n";
return;
case Built_in::subgroup_id:
ss << "SubgroupId\n";
return;
case Built_in::subgroup_local_invocation_id:
ss << "SubgroupLocalInvocationId\n";
return;
case Built_in::vertex_index:
ss << "VertexIndex\n";
return;
case Built_in::instance_index:
ss << "InstanceIndex\n";
return;
case Built_in::subgroup_eq_mask_khr:
ss << "SubgroupEqMaskKHR\n";
return;
case Built_in::subgroup_ge_mask_khr:
ss << "SubgroupGeMaskKHR\n";
return;
case Built_in::subgroup_gt_mask_khr:
ss << "SubgroupGtMaskKHR\n";
return;
case Built_in::subgroup_le_mask_khr:
ss << "SubgroupLeMaskKHR\n";
return;
case Built_in::subgroup_lt_mask_khr:
ss << "SubgroupLtMaskKHR\n";
return;
case Built_in::base_vertex:
ss << "BaseVertex\n";
return;
case Built_in::base_instance:
ss << "BaseInstance\n";
return;
case Built_in::draw_index:
ss << "DrawIndex\n";
return;
case Built_in::device_index:
ss << "DeviceIndex\n";
return;
case Built_in::view_index:
ss << "ViewIndex\n";
return;
case Built_in::viewport_mask_nv:
ss << "ViewportMaskNV\n";
return;
case Built_in::secondary_position_nv:
ss << "SecondaryPositionNV\n";
return;
case Built_in::secondary_viewport_mask_nv:
ss << "SecondaryViewportMaskNV\n";
return;
case Built_in::position_per_view_nv:
ss << "PositionPerViewNV\n";
return;
case Built_in::viewport_mask_per_view_nv:
ss << "ViewportMaskPerViewNV\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_scope(const Scope &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "Scope: ";
switch(operand)
{
case Scope::cross_device:
ss << "CrossDevice\n";
return;
case Scope::device:
ss << "Device\n";
return;
case Scope::workgroup:
ss << "Workgroup\n";
return;
case Scope::subgroup:
ss << "Subgroup\n";
return;
case Scope::invocation:
ss << "Invocation\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_group_operation(const Group_operation &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "GroupOperation: ";
switch(operand)
{
case Group_operation::reduce:
ss << "Reduce\n";
return;
case Group_operation::inclusive_scan:
ss << "InclusiveScan\n";
return;
case Group_operation::exclusive_scan:
ss << "ExclusiveScan\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_kernel_enqueue_flags(const Kernel_enqueue_flags &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "KernelEnqueueFlags: ";
switch(operand)
{
case Kernel_enqueue_flags::no_wait:
ss << "NoWait\n";
return;
case Kernel_enqueue_flags::wait_kernel:
ss << "WaitKernel\n";
return;
case Kernel_enqueue_flags::wait_work_group:
ss << "WaitWorkGroup\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_capability(const Capability &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "Capability: ";
switch(operand)
{
case Capability::matrix:
ss << "Matrix\n";
return;
case Capability::shader:
ss << "Shader\n";
return;
case Capability::geometry:
ss << "Geometry\n";
return;
case Capability::tessellation:
ss << "Tessellation\n";
return;
case Capability::addresses:
ss << "Addresses\n";
return;
case Capability::linkage:
ss << "Linkage\n";
return;
case Capability::kernel:
ss << "Kernel\n";
return;
case Capability::vector16:
ss << "Vector16\n";
return;
case Capability::float16_buffer:
ss << "Float16Buffer\n";
return;
case Capability::float16:
ss << "Float16\n";
return;
case Capability::float64:
ss << "Float64\n";
return;
case Capability::int64:
ss << "Int64\n";
return;
case Capability::int64_atomics:
ss << "Int64Atomics\n";
return;
case Capability::image_basic:
ss << "ImageBasic\n";
return;
case Capability::image_read_write:
ss << "ImageReadWrite\n";
return;
case Capability::image_mipmap:
ss << "ImageMipmap\n";
return;
case Capability::pipes:
ss << "Pipes\n";
return;
case Capability::groups:
ss << "Groups\n";
return;
case Capability::device_enqueue:
ss << "DeviceEnqueue\n";
return;
case Capability::literal_sampler:
ss << "LiteralSampler\n";
return;
case Capability::atomic_storage:
ss << "AtomicStorage\n";
return;
case Capability::int16:
ss << "Int16\n";
return;
case Capability::tessellation_point_size:
ss << "TessellationPointSize\n";
return;
case Capability::geometry_point_size:
ss << "GeometryPointSize\n";
return;
case Capability::image_gather_extended:
ss << "ImageGatherExtended\n";
return;
case Capability::storage_image_multisample:
ss << "StorageImageMultisample\n";
return;
case Capability::uniform_buffer_array_dynamic_indexing:
ss << "UniformBufferArrayDynamicIndexing\n";
return;
case Capability::sampled_image_array_dynamic_indexing:
ss << "SampledImageArrayDynamicIndexing\n";
return;
case Capability::storage_buffer_array_dynamic_indexing:
ss << "StorageBufferArrayDynamicIndexing\n";
return;
case Capability::storage_image_array_dynamic_indexing:
ss << "StorageImageArrayDynamicIndexing\n";
return;
case Capability::clip_distance:
ss << "ClipDistance\n";
return;
case Capability::cull_distance:
ss << "CullDistance\n";
return;
case Capability::image_cube_array:
ss << "ImageCubeArray\n";
return;
case Capability::sample_rate_shading:
ss << "SampleRateShading\n";
return;
case Capability::image_rect:
ss << "ImageRect\n";
return;
case Capability::sampled_rect:
ss << "SampledRect\n";
return;
case Capability::generic_pointer:
ss << "GenericPointer\n";
return;
case Capability::int8:
ss << "Int8\n";
return;
case Capability::input_attachment:
ss << "InputAttachment\n";
return;
case Capability::sparse_residency:
ss << "SparseResidency\n";
return;
case Capability::min_lod:
ss << "MinLod\n";
return;
case Capability::sampled1d:
ss << "Sampled1D\n";
return;
case Capability::image1d:
ss << "Image1D\n";
return;
case Capability::sampled_cube_array:
ss << "SampledCubeArray\n";
return;
case Capability::sampled_buffer:
ss << "SampledBuffer\n";
return;
case Capability::image_buffer:
ss << "ImageBuffer\n";
return;
case Capability::image_ms_array:
ss << "ImageMSArray\n";
return;
case Capability::storage_image_extended_formats:
ss << "StorageImageExtendedFormats\n";
return;
case Capability::image_query:
ss << "ImageQuery\n";
return;
case Capability::derivative_control:
ss << "DerivativeControl\n";
return;
case Capability::interpolation_function:
ss << "InterpolationFunction\n";
return;
case Capability::transform_feedback:
ss << "TransformFeedback\n";
return;
case Capability::geometry_streams:
ss << "GeometryStreams\n";
return;
case Capability::storage_image_read_without_format:
ss << "StorageImageReadWithoutFormat\n";
return;
case Capability::storage_image_write_without_format:
ss << "StorageImageWriteWithoutFormat\n";
return;
case Capability::multi_viewport:
ss << "MultiViewport\n";
return;
case Capability::subgroup_dispatch:
ss << "SubgroupDispatch\n";
return;
case Capability::named_barrier:
ss << "NamedBarrier\n";
return;
case Capability::pipe_storage:
ss << "PipeStorage\n";
return;
case Capability::subgroup_ballot_khr:
ss << "SubgroupBallotKHR\n";
return;
case Capability::draw_parameters:
ss << "DrawParameters\n";
return;
case Capability::subgroup_vote_khr:
ss << "SubgroupVoteKHR\n";
return;
case Capability::storage_buffer16_bit_access:
ss << "StorageBuffer16BitAccess\n";
return;
case Capability::uniform_and_storage_buffer16_bit_access:
ss << "UniformAndStorageBuffer16BitAccess\n";
return;
case Capability::storage_push_constant16:
ss << "StoragePushConstant16\n";
return;
case Capability::storage_input_output16:
ss << "StorageInputOutput16\n";
return;
case Capability::device_group:
ss << "DeviceGroup\n";
return;
case Capability::multi_view:
ss << "MultiView\n";
return;
case Capability::variable_pointers_storage_buffer:
ss << "VariablePointersStorageBuffer\n";
return;
case Capability::variable_pointers:
ss << "VariablePointers\n";
return;
case Capability::sample_mask_override_coverage_nv:
ss << "SampleMaskOverrideCoverageNV\n";
return;
case Capability::geometry_shader_passthrough_nv:
ss << "GeometryShaderPassthroughNV\n";
return;
case Capability::shader_viewport_index_layer_nv:
ss << "ShaderViewportIndexLayerNV\n";
return;
case Capability::shader_viewport_mask_nv:
ss << "ShaderViewportMaskNV\n";
return;
case Capability::shader_stereo_view_nv:
ss << "ShaderStereoViewNV\n";
return;
case Capability::per_view_attributes_nv:
ss << "PerViewAttributesNV\n";
return;
}
ss << "<Unknown> (" << static_cast<Word>(operand) << ")\n";
}
void Dump_callbacks::dump_operand_id_result_type(const Id_result_type &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "IdResultType: " << std::dec << operand << '\n';
}
void Dump_callbacks::dump_operand_id_result(const Id_result &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "IdResult: " << std::dec << operand << '\n';
}
void Dump_callbacks::dump_operand_id_memory_semantics(const Id_memory_semantics &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "IdMemorySemantics: " << std::dec << operand << '\n';
}
void Dump_callbacks::dump_operand_id_scope(const Id_scope &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "IdScope: " << std::dec << operand << '\n';
}
void Dump_callbacks::dump_operand_id_ref(const Id_ref &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "IdRef: " << std::dec << operand << '\n';
}
void Dump_callbacks::dump_operand_literal_integer(const Literal_integer &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LiteralInteger: ";
ss << "0x" << std::hex << operand << std::dec;
ss << " u64=" << static_cast<std::uint64_t>(operand);
ss << " s64=" << static_cast<std::int64_t>(operand);
ss << " u32=" << static_cast<std::uint32_t>(operand);
ss << " s32=" << static_cast<std::int32_t>(operand) << '\n';
}
void Dump_callbacks::dump_operand_literal_string(const Literal_string &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LiteralString: ";
json::ast::String_value::write(ss, static_cast<std::string>(operand));
ss << '\n';
}
void Dump_callbacks::dump_operand_literal_context_dependent_number(const Literal_context_dependent_number &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LiteralContextDependentNumber: ";
ss << "{";
auto separator = "";
static_assert(std::is_same<decltype(operand), const std::vector<Word> &>::value, "");
for(auto word : operand)
{
ss << separator;
separator = ", ";
ss << "0x" << std::hex << word;
}
ss << "}\n";
}
void Dump_callbacks::dump_operand_literal_ext_inst_integer(const Literal_ext_inst_integer &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LiteralExtInstInteger: ";
ss << std::dec << operand << '\n';
}
void Dump_callbacks::dump_operand_literal_spec_constant_op_integer(const Literal_spec_constant_op_integer &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "LiteralSpecConstantOpInteger: ";
ss << get_enumerant_name(operand) << '\n';
}
void Dump_callbacks::dump_operand_pair_literal_integer_id_ref(const Pair_literal_integer_id_ref &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "PairLiteralIntegerIdRef:\n";
dump_operand_literal_integer(operand.part_1, indent_depth + 1);
dump_operand_id_ref(operand.part_2, indent_depth + 1);
}
void Dump_callbacks::dump_operand_pair_id_ref_literal_integer(const Pair_id_ref_literal_integer &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "PairIdRefLiteralInteger:\n";
dump_operand_id_ref(operand.part_1, indent_depth + 1);
dump_operand_literal_integer(operand.part_2, indent_depth + 1);
}
void Dump_callbacks::dump_operand_pair_id_ref_id_ref(const Pair_id_ref_id_ref &operand, std::size_t indent_depth)
{
write_indent(indent_depth);
ss << "PairIdRefIdRef:\n";
dump_operand_id_ref(operand.part_1, indent_depth + 1);
dump_operand_id_ref(operand.part_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_nop(Op_nop instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpNop:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_undef(Op_undef instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUndef:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_source_continued(Op_source_continued instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSourceContinued:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_literal_string(instruction.continued_source, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_source(Op_source instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSource:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_source_language(instruction.source_language, indent_depth + 1);
dump_operand_literal_integer(instruction.version, indent_depth + 1);
if(instruction.file)
dump_operand_id_ref(*instruction.file, indent_depth + 1);
if(instruction.source)
dump_operand_literal_string(*instruction.source, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_source_extension(Op_source_extension instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSourceExtension:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_literal_string(instruction.extension, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_name(Op_name instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpName:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.target, indent_depth + 1);
dump_operand_literal_string(instruction.name, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_member_name(Op_member_name instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMemberName:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.type, indent_depth + 1);
dump_operand_literal_integer(instruction.member, indent_depth + 1);
dump_operand_literal_string(instruction.name, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_string(Op_string instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpString:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_string(instruction.string, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_line(Op_line instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLine:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.file, indent_depth + 1);
dump_operand_literal_integer(instruction.line, indent_depth + 1);
dump_operand_literal_integer(instruction.column, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_extension(Op_extension instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtension:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_literal_string(instruction.name, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_ext_inst_import(Op_ext_inst_import instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInstImport:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_string(instruction.name, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_ext_inst(Op_ext_inst instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
dump_operand_literal_ext_inst_integer(instruction.instruction, indent_depth + 1);
for(auto &operand : instruction.operand_1_operand_2)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_memory_model(Op_memory_model instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMemoryModel:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_addressing_model(instruction.addressing_model, indent_depth + 1);
dump_operand_memory_model(instruction.memory_model, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_entry_point(Op_entry_point instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEntryPoint:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_execution_model(instruction.execution_model, indent_depth + 1);
dump_operand_id_ref(instruction.entry_point, indent_depth + 1);
dump_operand_literal_string(instruction.name, indent_depth + 1);
for(auto &operand : instruction.interface)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_execution_mode(Op_execution_mode instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExecutionMode:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.entry_point, indent_depth + 1);
dump_operand_execution_mode(instruction.mode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_capability(Op_capability instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCapability:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_capability(instruction.capability, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_void(Op_type_void instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeVoid:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_bool(Op_type_bool instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeBool:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_int(Op_type_int instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeInt:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_integer(instruction.width, indent_depth + 1);
dump_operand_literal_integer(instruction.signedness, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_float(Op_type_float instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeFloat:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_integer(instruction.width, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_vector(Op_type_vector instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeVector:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.component_type, indent_depth + 1);
dump_operand_literal_integer(instruction.component_count, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_matrix(Op_type_matrix instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeMatrix:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.column_type, indent_depth + 1);
dump_operand_literal_integer(instruction.column_count, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_image(Op_type_image instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeImage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_type, indent_depth + 1);
dump_operand_dim(instruction.dim, indent_depth + 1);
dump_operand_literal_integer(instruction.depth, indent_depth + 1);
dump_operand_literal_integer(instruction.arrayed, indent_depth + 1);
dump_operand_literal_integer(instruction.ms, indent_depth + 1);
dump_operand_literal_integer(instruction.sampled, indent_depth + 1);
dump_operand_image_format(instruction.image_format, indent_depth + 1);
if(instruction.access_qualifier)
dump_operand_access_qualifier(*instruction.access_qualifier, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_sampler(Op_type_sampler instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeSampler:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_sampled_image(Op_type_sampled_image instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeSampledImage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image_type, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_array(Op_type_array instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeArray:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.element_type, indent_depth + 1);
dump_operand_id_ref(instruction.length, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_runtime_array(Op_type_runtime_array instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeRuntimeArray:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.element_type, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_struct(Op_type_struct instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeStruct:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
for(auto &operand : instruction.member_0_type_member_1_type)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_opaque(Op_type_opaque instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeOpaque:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_string(instruction.the_name_of_the_opaque_type, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_pointer(Op_type_pointer instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypePointer:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_storage_class(instruction.storage_class, indent_depth + 1);
dump_operand_id_ref(instruction.type, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_function(Op_type_function instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeFunction:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.return_type, indent_depth + 1);
for(auto &operand : instruction.parameter_0_type_parameter_1_type)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_event(Op_type_event instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeEvent:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_device_event(Op_type_device_event instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeDeviceEvent:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_reserve_id(Op_type_reserve_id instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeReserveId:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_queue(Op_type_queue instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeQueue:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_pipe(Op_type_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypePipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_access_qualifier(instruction.qualifier, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_forward_pointer(Op_type_forward_pointer instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeForwardPointer:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pointer_type, indent_depth + 1);
dump_operand_storage_class(instruction.storage_class, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant_true(Op_constant_true instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstantTrue:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant_false(Op_constant_false instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstantFalse:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant(Op_constant instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstant:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_context_dependent_number(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant_composite(Op_constant_composite instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstantComposite:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
for(auto &operand : instruction.constituents)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant_sampler(Op_constant_sampler instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstantSampler:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_sampler_addressing_mode(instruction.sampler_addressing_mode, indent_depth + 1);
dump_operand_literal_integer(instruction.param, indent_depth + 1);
dump_operand_sampler_filter_mode(instruction.sampler_filter_mode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant_null(Op_constant_null instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstantNull:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_spec_constant_true(Op_spec_constant_true instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSpecConstantTrue:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_spec_constant_false(Op_spec_constant_false instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSpecConstantFalse:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_spec_constant(Op_spec_constant instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSpecConstant:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_context_dependent_number(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_spec_constant_composite(Op_spec_constant_composite instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSpecConstantComposite:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
for(auto &operand : instruction.constituents)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_spec_constant_op(Op_spec_constant_op instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSpecConstantOp:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_spec_constant_op_integer(instruction.opcode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_function(Op_function instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFunction:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_function_control(instruction.function_control, indent_depth + 1);
dump_operand_id_ref(instruction.function_type, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_function_parameter(Op_function_parameter instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFunctionParameter:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_function_end(Op_function_end instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFunctionEnd:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_function_call(Op_function_call instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFunctionCall:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.function, indent_depth + 1);
for(auto &operand : instruction.argument_0_argument_1)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_variable(Op_variable instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpVariable:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_storage_class(instruction.storage_class, indent_depth + 1);
if(instruction.initializer)
dump_operand_id_ref(*instruction.initializer, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_texel_pointer(Op_image_texel_pointer instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageTexelPointer:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.sample, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_load(Op_load instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLoad:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
if(instruction.memory_access)
dump_operand_memory_access(*instruction.memory_access, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_store(Op_store instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpStore:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_ref(instruction.object, indent_depth + 1);
if(instruction.memory_access)
dump_operand_memory_access(*instruction.memory_access, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_copy_memory(Op_copy_memory instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCopyMemory:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.target, indent_depth + 1);
dump_operand_id_ref(instruction.source, indent_depth + 1);
if(instruction.memory_access)
dump_operand_memory_access(*instruction.memory_access, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_copy_memory_sized(Op_copy_memory_sized instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCopyMemorySized:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.target, indent_depth + 1);
dump_operand_id_ref(instruction.source, indent_depth + 1);
dump_operand_id_ref(instruction.size, indent_depth + 1);
if(instruction.memory_access)
dump_operand_memory_access(*instruction.memory_access, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_access_chain(Op_access_chain instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAccessChain:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
for(auto &operand : instruction.indexes)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_in_bounds_access_chain(Op_in_bounds_access_chain instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpInBoundsAccessChain:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
for(auto &operand : instruction.indexes)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_ptr_access_chain(Op_ptr_access_chain instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpPtrAccessChain:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.element, indent_depth + 1);
for(auto &operand : instruction.indexes)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_array_length(Op_array_length instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpArrayLength:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.structure, indent_depth + 1);
dump_operand_literal_integer(instruction.array_member, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_generic_ptr_mem_semantics(Op_generic_ptr_mem_semantics instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGenericPtrMemSemantics:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_in_bounds_ptr_access_chain(Op_in_bounds_ptr_access_chain instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpInBoundsPtrAccessChain:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.element, indent_depth + 1);
for(auto &operand : instruction.indexes)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_decorate(Op_decorate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDecorate:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.target, indent_depth + 1);
dump_operand_decoration(instruction.decoration, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_member_decorate(Op_member_decorate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMemberDecorate:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.structure_type, indent_depth + 1);
dump_operand_literal_integer(instruction.member, indent_depth + 1);
dump_operand_decoration(instruction.decoration, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_decoration_group(Op_decoration_group instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDecorationGroup:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_decorate(Op_group_decorate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupDecorate:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.decoration_group, indent_depth + 1);
for(auto &operand : instruction.targets)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_member_decorate(Op_group_member_decorate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupMemberDecorate:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.decoration_group, indent_depth + 1);
for(auto &operand : instruction.targets)
dump_operand_pair_id_ref_literal_integer(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_vector_extract_dynamic(Op_vector_extract_dynamic instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpVectorExtractDynamic:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
dump_operand_id_ref(instruction.index, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_vector_insert_dynamic(Op_vector_insert_dynamic instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpVectorInsertDynamic:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
dump_operand_id_ref(instruction.component, indent_depth + 1);
dump_operand_id_ref(instruction.index, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_vector_shuffle(Op_vector_shuffle instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpVectorShuffle:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector_1, indent_depth + 1);
dump_operand_id_ref(instruction.vector_2, indent_depth + 1);
for(auto &operand : instruction.components)
dump_operand_literal_integer(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_composite_construct(Op_composite_construct instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCompositeConstruct:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
for(auto &operand : instruction.constituents)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_composite_extract(Op_composite_extract instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCompositeExtract:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.composite, indent_depth + 1);
for(auto &operand : instruction.indexes)
dump_operand_literal_integer(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_composite_insert(Op_composite_insert instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCompositeInsert:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.object, indent_depth + 1);
dump_operand_id_ref(instruction.composite, indent_depth + 1);
for(auto &operand : instruction.indexes)
dump_operand_literal_integer(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_copy_object(Op_copy_object instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCopyObject:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_transpose(Op_transpose instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTranspose:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.matrix, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_sampled_image(Op_sampled_image instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSampledImage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.sampler, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_implicit_lod(Op_image_sample_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_explicit_lod(Op_image_sample_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_dref_implicit_lod(Op_image_sample_dref_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleDrefImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_dref_explicit_lod(Op_image_sample_dref_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleDrefExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_proj_implicit_lod(Op_image_sample_proj_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleProjImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_proj_explicit_lod(Op_image_sample_proj_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleProjExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_proj_dref_implicit_lod(Op_image_sample_proj_dref_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleProjDrefImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sample_proj_dref_explicit_lod(Op_image_sample_proj_dref_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSampleProjDrefExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_fetch(Op_image_fetch instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageFetch:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_gather(Op_image_gather instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageGather:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.component, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_dref_gather(Op_image_dref_gather instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageDrefGather:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_read(Op_image_read instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageRead:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_write(Op_image_write instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageWrite:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.texel, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image(Op_image instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_format(Op_image_query_format instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQueryFormat:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_order(Op_image_query_order instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQueryOrder:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_size_lod(Op_image_query_size_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQuerySizeLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.level_of_detail, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_size(Op_image_query_size instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQuerySize:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_lod(Op_image_query_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQueryLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_levels(Op_image_query_levels instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQueryLevels:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_query_samples(Op_image_query_samples instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageQuerySamples:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_convert_f_to_u(Op_convert_f_to_u instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConvertFToU:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.float_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_convert_f_to_s(Op_convert_f_to_s instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConvertFToS:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.float_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_convert_s_to_f(Op_convert_s_to_f instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConvertSToF:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.signed_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_convert_u_to_f(Op_convert_u_to_f instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConvertUToF:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.unsigned_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_convert(Op_u_convert instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUConvert:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.unsigned_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_convert(Op_s_convert instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSConvert:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.signed_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_convert(Op_f_convert instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFConvert:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.float_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_quantize_to_f16(Op_quantize_to_f16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpQuantizeToF16:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_convert_ptr_to_u(Op_convert_ptr_to_u instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConvertPtrToU:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_sat_convert_s_to_u(Op_sat_convert_s_to_u instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSatConvertSToU:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.signed_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_sat_convert_u_to_s(Op_sat_convert_u_to_s instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSatConvertUToS:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.unsigned_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_convert_u_to_ptr(Op_convert_u_to_ptr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConvertUToPtr:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.integer_value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_ptr_cast_to_generic(Op_ptr_cast_to_generic instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpPtrCastToGeneric:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_generic_cast_to_ptr(Op_generic_cast_to_ptr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGenericCastToPtr:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_generic_cast_to_ptr_explicit(Op_generic_cast_to_ptr_explicit instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGenericCastToPtrExplicit:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_storage_class(instruction.storage, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bitcast(Op_bitcast instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitcast:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_negate(Op_s_negate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSNegate:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_negate(Op_f_negate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFNegate:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_add(Op_i_add instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIAdd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_add(Op_f_add instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFAdd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_sub(Op_i_sub instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpISub:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_sub(Op_f_sub instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFSub:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_mul(Op_i_mul instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIMul:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_mul(Op_f_mul instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFMul:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_div(Op_u_div instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUDiv:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_div(Op_s_div instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSDiv:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_div(Op_f_div instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFDiv:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_mod(Op_u_mod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUMod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_rem(Op_s_rem instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSRem:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_mod(Op_s_mod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSMod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_rem(Op_f_rem instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFRem:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_mod(Op_f_mod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFMod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_vector_times_scalar(Op_vector_times_scalar instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpVectorTimesScalar:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
dump_operand_id_ref(instruction.scalar, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_matrix_times_scalar(Op_matrix_times_scalar instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMatrixTimesScalar:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.matrix, indent_depth + 1);
dump_operand_id_ref(instruction.scalar, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_vector_times_matrix(Op_vector_times_matrix instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpVectorTimesMatrix:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
dump_operand_id_ref(instruction.matrix, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_matrix_times_vector(Op_matrix_times_vector instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMatrixTimesVector:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.matrix, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_matrix_times_matrix(Op_matrix_times_matrix instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMatrixTimesMatrix:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.left_matrix, indent_depth + 1);
dump_operand_id_ref(instruction.right_matrix, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_outer_product(Op_outer_product instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpOuterProduct:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector_1, indent_depth + 1);
dump_operand_id_ref(instruction.vector_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_dot(Op_dot instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDot:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector_1, indent_depth + 1);
dump_operand_id_ref(instruction.vector_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_add_carry(Op_i_add_carry instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIAddCarry:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_sub_borrow(Op_i_sub_borrow instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpISubBorrow:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_mul_extended(Op_u_mul_extended instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUMulExtended:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_mul_extended(Op_s_mul_extended instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSMulExtended:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_any(Op_any instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAny:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_all(Op_all instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAll:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.vector, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_is_nan(Op_is_nan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIsNan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_is_inf(Op_is_inf instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIsInf:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_is_finite(Op_is_finite instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIsFinite:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_is_normal(Op_is_normal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIsNormal:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_sign_bit_set(Op_sign_bit_set instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSignBitSet:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_less_or_greater(Op_less_or_greater instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLessOrGreater:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_ordered(Op_ordered instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpOrdered:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_unordered(Op_unordered instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUnordered:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_logical_equal(Op_logical_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLogicalEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_logical_not_equal(Op_logical_not_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLogicalNotEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_logical_or(Op_logical_or instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLogicalOr:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_logical_and(Op_logical_and instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLogicalAnd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_logical_not(Op_logical_not instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLogicalNot:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_select(Op_select instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSelect:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.condition, indent_depth + 1);
dump_operand_id_ref(instruction.object_1, indent_depth + 1);
dump_operand_id_ref(instruction.object_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_equal(Op_i_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_i_not_equal(Op_i_not_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpINotEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_greater_than(Op_u_greater_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUGreaterThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_greater_than(Op_s_greater_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSGreaterThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_greater_than_equal(Op_u_greater_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUGreaterThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_greater_than_equal(Op_s_greater_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSGreaterThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_less_than(Op_u_less_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpULessThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_less_than(Op_s_less_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSLessThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_u_less_than_equal(Op_u_less_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpULessThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_s_less_than_equal(Op_s_less_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSLessThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_ord_equal(Op_f_ord_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFOrdEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_unord_equal(Op_f_unord_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFUnordEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_ord_not_equal(Op_f_ord_not_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFOrdNotEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_unord_not_equal(Op_f_unord_not_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFUnordNotEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_ord_less_than(Op_f_ord_less_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFOrdLessThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_unord_less_than(Op_f_unord_less_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFUnordLessThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_ord_greater_than(Op_f_ord_greater_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFOrdGreaterThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_unord_greater_than(Op_f_unord_greater_than instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFUnordGreaterThan:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_ord_less_than_equal(Op_f_ord_less_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFOrdLessThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_unord_less_than_equal(Op_f_unord_less_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFUnordLessThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_ord_greater_than_equal(Op_f_ord_greater_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFOrdGreaterThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_f_unord_greater_than_equal(Op_f_unord_greater_than_equal instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFUnordGreaterThanEqual:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_shift_right_logical(Op_shift_right_logical instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpShiftRightLogical:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.shift, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_shift_right_arithmetic(Op_shift_right_arithmetic instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpShiftRightArithmetic:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.shift, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_shift_left_logical(Op_shift_left_logical instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpShiftLeftLogical:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.shift, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bitwise_or(Op_bitwise_or instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitwiseOr:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bitwise_xor(Op_bitwise_xor instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitwiseXor:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bitwise_and(Op_bitwise_and instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitwiseAnd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand_1, indent_depth + 1);
dump_operand_id_ref(instruction.operand_2, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_not(Op_not instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpNot:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bit_field_insert(Op_bit_field_insert instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitFieldInsert:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.insert, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.count, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bit_field_s_extract(Op_bit_field_s_extract instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitFieldSExtract:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.count, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bit_field_u_extract(Op_bit_field_u_extract instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitFieldUExtract:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.count, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bit_reverse(Op_bit_reverse instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitReverse:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_bit_count(Op_bit_count instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBitCount:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.base, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_d_pdx(Op_d_pdx instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDPdx:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_d_pdy(Op_d_pdy instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDPdy:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_fwidth(Op_fwidth instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFwidth:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_d_pdx_fine(Op_d_pdx_fine instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDPdxFine:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_d_pdy_fine(Op_d_pdy_fine instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDPdyFine:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_fwidth_fine(Op_fwidth_fine instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFwidthFine:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_d_pdx_coarse(Op_d_pdx_coarse instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDPdxCoarse:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_d_pdy_coarse(Op_d_pdy_coarse instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDPdyCoarse:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_fwidth_coarse(Op_fwidth_coarse instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpFwidthCoarse:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_emit_vertex(Op_emit_vertex instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEmitVertex:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_end_primitive(Op_end_primitive instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEndPrimitive:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_emit_stream_vertex(Op_emit_stream_vertex instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEmitStreamVertex:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.stream, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_end_stream_primitive(Op_end_stream_primitive instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEndStreamPrimitive:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.stream, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_control_barrier(Op_control_barrier instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpControlBarrier:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_scope(instruction.memory, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_memory_barrier(Op_memory_barrier instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMemoryBarrier:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_scope(instruction.memory, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_load(Op_atomic_load instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicLoad:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_store(Op_atomic_store instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicStore:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_exchange(Op_atomic_exchange instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicExchange:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_compare_exchange(Op_atomic_compare_exchange instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicCompareExchange:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.equal, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.unequal, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
dump_operand_id_ref(instruction.comparator, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_compare_exchange_weak(Op_atomic_compare_exchange_weak instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicCompareExchangeWeak:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.equal, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.unequal, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
dump_operand_id_ref(instruction.comparator, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_i_increment(Op_atomic_i_increment instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicIIncrement:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_i_decrement(Op_atomic_i_decrement instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicIDecrement:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_i_add(Op_atomic_i_add instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicIAdd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_i_sub(Op_atomic_i_sub instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicISub:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_s_min(Op_atomic_s_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicSMin:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_u_min(Op_atomic_u_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicUMin:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_s_max(Op_atomic_s_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicSMax:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_u_max(Op_atomic_u_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicUMax:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_and(Op_atomic_and instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicAnd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_or(Op_atomic_or instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicOr:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_xor(Op_atomic_xor instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicXor:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_phi(Op_phi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpPhi:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
for(auto &operand : instruction.variable_parent)
dump_operand_pair_id_ref_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_loop_merge(Op_loop_merge instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLoopMerge:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.merge_block, indent_depth + 1);
dump_operand_id_ref(instruction.continue_target, indent_depth + 1);
dump_operand_loop_control(instruction.loop_control, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_selection_merge(Op_selection_merge instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSelectionMerge:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.merge_block, indent_depth + 1);
dump_operand_selection_control(instruction.selection_control, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_label(Op_label instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLabel:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_branch(Op_branch instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBranch:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.target_label, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_branch_conditional(Op_branch_conditional instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBranchConditional:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.condition, indent_depth + 1);
dump_operand_id_ref(instruction.true_label, indent_depth + 1);
dump_operand_id_ref(instruction.false_label, indent_depth + 1);
for(auto &operand : instruction.branch_weights)
dump_operand_literal_integer(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_switch(Op_switch instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSwitch:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.selector, indent_depth + 1);
dump_operand_id_ref(instruction.default_, indent_depth + 1);
for(auto &operand : instruction.target)
dump_operand_pair_literal_integer_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_kill(Op_kill instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpKill:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_return(Op_return instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReturn:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_return_value(Op_return_value instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReturnValue:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_unreachable(Op_unreachable instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpUnreachable:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_lifetime_start(Op_lifetime_start instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLifetimeStart:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_literal_integer(instruction.size, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_lifetime_stop(Op_lifetime_stop instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpLifetimeStop:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_literal_integer(instruction.size, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_async_copy(Op_group_async_copy instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupAsyncCopy:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.destination, indent_depth + 1);
dump_operand_id_ref(instruction.source, indent_depth + 1);
dump_operand_id_ref(instruction.num_elements, indent_depth + 1);
dump_operand_id_ref(instruction.stride, indent_depth + 1);
dump_operand_id_ref(instruction.event, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_wait_events(Op_group_wait_events instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupWaitEvents:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.num_events, indent_depth + 1);
dump_operand_id_ref(instruction.events_list, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_all(Op_group_all instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupAll:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.predicate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_any(Op_group_any instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupAny:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.predicate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_broadcast(Op_group_broadcast instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupBroadcast:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
dump_operand_id_ref(instruction.local_id, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_i_add(Op_group_i_add instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupIAdd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_f_add(Op_group_f_add instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupFAdd:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_f_min(Op_group_f_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupFMin:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_u_min(Op_group_u_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupUMin:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_s_min(Op_group_s_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupSMin:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_f_max(Op_group_f_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupFMax:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_u_max(Op_group_u_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupUMax:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_s_max(Op_group_s_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupSMax:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_group_operation(instruction.operation, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_read_pipe(Op_read_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReadPipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_write_pipe(Op_write_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpWritePipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_reserved_read_pipe(Op_reserved_read_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReservedReadPipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
dump_operand_id_ref(instruction.index, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_reserved_write_pipe(Op_reserved_write_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReservedWritePipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
dump_operand_id_ref(instruction.index, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_reserve_read_pipe_packets(Op_reserve_read_pipe_packets instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReserveReadPipePackets:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.num_packets, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_reserve_write_pipe_packets(Op_reserve_write_pipe_packets instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReserveWritePipePackets:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.num_packets, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_commit_read_pipe(Op_commit_read_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCommitReadPipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_commit_write_pipe(Op_commit_write_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCommitWritePipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_is_valid_reserve_id(Op_is_valid_reserve_id instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIsValidReserveId:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_num_pipe_packets(Op_get_num_pipe_packets instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetNumPipePackets:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_max_pipe_packets(Op_get_max_pipe_packets instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetMaxPipePackets:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_reserve_read_pipe_packets(Op_group_reserve_read_pipe_packets instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupReserveReadPipePackets:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.num_packets, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_reserve_write_pipe_packets(Op_group_reserve_write_pipe_packets instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupReserveWritePipePackets:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.num_packets, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_commit_read_pipe(Op_group_commit_read_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupCommitReadPipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_group_commit_write_pipe(Op_group_commit_write_pipe instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGroupCommitWritePipe:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_scope(instruction.execution, indent_depth + 1);
dump_operand_id_ref(instruction.pipe, indent_depth + 1);
dump_operand_id_ref(instruction.reserve_id, indent_depth + 1);
dump_operand_id_ref(instruction.packet_size, indent_depth + 1);
dump_operand_id_ref(instruction.packet_alignment, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_enqueue_marker(Op_enqueue_marker instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEnqueueMarker:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.queue, indent_depth + 1);
dump_operand_id_ref(instruction.num_events, indent_depth + 1);
dump_operand_id_ref(instruction.wait_events, indent_depth + 1);
dump_operand_id_ref(instruction.ret_event, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_enqueue_kernel(Op_enqueue_kernel instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpEnqueueKernel:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.queue, indent_depth + 1);
dump_operand_id_ref(instruction.flags, indent_depth + 1);
dump_operand_id_ref(instruction.nd_range, indent_depth + 1);
dump_operand_id_ref(instruction.num_events, indent_depth + 1);
dump_operand_id_ref(instruction.wait_events, indent_depth + 1);
dump_operand_id_ref(instruction.ret_event, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
for(auto &operand : instruction.local_size)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_kernel_n_drange_sub_group_count(Op_get_kernel_n_drange_sub_group_count instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetKernelNDrangeSubGroupCount:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.nd_range, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_kernel_n_drange_max_sub_group_size(Op_get_kernel_n_drange_max_sub_group_size instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetKernelNDrangeMaxSubGroupSize:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.nd_range, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_kernel_work_group_size(Op_get_kernel_work_group_size instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetKernelWorkGroupSize:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_kernel_preferred_work_group_size_multiple(Op_get_kernel_preferred_work_group_size_multiple instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetKernelPreferredWorkGroupSizeMultiple:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_retain_event(Op_retain_event instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpRetainEvent:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.event, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_release_event(Op_release_event instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpReleaseEvent:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.event, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_create_user_event(Op_create_user_event instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCreateUserEvent:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_is_valid_event(Op_is_valid_event instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpIsValidEvent:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.event, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_set_user_event_status(Op_set_user_event_status instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSetUserEventStatus:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.event, indent_depth + 1);
dump_operand_id_ref(instruction.status, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_capture_event_profiling_info(Op_capture_event_profiling_info instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCaptureEventProfilingInfo:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.event, indent_depth + 1);
dump_operand_id_ref(instruction.profiling_info, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_default_queue(Op_get_default_queue instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetDefaultQueue:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_build_nd_range(Op_build_nd_range instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpBuildNDRange:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.global_work_size, indent_depth + 1);
dump_operand_id_ref(instruction.local_work_size, indent_depth + 1);
dump_operand_id_ref(instruction.global_work_offset, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_implicit_lod(Op_image_sparse_sample_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_explicit_lod(Op_image_sparse_sample_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_dref_implicit_lod(Op_image_sparse_sample_dref_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleDrefImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_dref_explicit_lod(Op_image_sparse_sample_dref_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleDrefExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_proj_implicit_lod(Op_image_sparse_sample_proj_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleProjImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_proj_explicit_lod(Op_image_sparse_sample_proj_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleProjExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_proj_dref_implicit_lod(Op_image_sparse_sample_proj_dref_implicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleProjDrefImplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_sample_proj_dref_explicit_lod(Op_image_sparse_sample_proj_dref_explicit_lod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseSampleProjDrefExplicitLod:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
dump_operand_image_operands(instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_fetch(Op_image_sparse_fetch instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseFetch:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_gather(Op_image_sparse_gather instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseGather:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.component, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_dref_gather(Op_image_sparse_dref_gather instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseDrefGather:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.sampled_image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
dump_operand_id_ref(instruction.d_ref, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_texels_resident(Op_image_sparse_texels_resident instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseTexelsResident:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.resident_code, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_no_line(Op_no_line instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpNoLine:\n";
static_cast<void>(instruction);
}
void Dump_callbacks::handle_instruction_op_atomic_flag_test_and_set(Op_atomic_flag_test_and_set instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicFlagTestAndSet:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_atomic_flag_clear(Op_atomic_flag_clear instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpAtomicFlagClear:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
dump_operand_id_scope(instruction.scope, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_image_sparse_read(Op_image_sparse_read instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpImageSparseRead:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.image, indent_depth + 1);
dump_operand_id_ref(instruction.coordinate, indent_depth + 1);
if(instruction.image_operands)
dump_operand_image_operands(*instruction.image_operands, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_size_of(Op_size_of instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSizeOf:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pointer, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_pipe_storage(Op_type_pipe_storage instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypePipeStorage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_constant_pipe_storage(Op_constant_pipe_storage instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpConstantPipeStorage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_literal_integer(instruction.packet_size, indent_depth + 1);
dump_operand_literal_integer(instruction.packet_alignment, indent_depth + 1);
dump_operand_literal_integer(instruction.capacity, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_create_pipe_from_pipe_storage(Op_create_pipe_from_pipe_storage instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpCreatePipeFromPipeStorage:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.pipe_storage, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_kernel_local_size_for_subgroup_count(Op_get_kernel_local_size_for_subgroup_count instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetKernelLocalSizeForSubgroupCount:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.subgroup_count, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_get_kernel_max_num_subgroups(Op_get_kernel_max_num_subgroups instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpGetKernelMaxNumSubgroups:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.invoke, indent_depth + 1);
dump_operand_id_ref(instruction.param, indent_depth + 1);
dump_operand_id_ref(instruction.param_size, indent_depth + 1);
dump_operand_id_ref(instruction.param_align, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_type_named_barrier(Op_type_named_barrier instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpTypeNamedBarrier:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result(instruction.result, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_named_barrier_initialize(Op_named_barrier_initialize instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpNamedBarrierInitialize:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.subgroup_count, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_memory_named_barrier(Op_memory_named_barrier instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpMemoryNamedBarrier:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.named_barrier, indent_depth + 1);
dump_operand_id_scope(instruction.memory, indent_depth + 1);
dump_operand_id_memory_semantics(instruction.semantics, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_module_processed(Op_module_processed instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpModuleProcessed:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_literal_string(instruction.process, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_execution_mode_id(Op_execution_mode_id instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExecutionModeId:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.entry_point, indent_depth + 1);
dump_operand_execution_mode(instruction.mode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_decorate_id(Op_decorate_id instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpDecorateId:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_ref(instruction.target, indent_depth + 1);
dump_operand_decoration(instruction.decoration, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_subgroup_ballot_khr(Op_subgroup_ballot_khr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSubgroupBallotKHR:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.predicate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_subgroup_first_invocation_khr(Op_subgroup_first_invocation_khr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSubgroupFirstInvocationKHR:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_subgroup_all_khr(Op_subgroup_all_khr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSubgroupAllKHR:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.predicate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_subgroup_any_khr(Op_subgroup_any_khr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSubgroupAnyKHR:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.predicate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_subgroup_all_equal_khr(Op_subgroup_all_equal_khr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSubgroupAllEqualKHR:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.predicate, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_op_subgroup_read_invocation_khr(Op_subgroup_read_invocation_khr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpSubgroupReadInvocationKHR:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.value, indent_depth + 1);
dump_operand_id_ref(instruction.index, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_acos(Open_cl_std_op_acos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "acos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_acosh(Open_cl_std_op_acosh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "acosh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_acospi(Open_cl_std_op_acospi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "acospi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_asin(Open_cl_std_op_asin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "asin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_asinh(Open_cl_std_op_asinh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "asinh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_asinpi(Open_cl_std_op_asinpi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "asinpi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_atan(Open_cl_std_op_atan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "atan\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_atan2(Open_cl_std_op_atan2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "atan2\n";
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_atanh(Open_cl_std_op_atanh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "atanh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_atanpi(Open_cl_std_op_atanpi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "atanpi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_atan2pi(Open_cl_std_op_atan2pi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "atan2pi\n";
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_cbrt(Open_cl_std_op_cbrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "cbrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_ceil(Open_cl_std_op_ceil instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "ceil\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_copysign(Open_cl_std_op_copysign instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "copysign\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_cos(Open_cl_std_op_cos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "cos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_cosh(Open_cl_std_op_cosh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "cosh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_cospi(Open_cl_std_op_cospi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "cospi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_erfc(Open_cl_std_op_erfc instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "erfc\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_erf(Open_cl_std_op_erf instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "erf\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_exp(Open_cl_std_op_exp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "exp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_exp2(Open_cl_std_op_exp2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "exp2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_exp10(Open_cl_std_op_exp10 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "exp10\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_expm1(Open_cl_std_op_expm1 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "expm1\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fabs(Open_cl_std_op_fabs instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fabs\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fdim(Open_cl_std_op_fdim instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fdim\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_floor(Open_cl_std_op_floor instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "floor\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fma(Open_cl_std_op_fma instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fma\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fmax(Open_cl_std_op_fmax instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fmax\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fmin(Open_cl_std_op_fmin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fmin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fmod(Open_cl_std_op_fmod instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fmod\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fract(Open_cl_std_op_fract instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fract\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.ptr, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_frexp(Open_cl_std_op_frexp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "frexp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.exp, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_hypot(Open_cl_std_op_hypot instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "hypot\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_ilogb(Open_cl_std_op_ilogb instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "ilogb\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_ldexp(Open_cl_std_op_ldexp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "ldexp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.k, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_lgamma(Open_cl_std_op_lgamma instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "lgamma\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_lgamma_r(Open_cl_std_op_lgamma_r instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "lgamma_r\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.signp, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_log(Open_cl_std_op_log instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "log\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_log2(Open_cl_std_op_log2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "log2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_log10(Open_cl_std_op_log10 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "log10\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_log1p(Open_cl_std_op_log1p instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "log1p\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_logb(Open_cl_std_op_logb instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "logb\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_mad(Open_cl_std_op_mad instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "mad\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_maxmag(Open_cl_std_op_maxmag instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "maxmag\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_minmag(Open_cl_std_op_minmag instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "minmag\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_modf(Open_cl_std_op_modf instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "modf\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.iptr, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_nan(Open_cl_std_op_nan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "nan\n";
dump_operand_id_ref(instruction.nancode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_nextafter(Open_cl_std_op_nextafter instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "nextafter\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_pow(Open_cl_std_op_pow instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "pow\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_pown(Open_cl_std_op_pown instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "pown\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_powr(Open_cl_std_op_powr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "powr\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_remainder(Open_cl_std_op_remainder instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "remainder\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_remquo(Open_cl_std_op_remquo instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "remquo\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.quo, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_rint(Open_cl_std_op_rint instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "rint\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_rootn(Open_cl_std_op_rootn instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "rootn\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_round(Open_cl_std_op_round instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "round\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_rsqrt(Open_cl_std_op_rsqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "rsqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_sin(Open_cl_std_op_sin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "sin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_sincos(Open_cl_std_op_sincos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "sincos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.cosval, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_sinh(Open_cl_std_op_sinh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "sinh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_sinpi(Open_cl_std_op_sinpi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "sinpi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_sqrt(Open_cl_std_op_sqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "sqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_tan(Open_cl_std_op_tan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "tan\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_tanh(Open_cl_std_op_tanh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "tanh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_tanpi(Open_cl_std_op_tanpi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "tanpi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_tgamma(Open_cl_std_op_tgamma instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "tgamma\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_trunc(Open_cl_std_op_trunc instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "trunc\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_cos(Open_cl_std_op_half_cos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_cos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_divide(Open_cl_std_op_half_divide instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_divide\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_exp(Open_cl_std_op_half_exp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_exp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_exp2(Open_cl_std_op_half_exp2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_exp2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_exp10(Open_cl_std_op_half_exp10 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_exp10\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_log(Open_cl_std_op_half_log instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_log\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_log2(Open_cl_std_op_half_log2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_log2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_log10(Open_cl_std_op_half_log10 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_log10\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_powr(Open_cl_std_op_half_powr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_powr\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_recip(Open_cl_std_op_half_recip instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_recip\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_rsqrt(Open_cl_std_op_half_rsqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_rsqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_sin(Open_cl_std_op_half_sin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_sin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_sqrt(Open_cl_std_op_half_sqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_sqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_half_tan(Open_cl_std_op_half_tan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "half_tan\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_cos(Open_cl_std_op_native_cos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_cos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_divide(Open_cl_std_op_native_divide instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_divide\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_exp(Open_cl_std_op_native_exp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_exp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_exp2(Open_cl_std_op_native_exp2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_exp2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_exp10(Open_cl_std_op_native_exp10 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_exp10\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_log(Open_cl_std_op_native_log instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_log\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_log2(Open_cl_std_op_native_log2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_log2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_log10(Open_cl_std_op_native_log10 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_log10\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_powr(Open_cl_std_op_native_powr instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_powr\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_recip(Open_cl_std_op_native_recip instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_recip\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_rsqrt(Open_cl_std_op_native_rsqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_rsqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_sin(Open_cl_std_op_native_sin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_sin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_sqrt(Open_cl_std_op_native_sqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_sqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_native_tan(Open_cl_std_op_native_tan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "native_tan\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_abs(Open_cl_std_op_s_abs instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_abs\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_abs_diff(Open_cl_std_op_s_abs_diff instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_abs_diff\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_add_sat(Open_cl_std_op_s_add_sat instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_add_sat\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_add_sat(Open_cl_std_op_u_add_sat instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_add_sat\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_hadd(Open_cl_std_op_s_hadd instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_hadd\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_hadd(Open_cl_std_op_u_hadd instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_hadd\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_rhadd(Open_cl_std_op_s_rhadd instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_rhadd\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_rhadd(Open_cl_std_op_u_rhadd instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_rhadd\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_clamp(Open_cl_std_op_s_clamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_clamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.minval, indent_depth + 1);
dump_operand_id_ref(instruction.maxval, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_clamp(Open_cl_std_op_u_clamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_clamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.minval, indent_depth + 1);
dump_operand_id_ref(instruction.maxval, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_clz(Open_cl_std_op_clz instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "clz\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_ctz(Open_cl_std_op_ctz instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "ctz\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_mad_hi(Open_cl_std_op_s_mad_hi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_mad_hi\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_mad_sat(Open_cl_std_op_u_mad_sat instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_mad_sat\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.z, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_mad_sat(Open_cl_std_op_s_mad_sat instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_mad_sat\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.z, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_max(Open_cl_std_op_s_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_max\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_max(Open_cl_std_op_u_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_max\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_min(Open_cl_std_op_s_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_min\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_min(Open_cl_std_op_u_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_min\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_mul_hi(Open_cl_std_op_s_mul_hi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_mul_hi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_rotate(Open_cl_std_op_rotate instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "rotate\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
dump_operand_id_ref(instruction.i, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_sub_sat(Open_cl_std_op_s_sub_sat instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_sub_sat\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_sub_sat(Open_cl_std_op_u_sub_sat instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_sub_sat\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_upsample(Open_cl_std_op_u_upsample instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_upsample\n";
dump_operand_id_ref(instruction.hi, indent_depth + 1);
dump_operand_id_ref(instruction.lo, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_upsample(Open_cl_std_op_s_upsample instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_upsample\n";
dump_operand_id_ref(instruction.hi, indent_depth + 1);
dump_operand_id_ref(instruction.lo, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_popcount(Open_cl_std_op_popcount instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "popcount\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_mad24(Open_cl_std_op_s_mad24 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_mad24\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.z, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_mad24(Open_cl_std_op_u_mad24 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_mad24\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.z, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_s_mul24(Open_cl_std_op_s_mul24 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "s_mul24\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_mul24(Open_cl_std_op_u_mul24 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_mul24\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_abs(Open_cl_std_op_u_abs instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_abs\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_abs_diff(Open_cl_std_op_u_abs_diff instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_abs_diff\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_mul_hi(Open_cl_std_op_u_mul_hi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_mul_hi\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_u_mad_hi(Open_cl_std_op_u_mad_hi instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "u_mad_hi\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fclamp(Open_cl_std_op_fclamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fclamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.minval, indent_depth + 1);
dump_operand_id_ref(instruction.maxval, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_degrees(Open_cl_std_op_degrees instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "degrees\n";
dump_operand_id_ref(instruction.radians, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fmax_common(Open_cl_std_op_fmax_common instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fmax_common\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fmin_common(Open_cl_std_op_fmin_common instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fmin_common\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_mix(Open_cl_std_op_mix instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "mix\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.a, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_radians(Open_cl_std_op_radians instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "radians\n";
dump_operand_id_ref(instruction.degrees, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_step(Open_cl_std_op_step instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "step\n";
dump_operand_id_ref(instruction.edge, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_smoothstep(Open_cl_std_op_smoothstep instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "smoothstep\n";
dump_operand_id_ref(instruction.edge0, indent_depth + 1);
dump_operand_id_ref(instruction.edge1, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_sign(Open_cl_std_op_sign instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "sign\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_cross(Open_cl_std_op_cross instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "cross\n";
dump_operand_id_ref(instruction.p0, indent_depth + 1);
dump_operand_id_ref(instruction.p1, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_distance(Open_cl_std_op_distance instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "distance\n";
dump_operand_id_ref(instruction.p0, indent_depth + 1);
dump_operand_id_ref(instruction.p1, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_length(Open_cl_std_op_length instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "length\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_normalize(Open_cl_std_op_normalize instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "normalize\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fast_distance(Open_cl_std_op_fast_distance instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fast_distance\n";
dump_operand_id_ref(instruction.p0, indent_depth + 1);
dump_operand_id_ref(instruction.p1, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fast_length(Open_cl_std_op_fast_length instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fast_length\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_fast_normalize(Open_cl_std_op_fast_normalize instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "fast_normalize\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_bitselect(Open_cl_std_op_bitselect instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "bitselect\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_select(Open_cl_std_op_select instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "select\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vloadn(Open_cl_std_op_vloadn instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vloadn\n";
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
dump_operand_literal_integer(instruction.n, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstoren(Open_cl_std_op_vstoren instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstoren\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vload_half(Open_cl_std_op_vload_half instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vload_half\n";
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vload_halfn(Open_cl_std_op_vload_halfn instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vload_halfn\n";
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
dump_operand_literal_integer(instruction.n, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstore_half(Open_cl_std_op_vstore_half instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstore_half\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstore_half_r(Open_cl_std_op_vstore_half_r instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstore_half_r\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
dump_operand_fp_rounding_mode(instruction.mode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstore_halfn(Open_cl_std_op_vstore_halfn instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstore_halfn\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstore_halfn_r(Open_cl_std_op_vstore_halfn_r instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstore_halfn_r\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
dump_operand_fp_rounding_mode(instruction.mode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vloada_halfn(Open_cl_std_op_vloada_halfn instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vloada_halfn\n";
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
dump_operand_literal_integer(instruction.n, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstorea_halfn(Open_cl_std_op_vstorea_halfn instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstorea_halfn\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_vstorea_halfn_r(Open_cl_std_op_vstorea_halfn_r instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "vstorea_halfn_r\n";
dump_operand_id_ref(instruction.data, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
dump_operand_id_ref(instruction.p, indent_depth + 1);
dump_operand_fp_rounding_mode(instruction.mode, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_shuffle(Open_cl_std_op_shuffle instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "shuffle\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.shuffle_mask, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_shuffle2(Open_cl_std_op_shuffle2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "shuffle2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.shuffle_mask, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_printf(Open_cl_std_op_printf instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "printf\n";
dump_operand_id_ref(instruction.format, indent_depth + 1);
for(auto &operand : instruction.additional_arguments)
dump_operand_id_ref(operand, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_open_cl_std_op_prefetch(Open_cl_std_op_prefetch instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "prefetch\n";
dump_operand_id_ref(instruction.ptr, indent_depth + 1);
dump_operand_id_ref(instruction.num_elements, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_round(Glsl_std_450_op_round instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Round\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_round_even(Glsl_std_450_op_round_even instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "RoundEven\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_trunc(Glsl_std_450_op_trunc instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Trunc\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_f_abs(Glsl_std_450_op_f_abs instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FAbs\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_s_abs(Glsl_std_450_op_s_abs instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "SAbs\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_f_sign(Glsl_std_450_op_f_sign instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FSign\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_s_sign(Glsl_std_450_op_s_sign instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "SSign\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_floor(Glsl_std_450_op_floor instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Floor\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_ceil(Glsl_std_450_op_ceil instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Ceil\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_fract(Glsl_std_450_op_fract instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Fract\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_radians(Glsl_std_450_op_radians instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Radians\n";
dump_operand_id_ref(instruction.degrees, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_degrees(Glsl_std_450_op_degrees instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Degrees\n";
dump_operand_id_ref(instruction.radians, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_sin(Glsl_std_450_op_sin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Sin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_cos(Glsl_std_450_op_cos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Cos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_tan(Glsl_std_450_op_tan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Tan\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_asin(Glsl_std_450_op_asin instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Asin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_acos(Glsl_std_450_op_acos instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Acos\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_atan(Glsl_std_450_op_atan instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Atan\n";
dump_operand_id_ref(instruction.y_over_x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_sinh(Glsl_std_450_op_sinh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Sinh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_cosh(Glsl_std_450_op_cosh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Cosh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_tanh(Glsl_std_450_op_tanh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Tanh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_asinh(Glsl_std_450_op_asinh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Asinh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_acosh(Glsl_std_450_op_acosh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Acosh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_atanh(Glsl_std_450_op_atanh instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Atanh\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_atan2(Glsl_std_450_op_atan2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Atan2\n";
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pow(Glsl_std_450_op_pow instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Pow\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_exp(Glsl_std_450_op_exp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Exp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_log(Glsl_std_450_op_log instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Log\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_exp2(Glsl_std_450_op_exp2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Exp2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_log2(Glsl_std_450_op_log2 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Log2\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_sqrt(Glsl_std_450_op_sqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Sqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_inverse_sqrt(Glsl_std_450_op_inverse_sqrt instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "InverseSqrt\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_determinant(Glsl_std_450_op_determinant instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Determinant\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_matrix_inverse(Glsl_std_450_op_matrix_inverse instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "MatrixInverse\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_modf(Glsl_std_450_op_modf instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Modf\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.i, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_modf_struct(Glsl_std_450_op_modf_struct instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "ModfStruct\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_f_min(Glsl_std_450_op_f_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FMin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_u_min(Glsl_std_450_op_u_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UMin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_s_min(Glsl_std_450_op_s_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "SMin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_f_max(Glsl_std_450_op_f_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FMax\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_u_max(Glsl_std_450_op_u_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UMax\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_s_max(Glsl_std_450_op_s_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "SMax\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_f_clamp(Glsl_std_450_op_f_clamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FClamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.min_val, indent_depth + 1);
dump_operand_id_ref(instruction.max_val, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_u_clamp(Glsl_std_450_op_u_clamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UClamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.min_val, indent_depth + 1);
dump_operand_id_ref(instruction.max_val, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_s_clamp(Glsl_std_450_op_s_clamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "SClamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.min_val, indent_depth + 1);
dump_operand_id_ref(instruction.max_val, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_f_mix(Glsl_std_450_op_f_mix instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FMix\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.a, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_i_mix(Glsl_std_450_op_i_mix instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "IMix\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
dump_operand_id_ref(instruction.a, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_step(Glsl_std_450_op_step instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Step\n";
dump_operand_id_ref(instruction.edge, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_smooth_step(Glsl_std_450_op_smooth_step instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "SmoothStep\n";
dump_operand_id_ref(instruction.edge0, indent_depth + 1);
dump_operand_id_ref(instruction.edge1, indent_depth + 1);
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_fma(Glsl_std_450_op_fma instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Fma\n";
dump_operand_id_ref(instruction.a, indent_depth + 1);
dump_operand_id_ref(instruction.b, indent_depth + 1);
dump_operand_id_ref(instruction.c, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_frexp(Glsl_std_450_op_frexp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Frexp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.exp, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_frexp_struct(Glsl_std_450_op_frexp_struct instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FrexpStruct\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_ldexp(Glsl_std_450_op_ldexp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Ldexp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.exp, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pack_snorm4x8(Glsl_std_450_op_pack_snorm4x8 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "PackSnorm4x8\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pack_unorm4x8(Glsl_std_450_op_pack_unorm4x8 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "PackUnorm4x8\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pack_snorm2x16(Glsl_std_450_op_pack_snorm2x16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "PackSnorm2x16\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pack_unorm2x16(Glsl_std_450_op_pack_unorm2x16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "PackUnorm2x16\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pack_half2x16(Glsl_std_450_op_pack_half2x16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "PackHalf2x16\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_pack_double2x32(Glsl_std_450_op_pack_double2x32 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "PackDouble2x32\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_unpack_snorm2x16(Glsl_std_450_op_unpack_snorm2x16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UnpackSnorm2x16\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_unpack_unorm2x16(Glsl_std_450_op_unpack_unorm2x16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UnpackUnorm2x16\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_unpack_half2x16(Glsl_std_450_op_unpack_half2x16 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UnpackHalf2x16\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_unpack_snorm4x8(Glsl_std_450_op_unpack_snorm4x8 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UnpackSnorm4x8\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_unpack_unorm4x8(Glsl_std_450_op_unpack_unorm4x8 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UnpackUnorm4x8\n";
dump_operand_id_ref(instruction.p, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_unpack_double2x32(Glsl_std_450_op_unpack_double2x32 instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "UnpackDouble2x32\n";
dump_operand_id_ref(instruction.v, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_length(Glsl_std_450_op_length instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Length\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_distance(Glsl_std_450_op_distance instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Distance\n";
dump_operand_id_ref(instruction.p0, indent_depth + 1);
dump_operand_id_ref(instruction.p1, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_cross(Glsl_std_450_op_cross instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Cross\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_normalize(Glsl_std_450_op_normalize instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Normalize\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_face_forward(Glsl_std_450_op_face_forward instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FaceForward\n";
dump_operand_id_ref(instruction.n, indent_depth + 1);
dump_operand_id_ref(instruction.i, indent_depth + 1);
dump_operand_id_ref(instruction.nref, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_reflect(Glsl_std_450_op_reflect instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Reflect\n";
dump_operand_id_ref(instruction.i, indent_depth + 1);
dump_operand_id_ref(instruction.n, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_refract(Glsl_std_450_op_refract instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "Refract\n";
dump_operand_id_ref(instruction.i, indent_depth + 1);
dump_operand_id_ref(instruction.n, indent_depth + 1);
dump_operand_id_ref(instruction.eta, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_find_i_lsb(Glsl_std_450_op_find_i_lsb instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FindILsb\n";
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_find_s_msb(Glsl_std_450_op_find_s_msb instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FindSMsb\n";
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_find_u_msb(Glsl_std_450_op_find_u_msb instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "FindUMsb\n";
dump_operand_id_ref(instruction.value, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_interpolate_at_centroid(Glsl_std_450_op_interpolate_at_centroid instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "InterpolateAtCentroid\n";
dump_operand_id_ref(instruction.interpolant, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_interpolate_at_sample(Glsl_std_450_op_interpolate_at_sample instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "InterpolateAtSample\n";
dump_operand_id_ref(instruction.interpolant, indent_depth + 1);
dump_operand_id_ref(instruction.sample, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_interpolate_at_offset(Glsl_std_450_op_interpolate_at_offset instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "InterpolateAtOffset\n";
dump_operand_id_ref(instruction.interpolant, indent_depth + 1);
dump_operand_id_ref(instruction.offset, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_n_min(Glsl_std_450_op_n_min instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "NMin\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_n_max(Glsl_std_450_op_n_max instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "NMax\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.y, indent_depth + 1);
}
void Dump_callbacks::handle_instruction_glsl_std_450_op_n_clamp(Glsl_std_450_op_n_clamp instruction, std::size_t instruction_start_index)
{
ss << "0x" << std::hex;
ss.width(8);
ss << instruction_start_index << ": OpExtInst:\n";
constexpr std::size_t indent_depth = 0;
dump_operand_id_result_type(instruction.result_type, indent_depth + 1);
dump_operand_id_result(instruction.result, indent_depth + 1);
dump_operand_id_ref(instruction.set, indent_depth + 1);
write_indent(indent_depth + 1);
ss << "NClamp\n";
dump_operand_id_ref(instruction.x, indent_depth + 1);
dump_operand_id_ref(instruction.min_val, indent_depth + 1);
dump_operand_id_ref(instruction.max_val, indent_depth + 1);
}
class Parser final
{
Parser(const Parser &) = delete;
Parser &operator =(const Parser &) = delete;
private:
struct Id_state
{
util::optional<Extension_instruction_set> instruction_set;
util::optional<std::size_t> type_word_count;
util::optional<std::size_t> value_word_count;
};
private:
Parser_callbacks &parser_callbacks;
std::vector<Id_state> id_states;
const Word *shader_words;
std::size_t shader_size;
private:
Parser(Parser_callbacks &parser_callbacks,
const Word *shader_words,
std::size_t shader_size) noexcept
: parser_callbacks(parser_callbacks),
id_states(),
shader_words(shader_words),
shader_size(shader_size)
{
}
Id_state &get_id_state(Id id) noexcept
{
// id_states[0] is for id #1
assert(id > 0 && id <= id_states.size());
return id_states[id - 1];
}
const Word &read_word(std::size_t word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
if(word_index >= instruction_end_index)
throw Parser_error(word_index,
instruction_start_index,
instruction_start_index == 0 ? "premature end of shader" : "premature end of instruction");
return shader_words[word_index];
}
Id read_id(std::size_t word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Id retval = read_word(word_index, instruction_start_index, instruction_end_index);
if(retval == 0 || retval > id_states.size())
throw Parser_error(word_index, instruction_start_index, "id number out of range");
return retval;
}
Image_operands_with_parameters parse_image_operands(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Image_operands_with_parameters retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval.value = static_cast<Image_operands>(bits);
if((bits & 0xffffff00UL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
if(bits & 0x1UL)
{
bits &= ~0x1UL;
retval.bias.emplace();
auto &parameters = *retval.bias;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x2UL)
{
bits &= ~0x2UL;
retval.lod.emplace();
auto &parameters = *retval.lod;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x4UL)
{
bits &= ~0x4UL;
retval.grad.emplace();
auto &parameters = *retval.grad;
parameters.dx = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parameters.dy = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x8UL)
{
bits &= ~0x8UL;
retval.const_offset.emplace();
auto &parameters = *retval.const_offset;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x10UL)
{
bits &= ~0x10UL;
retval.offset.emplace();
auto &parameters = *retval.offset;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x20UL)
{
bits &= ~0x20UL;
retval.const_offsets.emplace();
auto &parameters = *retval.const_offsets;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x40UL)
{
bits &= ~0x40UL;
retval.sample.emplace();
auto &parameters = *retval.sample;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
if(bits & 0x80UL)
{
bits &= ~0x80UL;
retval.min_lod.emplace();
auto &parameters = *retval.min_lod;
parameters.ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
}
return retval;
}
Fp_fast_math_mode parse_fp_fast_math_mode(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Fp_fast_math_mode retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval = static_cast<Fp_fast_math_mode>(bits);
if((bits & 0xffffffe0UL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
return retval;
}
Selection_control parse_selection_control(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Selection_control retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval = static_cast<Selection_control>(bits);
if((bits & 0xfffffffcUL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
return retval;
}
Loop_control_with_parameters parse_loop_control(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Loop_control_with_parameters retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval.value = static_cast<Loop_control>(bits);
if((bits & 0xfffffff0UL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
if(bits & 0x8UL)
{
bits &= ~0x8UL;
retval.dependency_length.emplace();
auto &parameters = *retval.dependency_length;
parameters.literal_integer = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
}
return retval;
}
Function_control parse_function_control(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Function_control retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval = static_cast<Function_control>(bits);
if((bits & 0xfffffff0UL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
return retval;
}
Memory_semantics parse_memory_semantics(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Memory_semantics retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval = static_cast<Memory_semantics>(bits);
if((bits & 0xfffff021UL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
return retval;
}
Memory_access_with_parameters parse_memory_access(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Memory_access_with_parameters retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval.value = static_cast<Memory_access>(bits);
if((bits & 0xfffffff8UL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
if(bits & 0x2UL)
{
bits &= ~0x2UL;
retval.aligned.emplace();
auto &parameters = *retval.aligned;
parameters.literal_integer = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
}
return retval;
}
Kernel_profiling_info parse_kernel_profiling_info(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Kernel_profiling_info retval{};
Word bits = read_word(word_index, instruction_start_index, instruction_end_index);
retval = static_cast<Kernel_profiling_info>(bits);
if((bits & 0xfffffffeUL) != 0)
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
else
word_index++;
return retval;
}
Source_language parse_source_language(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Source_language>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Source_language::unknown:
break;
case Source_language::essl:
break;
case Source_language::glsl:
break;
case Source_language::open_cl_c:
break;
case Source_language::open_cl_cpp:
break;
case Source_language::hlsl:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Execution_model parse_execution_model(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Execution_model>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Execution_model::vertex:
break;
case Execution_model::tessellation_control:
break;
case Execution_model::tessellation_evaluation:
break;
case Execution_model::geometry:
break;
case Execution_model::fragment:
break;
case Execution_model::gl_compute:
break;
case Execution_model::kernel:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Addressing_model parse_addressing_model(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Addressing_model>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Addressing_model::logical:
break;
case Addressing_model::physical32:
break;
case Addressing_model::physical64:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Memory_model parse_memory_model(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Memory_model>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Memory_model::simple:
break;
case Memory_model::glsl450:
break;
case Memory_model::open_cl:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Execution_mode_with_parameters parse_execution_mode(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Execution_mode_with_parameters retval{};
retval.value = static_cast<Execution_mode>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval.value)
{
case Execution_mode::invocations:
{
retval.parameters.emplace<Execution_mode_invocations_parameters>();
auto &parameters = util::get<Execution_mode_invocations_parameters>(retval.parameters);
parameters.number_of_invocation_invocations = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::spacing_equal:
break;
case Execution_mode::spacing_fractional_even:
break;
case Execution_mode::spacing_fractional_odd:
break;
case Execution_mode::vertex_order_cw:
break;
case Execution_mode::vertex_order_ccw:
break;
case Execution_mode::pixel_center_integer:
break;
case Execution_mode::origin_upper_left:
break;
case Execution_mode::origin_lower_left:
break;
case Execution_mode::early_fragment_tests:
break;
case Execution_mode::point_mode:
break;
case Execution_mode::xfb:
break;
case Execution_mode::depth_replacing:
break;
case Execution_mode::depth_greater:
break;
case Execution_mode::depth_less:
break;
case Execution_mode::depth_unchanged:
break;
case Execution_mode::local_size:
{
retval.parameters.emplace<Execution_mode_local_size_parameters>();
auto &parameters = util::get<Execution_mode_local_size_parameters>(retval.parameters);
parameters.x_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parameters.y_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parameters.z_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::local_size_hint:
{
retval.parameters.emplace<Execution_mode_local_size_hint_parameters>();
auto &parameters = util::get<Execution_mode_local_size_hint_parameters>(retval.parameters);
parameters.x_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parameters.y_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parameters.z_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::input_points:
break;
case Execution_mode::input_lines:
break;
case Execution_mode::input_lines_adjacency:
break;
case Execution_mode::triangles:
break;
case Execution_mode::input_triangles_adjacency:
break;
case Execution_mode::quads:
break;
case Execution_mode::isolines:
break;
case Execution_mode::output_vertices:
{
retval.parameters.emplace<Execution_mode_output_vertices_parameters>();
auto &parameters = util::get<Execution_mode_output_vertices_parameters>(retval.parameters);
parameters.vertex_count = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::output_points:
break;
case Execution_mode::output_line_strip:
break;
case Execution_mode::output_triangle_strip:
break;
case Execution_mode::vec_type_hint:
{
retval.parameters.emplace<Execution_mode_vec_type_hint_parameters>();
auto &parameters = util::get<Execution_mode_vec_type_hint_parameters>(retval.parameters);
parameters.vector_type = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::contraction_off:
break;
case Execution_mode::initializer:
break;
case Execution_mode::finalizer:
break;
case Execution_mode::subgroup_size:
{
retval.parameters.emplace<Execution_mode_subgroup_size_parameters>();
auto &parameters = util::get<Execution_mode_subgroup_size_parameters>(retval.parameters);
parameters.subgroup_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::subgroups_per_workgroup:
{
retval.parameters.emplace<Execution_mode_subgroups_per_workgroup_parameters>();
auto &parameters = util::get<Execution_mode_subgroups_per_workgroup_parameters>(retval.parameters);
parameters.subgroups_per_workgroup = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Execution_mode::subgroups_per_workgroup_id:
{
retval.parameters.emplace<Execution_mode_subgroups_per_workgroup_id_parameters>();
auto &parameters = util::get<Execution_mode_subgroups_per_workgroup_id_parameters>(retval.parameters);
parameters.subgroups_per_workgroup = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
break;
}
case Execution_mode::local_size_id:
{
retval.parameters.emplace<Execution_mode_local_size_id_parameters>();
auto &parameters = util::get<Execution_mode_local_size_id_parameters>(retval.parameters);
parameters.x_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parameters.y_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parameters.z_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
break;
}
case Execution_mode::local_size_hint_id:
{
retval.parameters.emplace<Execution_mode_local_size_hint_id_parameters>();
auto &parameters = util::get<Execution_mode_local_size_hint_id_parameters>(retval.parameters);
parameters.local_size_hint = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
break;
}
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Storage_class parse_storage_class(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Storage_class>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Storage_class::uniform_constant:
break;
case Storage_class::input:
break;
case Storage_class::uniform:
break;
case Storage_class::output:
break;
case Storage_class::workgroup:
break;
case Storage_class::cross_workgroup:
break;
case Storage_class::private_:
break;
case Storage_class::function:
break;
case Storage_class::generic:
break;
case Storage_class::push_constant:
break;
case Storage_class::atomic_counter:
break;
case Storage_class::image:
break;
case Storage_class::storage_buffer:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Dim parse_dim(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Dim>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Dim::_1d:
break;
case Dim::_2d:
break;
case Dim::_3d:
break;
case Dim::cube:
break;
case Dim::rect:
break;
case Dim::buffer:
break;
case Dim::subpass_data:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Sampler_addressing_mode parse_sampler_addressing_mode(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Sampler_addressing_mode>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Sampler_addressing_mode::none:
break;
case Sampler_addressing_mode::clamp_to_edge:
break;
case Sampler_addressing_mode::clamp:
break;
case Sampler_addressing_mode::repeat:
break;
case Sampler_addressing_mode::repeat_mirrored:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Sampler_filter_mode parse_sampler_filter_mode(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Sampler_filter_mode>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Sampler_filter_mode::nearest:
break;
case Sampler_filter_mode::linear:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Image_format parse_image_format(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Image_format>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Image_format::unknown:
break;
case Image_format::rgba32f:
break;
case Image_format::rgba16f:
break;
case Image_format::r32f:
break;
case Image_format::rgba8:
break;
case Image_format::rgba8_snorm:
break;
case Image_format::rg32f:
break;
case Image_format::rg16f:
break;
case Image_format::r11f_g11f_b10f:
break;
case Image_format::r16f:
break;
case Image_format::rgba16:
break;
case Image_format::rgb10a2:
break;
case Image_format::rg16:
break;
case Image_format::rg8:
break;
case Image_format::r16:
break;
case Image_format::r8:
break;
case Image_format::rgba16_snorm:
break;
case Image_format::rg16_snorm:
break;
case Image_format::rg8_snorm:
break;
case Image_format::r16_snorm:
break;
case Image_format::r8_snorm:
break;
case Image_format::rgba32i:
break;
case Image_format::rgba16i:
break;
case Image_format::rgba8i:
break;
case Image_format::r32i:
break;
case Image_format::rg32i:
break;
case Image_format::rg16i:
break;
case Image_format::rg8i:
break;
case Image_format::r16i:
break;
case Image_format::r8i:
break;
case Image_format::rgba32ui:
break;
case Image_format::rgba16ui:
break;
case Image_format::rgba8ui:
break;
case Image_format::r32ui:
break;
case Image_format::rgb10a2ui:
break;
case Image_format::rg32ui:
break;
case Image_format::rg16ui:
break;
case Image_format::rg8ui:
break;
case Image_format::r16ui:
break;
case Image_format::r8ui:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Image_channel_order parse_image_channel_order(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Image_channel_order>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Image_channel_order::r:
break;
case Image_channel_order::a:
break;
case Image_channel_order::rg:
break;
case Image_channel_order::ra:
break;
case Image_channel_order::rgb:
break;
case Image_channel_order::rgba:
break;
case Image_channel_order::bgra:
break;
case Image_channel_order::argb:
break;
case Image_channel_order::intensity:
break;
case Image_channel_order::luminance:
break;
case Image_channel_order::rx:
break;
case Image_channel_order::r_gx:
break;
case Image_channel_order::rg_bx:
break;
case Image_channel_order::depth:
break;
case Image_channel_order::depth_stencil:
break;
case Image_channel_order::s_rgb:
break;
case Image_channel_order::s_rg_bx:
break;
case Image_channel_order::s_rgba:
break;
case Image_channel_order::s_bgra:
break;
case Image_channel_order::abgr:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Image_channel_data_type parse_image_channel_data_type(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Image_channel_data_type>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Image_channel_data_type::snorm_int8:
break;
case Image_channel_data_type::snorm_int16:
break;
case Image_channel_data_type::unorm_int8:
break;
case Image_channel_data_type::unorm_int16:
break;
case Image_channel_data_type::unorm_short565:
break;
case Image_channel_data_type::unorm_short555:
break;
case Image_channel_data_type::unorm_int101010:
break;
case Image_channel_data_type::signed_int8:
break;
case Image_channel_data_type::signed_int16:
break;
case Image_channel_data_type::signed_int32:
break;
case Image_channel_data_type::unsigned_int8:
break;
case Image_channel_data_type::unsigned_int16:
break;
case Image_channel_data_type::unsigned_int32:
break;
case Image_channel_data_type::half_float:
break;
case Image_channel_data_type::float_:
break;
case Image_channel_data_type::unorm_int24:
break;
case Image_channel_data_type::unorm_int101010_2:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Fp_rounding_mode parse_fp_rounding_mode(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Fp_rounding_mode>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Fp_rounding_mode::rte:
break;
case Fp_rounding_mode::rtz:
break;
case Fp_rounding_mode::rtp:
break;
case Fp_rounding_mode::rtn:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Linkage_type parse_linkage_type(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Linkage_type>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Linkage_type::export_:
break;
case Linkage_type::import_:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Access_qualifier parse_access_qualifier(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Access_qualifier>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Access_qualifier::read_only:
break;
case Access_qualifier::write_only:
break;
case Access_qualifier::read_write:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Function_parameter_attribute parse_function_parameter_attribute(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Function_parameter_attribute>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Function_parameter_attribute::zext:
break;
case Function_parameter_attribute::sext:
break;
case Function_parameter_attribute::by_val:
break;
case Function_parameter_attribute::sret:
break;
case Function_parameter_attribute::no_alias:
break;
case Function_parameter_attribute::no_capture:
break;
case Function_parameter_attribute::no_write:
break;
case Function_parameter_attribute::no_read_write:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Decoration_with_parameters parse_decoration(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Decoration_with_parameters retval{};
retval.value = static_cast<Decoration>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval.value)
{
case Decoration::relaxed_precision:
break;
case Decoration::spec_id:
{
retval.parameters.emplace<Decoration_spec_id_parameters>();
auto &parameters = util::get<Decoration_spec_id_parameters>(retval.parameters);
parameters.specialization_constant_id = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::block:
break;
case Decoration::buffer_block:
break;
case Decoration::row_major:
break;
case Decoration::col_major:
break;
case Decoration::array_stride:
{
retval.parameters.emplace<Decoration_array_stride_parameters>();
auto &parameters = util::get<Decoration_array_stride_parameters>(retval.parameters);
parameters.array_stride = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::matrix_stride:
{
retval.parameters.emplace<Decoration_matrix_stride_parameters>();
auto &parameters = util::get<Decoration_matrix_stride_parameters>(retval.parameters);
parameters.matrix_stride = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::glsl_shared:
break;
case Decoration::glsl_packed:
break;
case Decoration::c_packed:
break;
case Decoration::built_in:
{
retval.parameters.emplace<Decoration_built_in_parameters>();
auto &parameters = util::get<Decoration_built_in_parameters>(retval.parameters);
parameters.built_in = parse_built_in(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::no_perspective:
break;
case Decoration::flat:
break;
case Decoration::patch:
break;
case Decoration::centroid:
break;
case Decoration::sample:
break;
case Decoration::invariant:
break;
case Decoration::restrict:
break;
case Decoration::aliased:
break;
case Decoration::volatile_:
break;
case Decoration::constant:
break;
case Decoration::coherent:
break;
case Decoration::non_writable:
break;
case Decoration::non_readable:
break;
case Decoration::uniform:
break;
case Decoration::saturated_conversion:
break;
case Decoration::stream:
{
retval.parameters.emplace<Decoration_stream_parameters>();
auto &parameters = util::get<Decoration_stream_parameters>(retval.parameters);
parameters.stream_number = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::location:
{
retval.parameters.emplace<Decoration_location_parameters>();
auto &parameters = util::get<Decoration_location_parameters>(retval.parameters);
parameters.location = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::component:
{
retval.parameters.emplace<Decoration_component_parameters>();
auto &parameters = util::get<Decoration_component_parameters>(retval.parameters);
parameters.component = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::index:
{
retval.parameters.emplace<Decoration_index_parameters>();
auto &parameters = util::get<Decoration_index_parameters>(retval.parameters);
parameters.index = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::binding:
{
retval.parameters.emplace<Decoration_binding_parameters>();
auto &parameters = util::get<Decoration_binding_parameters>(retval.parameters);
parameters.binding_point = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::descriptor_set:
{
retval.parameters.emplace<Decoration_descriptor_set_parameters>();
auto &parameters = util::get<Decoration_descriptor_set_parameters>(retval.parameters);
parameters.descriptor_set = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::offset:
{
retval.parameters.emplace<Decoration_offset_parameters>();
auto &parameters = util::get<Decoration_offset_parameters>(retval.parameters);
parameters.byte_offset = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::xfb_buffer:
{
retval.parameters.emplace<Decoration_xfb_buffer_parameters>();
auto &parameters = util::get<Decoration_xfb_buffer_parameters>(retval.parameters);
parameters.xfb_buffer_number = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::xfb_stride:
{
retval.parameters.emplace<Decoration_xfb_stride_parameters>();
auto &parameters = util::get<Decoration_xfb_stride_parameters>(retval.parameters);
parameters.xfb_stride = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::func_param_attr:
{
retval.parameters.emplace<Decoration_func_param_attr_parameters>();
auto &parameters = util::get<Decoration_func_param_attr_parameters>(retval.parameters);
parameters.function_parameter_attribute = parse_function_parameter_attribute(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::fp_rounding_mode:
{
retval.parameters.emplace<Decoration_fp_rounding_mode_parameters>();
auto &parameters = util::get<Decoration_fp_rounding_mode_parameters>(retval.parameters);
parameters.floating_point_rounding_mode = parse_fp_rounding_mode(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::fp_fast_math_mode:
{
retval.parameters.emplace<Decoration_fp_fast_math_mode_parameters>();
auto &parameters = util::get<Decoration_fp_fast_math_mode_parameters>(retval.parameters);
parameters.fast_math_mode = parse_fp_fast_math_mode(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::linkage_attributes:
{
retval.parameters.emplace<Decoration_linkage_attributes_parameters>();
auto &parameters = util::get<Decoration_linkage_attributes_parameters>(retval.parameters);
parameters.name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parameters.linkage_type = parse_linkage_type(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::no_contraction:
break;
case Decoration::input_attachment_index:
{
retval.parameters.emplace<Decoration_input_attachment_index_parameters>();
auto &parameters = util::get<Decoration_input_attachment_index_parameters>(retval.parameters);
parameters.attachment_index = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::alignment:
{
retval.parameters.emplace<Decoration_alignment_parameters>();
auto &parameters = util::get<Decoration_alignment_parameters>(retval.parameters);
parameters.alignment = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::max_byte_offset:
{
retval.parameters.emplace<Decoration_max_byte_offset_parameters>();
auto &parameters = util::get<Decoration_max_byte_offset_parameters>(retval.parameters);
parameters.max_byte_offset = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
case Decoration::alignment_id:
{
retval.parameters.emplace<Decoration_alignment_id_parameters>();
auto &parameters = util::get<Decoration_alignment_id_parameters>(retval.parameters);
parameters.alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::max_byte_offset_id:
{
retval.parameters.emplace<Decoration_max_byte_offset_id_parameters>();
auto &parameters = util::get<Decoration_max_byte_offset_id_parameters>(retval.parameters);
parameters.max_byte_offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
break;
}
case Decoration::override_coverage_nv:
break;
case Decoration::passthrough_nv:
break;
case Decoration::viewport_relative_nv:
break;
case Decoration::secondary_viewport_relative_nv:
{
retval.parameters.emplace<Decoration_secondary_viewport_relative_nv_parameters>();
auto &parameters = util::get<Decoration_secondary_viewport_relative_nv_parameters>(retval.parameters);
parameters.offset = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
break;
}
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Built_in parse_built_in(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Built_in>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Built_in::position:
break;
case Built_in::point_size:
break;
case Built_in::clip_distance:
break;
case Built_in::cull_distance:
break;
case Built_in::vertex_id:
break;
case Built_in::instance_id:
break;
case Built_in::primitive_id:
break;
case Built_in::invocation_id:
break;
case Built_in::layer:
break;
case Built_in::viewport_index:
break;
case Built_in::tess_level_outer:
break;
case Built_in::tess_level_inner:
break;
case Built_in::tess_coord:
break;
case Built_in::patch_vertices:
break;
case Built_in::frag_coord:
break;
case Built_in::point_coord:
break;
case Built_in::front_facing:
break;
case Built_in::sample_id:
break;
case Built_in::sample_position:
break;
case Built_in::sample_mask:
break;
case Built_in::frag_depth:
break;
case Built_in::helper_invocation:
break;
case Built_in::num_workgroups:
break;
case Built_in::workgroup_size:
break;
case Built_in::workgroup_id:
break;
case Built_in::local_invocation_id:
break;
case Built_in::global_invocation_id:
break;
case Built_in::local_invocation_index:
break;
case Built_in::work_dim:
break;
case Built_in::global_size:
break;
case Built_in::enqueued_workgroup_size:
break;
case Built_in::global_offset:
break;
case Built_in::global_linear_id:
break;
case Built_in::subgroup_size:
break;
case Built_in::subgroup_max_size:
break;
case Built_in::num_subgroups:
break;
case Built_in::num_enqueued_subgroups:
break;
case Built_in::subgroup_id:
break;
case Built_in::subgroup_local_invocation_id:
break;
case Built_in::vertex_index:
break;
case Built_in::instance_index:
break;
case Built_in::subgroup_eq_mask_khr:
break;
case Built_in::subgroup_ge_mask_khr:
break;
case Built_in::subgroup_gt_mask_khr:
break;
case Built_in::subgroup_le_mask_khr:
break;
case Built_in::subgroup_lt_mask_khr:
break;
case Built_in::base_vertex:
break;
case Built_in::base_instance:
break;
case Built_in::draw_index:
break;
case Built_in::device_index:
break;
case Built_in::view_index:
break;
case Built_in::viewport_mask_nv:
break;
case Built_in::secondary_position_nv:
break;
case Built_in::secondary_viewport_mask_nv:
break;
case Built_in::position_per_view_nv:
break;
case Built_in::viewport_mask_per_view_nv:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Scope parse_scope(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Scope>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Scope::cross_device:
break;
case Scope::device:
break;
case Scope::workgroup:
break;
case Scope::subgroup:
break;
case Scope::invocation:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Group_operation parse_group_operation(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Group_operation>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Group_operation::reduce:
break;
case Group_operation::inclusive_scan:
break;
case Group_operation::exclusive_scan:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Kernel_enqueue_flags parse_kernel_enqueue_flags(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Kernel_enqueue_flags>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Kernel_enqueue_flags::no_wait:
break;
case Kernel_enqueue_flags::wait_kernel:
break;
case Kernel_enqueue_flags::wait_work_group:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Capability parse_capability(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
auto retval = static_cast<Capability>(read_word(word_index++, instruction_start_index, instruction_end_index));
switch(retval)
{
case Capability::matrix:
break;
case Capability::shader:
break;
case Capability::geometry:
break;
case Capability::tessellation:
break;
case Capability::addresses:
break;
case Capability::linkage:
break;
case Capability::kernel:
break;
case Capability::vector16:
break;
case Capability::float16_buffer:
break;
case Capability::float16:
break;
case Capability::float64:
break;
case Capability::int64:
break;
case Capability::int64_atomics:
break;
case Capability::image_basic:
break;
case Capability::image_read_write:
break;
case Capability::image_mipmap:
break;
case Capability::pipes:
break;
case Capability::groups:
break;
case Capability::device_enqueue:
break;
case Capability::literal_sampler:
break;
case Capability::atomic_storage:
break;
case Capability::int16:
break;
case Capability::tessellation_point_size:
break;
case Capability::geometry_point_size:
break;
case Capability::image_gather_extended:
break;
case Capability::storage_image_multisample:
break;
case Capability::uniform_buffer_array_dynamic_indexing:
break;
case Capability::sampled_image_array_dynamic_indexing:
break;
case Capability::storage_buffer_array_dynamic_indexing:
break;
case Capability::storage_image_array_dynamic_indexing:
break;
case Capability::clip_distance:
break;
case Capability::cull_distance:
break;
case Capability::image_cube_array:
break;
case Capability::sample_rate_shading:
break;
case Capability::image_rect:
break;
case Capability::sampled_rect:
break;
case Capability::generic_pointer:
break;
case Capability::int8:
break;
case Capability::input_attachment:
break;
case Capability::sparse_residency:
break;
case Capability::min_lod:
break;
case Capability::sampled1d:
break;
case Capability::image1d:
break;
case Capability::sampled_cube_array:
break;
case Capability::sampled_buffer:
break;
case Capability::image_buffer:
break;
case Capability::image_ms_array:
break;
case Capability::storage_image_extended_formats:
break;
case Capability::image_query:
break;
case Capability::derivative_control:
break;
case Capability::interpolation_function:
break;
case Capability::transform_feedback:
break;
case Capability::geometry_streams:
break;
case Capability::storage_image_read_without_format:
break;
case Capability::storage_image_write_without_format:
break;
case Capability::multi_viewport:
break;
case Capability::subgroup_dispatch:
break;
case Capability::named_barrier:
break;
case Capability::pipe_storage:
break;
case Capability::subgroup_ballot_khr:
break;
case Capability::draw_parameters:
break;
case Capability::subgroup_vote_khr:
break;
case Capability::storage_buffer16_bit_access:
break;
case Capability::uniform_and_storage_buffer16_bit_access:
break;
case Capability::storage_push_constant16:
break;
case Capability::storage_input_output16:
break;
case Capability::device_group:
break;
case Capability::multi_view:
break;
case Capability::variable_pointers_storage_buffer:
break;
case Capability::variable_pointers:
break;
case Capability::sample_mask_override_coverage_nv:
break;
case Capability::geometry_shader_passthrough_nv:
break;
case Capability::shader_viewport_index_layer_nv:
break;
case Capability::shader_viewport_mask_nv:
break;
case Capability::shader_stereo_view_nv:
break;
case Capability::per_view_attributes_nv:
break;
default:
word_index--;
throw Parser_error(word_index, instruction_start_index, "invalid enum value");
}
return retval;
}
Id_result_type parse_id_result_type(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
return read_id(word_index++, instruction_start_index, instruction_end_index);
}
Id_result parse_id_result(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
return read_id(word_index++, instruction_start_index, instruction_end_index);
}
Id_memory_semantics parse_id_memory_semantics(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
return read_id(word_index++, instruction_start_index, instruction_end_index);
}
Id_scope parse_id_scope(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
return read_id(word_index++, instruction_start_index, instruction_end_index);
}
Id_ref parse_id_ref(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
return read_id(word_index++, instruction_start_index, instruction_end_index);
}
Literal_integer parse_literal_integer(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index, std::size_t literal_integer_size) const
{
if(literal_integer_size == 0 || literal_integer_size > 2)
throw Parser_error(word_index, instruction_start_index, "LiteralInteger word count is out of range");
Literal_integer retval = read_word(word_index++, instruction_start_index, instruction_end_index);
if(literal_integer_size == 2)
retval |= static_cast<std::uint64_t>(read_word(word_index++, instruction_start_index, instruction_end_index)) << 32;
return retval;
}
Literal_string parse_literal_string(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
const Word *word_array = &read_word(word_index, instruction_start_index, instruction_end_index);
std::size_t byte_count = 0;
Word word = *word_array;
Word word_padding_mask = 0;
while(true)
{
if((word & 0xFFU) == 0)
{
word_padding_mask = 0xFFFF'FF00UL;
break;
}
byte_count++;
if((word & 0xFF00U) == 0)
{
word_padding_mask = 0xFFFF'0000UL;
break;
}
byte_count++;
if((word & 0xFF'0000UL) == 0)
{
word_padding_mask = 0xFF00'0000UL;
break;
}
byte_count++;
if((word & 0xFF00'0000UL) == 0)
{
word_padding_mask = 0;
break;
}
byte_count++;
word = read_word(++word_index, instruction_start_index, instruction_end_index);
}
if(word & word_padding_mask)
throw Parser_error(word_index, instruction_start_index, "string has non-zero padding");
word_index++;
return Literal_string(word_array, byte_count);
}
Literal_context_dependent_number parse_literal_context_dependent_number(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
static_assert(std::is_same<Literal_context_dependent_number, std::vector<Word>>::value, "");
const Word *words = &read_word(word_index, instruction_start_index, instruction_end_index);
// LiteralContextDependentNumber is always the last operand, so just read the rest of the words
std::size_t word_count = instruction_end_index - word_index;
word_index = instruction_end_index;
return std::vector<Word>(words, words + word_count);
}
Literal_ext_inst_integer parse_literal_ext_inst_integer(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
static_assert(std::is_same<Literal_ext_inst_integer, Word>::value, "");
return read_word(word_index++, instruction_start_index, instruction_end_index);
}
Literal_spec_constant_op_integer parse_literal_spec_constant_op_integer(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
static_assert(std::is_same<Literal_spec_constant_op_integer, Op>::value, "");
// value is checked by caller, just cast and return
return static_cast<Literal_spec_constant_op_integer>(read_word(word_index++, instruction_start_index, instruction_end_index));
}
Pair_literal_integer_id_ref parse_pair_literal_integer_id_ref(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index, std::size_t literal_integer_size) const
{
Pair_literal_integer_id_ref retval{};
retval.part_1 = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, literal_integer_size);
retval.part_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
return retval;
}
Pair_id_ref_literal_integer parse_pair_id_ref_literal_integer(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index, std::size_t literal_integer_size) const
{
Pair_id_ref_literal_integer retval{};
retval.part_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
retval.part_2 = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, literal_integer_size);
return retval;
}
Pair_id_ref_id_ref parse_pair_id_ref_id_ref(std::size_t &word_index, std::size_t instruction_start_index, std::size_t instruction_end_index) const
{
Pair_id_ref_id_ref retval{};
retval.part_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
retval.part_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
return retval;
}
static Extension_instruction_set parse_extension_instruction_set_name(Literal_string name) noexcept
{
if(name == "OpenCL.std")
return Extension_instruction_set::open_cl_std;
if(name == "GLSL.std.450")
return Extension_instruction_set::glsl_std_450;
return Extension_instruction_set::unknown;
}
std::size_t get_operand_literal_integer_size(std::size_t word_index, std::size_t instruction_start_index, Id operand)
{
auto &state = get_id_state(operand);
if(!state.value_word_count)
throw Parser_error(word_index, instruction_start_index, "can't deduce operand size, operand type not known");
return *state.value_word_count;
}
void parse()
{
std::size_t word_index = 0;
if(read_word(word_index, 0, shader_size) != magic_number)
throw Parser_error(word_index, 0, "invalid magic number");
else
word_index++;
Word spirv_version_word = read_word(word_index, 0, shader_size);
if(spirv_version_word & ~0xFFFF00UL)
throw Parser_error(word_index, 0, "invalid SPIR-V version word");
unsigned version_number_major = (spirv_version_word >> 16) & 0xFFU;
unsigned version_number_minor = (spirv_version_word >> 8) & 0xFFU;
if(version_number_major != major_version || version_number_minor > minor_version)
throw Parser_error(word_index, 0, "unsupported SPIR-V version");
else
word_index++;
Word generator_magic_number = read_word(word_index++, 0, shader_size);
Word id_bound = read_word(word_index, 0, shader_size);
if(id_bound == 0 || id_bound > max_id_bound())
throw Parser_error(word_index, 0, "invalid id bound");
else
word_index++;
Word instruction_schema = read_word(word_index, 0, shader_size);
if(instruction_schema != 0)
throw Parser_error(word_index, 0, "invalid instruction schema");
else
word_index++;
parser_callbacks.handle_header(version_number_major,
version_number_minor,
generator_magic_number,
id_bound,
instruction_schema);
id_states.clear();
id_states.resize(id_bound - 1); // id_states[0] is for id #1
auto instructions_start_index = word_index;
while(word_index < shader_size)
{
auto instruction_start_index = word_index;
Word instruction_word = read_word(word_index, instruction_start_index, shader_size);
Word instruction_length = instruction_word >> 16;
if(instruction_length == 0)
throw Parser_error(word_index, instruction_start_index, "invalid zero-length instruction");
std::size_t instruction_end_index = instruction_start_index + instruction_length;
if(instruction_end_index > shader_size)
throw Parser_error(word_index, instruction_start_index, "instruction extends past end of shader");
Word opcode = instruction_word & 0xFFFFU;
word_index++;
switch(static_cast<Op>(opcode))
{
case Op::op_ext_inst_import:
{
Id_result result = read_id(word_index++, instruction_start_index, instruction_end_index);
Literal_string import_name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
get_id_state(result).instruction_set = parse_extension_instruction_set_name(import_name);
break;
}
case Op::op_type_int:
case Op::op_type_float:
{
Id_result result = read_id(word_index++, instruction_start_index, instruction_end_index);
Word bit_width = read_word(word_index++, instruction_start_index, instruction_end_index);
constexpr std::size_t word_bit_width = 32;
get_id_state(result).type_word_count = static_cast<std::size_t>((bit_width + word_bit_width - 1) / word_bit_width);
break;
}
case Op::op_undef:
case Op::op_ext_inst:
case Op::op_constant_true:
case Op::op_constant_false:
case Op::op_constant:
case Op::op_constant_composite:
case Op::op_constant_sampler:
case Op::op_constant_null:
case Op::op_spec_constant_true:
case Op::op_spec_constant_false:
case Op::op_spec_constant:
case Op::op_spec_constant_composite:
case Op::op_spec_constant_op:
case Op::op_function:
case Op::op_function_parameter:
case Op::op_function_call:
case Op::op_variable:
case Op::op_image_texel_pointer:
case Op::op_load:
case Op::op_access_chain:
case Op::op_in_bounds_access_chain:
case Op::op_ptr_access_chain:
case Op::op_array_length:
case Op::op_generic_ptr_mem_semantics:
case Op::op_in_bounds_ptr_access_chain:
case Op::op_vector_extract_dynamic:
case Op::op_vector_insert_dynamic:
case Op::op_vector_shuffle:
case Op::op_composite_construct:
case Op::op_composite_extract:
case Op::op_composite_insert:
case Op::op_copy_object:
case Op::op_transpose:
case Op::op_sampled_image:
case Op::op_image_sample_implicit_lod:
case Op::op_image_sample_explicit_lod:
case Op::op_image_sample_dref_implicit_lod:
case Op::op_image_sample_dref_explicit_lod:
case Op::op_image_sample_proj_implicit_lod:
case Op::op_image_sample_proj_explicit_lod:
case Op::op_image_sample_proj_dref_implicit_lod:
case Op::op_image_sample_proj_dref_explicit_lod:
case Op::op_image_fetch:
case Op::op_image_gather:
case Op::op_image_dref_gather:
case Op::op_image_read:
case Op::op_image:
case Op::op_image_query_format:
case Op::op_image_query_order:
case Op::op_image_query_size_lod:
case Op::op_image_query_size:
case Op::op_image_query_lod:
case Op::op_image_query_levels:
case Op::op_image_query_samples:
case Op::op_convert_f_to_u:
case Op::op_convert_f_to_s:
case Op::op_convert_s_to_f:
case Op::op_convert_u_to_f:
case Op::op_u_convert:
case Op::op_s_convert:
case Op::op_f_convert:
case Op::op_quantize_to_f16:
case Op::op_convert_ptr_to_u:
case Op::op_sat_convert_s_to_u:
case Op::op_sat_convert_u_to_s:
case Op::op_convert_u_to_ptr:
case Op::op_ptr_cast_to_generic:
case Op::op_generic_cast_to_ptr:
case Op::op_generic_cast_to_ptr_explicit:
case Op::op_bitcast:
case Op::op_s_negate:
case Op::op_f_negate:
case Op::op_i_add:
case Op::op_f_add:
case Op::op_i_sub:
case Op::op_f_sub:
case Op::op_i_mul:
case Op::op_f_mul:
case Op::op_u_div:
case Op::op_s_div:
case Op::op_f_div:
case Op::op_u_mod:
case Op::op_s_rem:
case Op::op_s_mod:
case Op::op_f_rem:
case Op::op_f_mod:
case Op::op_vector_times_scalar:
case Op::op_matrix_times_scalar:
case Op::op_vector_times_matrix:
case Op::op_matrix_times_vector:
case Op::op_matrix_times_matrix:
case Op::op_outer_product:
case Op::op_dot:
case Op::op_i_add_carry:
case Op::op_i_sub_borrow:
case Op::op_u_mul_extended:
case Op::op_s_mul_extended:
case Op::op_any:
case Op::op_all:
case Op::op_is_nan:
case Op::op_is_inf:
case Op::op_is_finite:
case Op::op_is_normal:
case Op::op_sign_bit_set:
case Op::op_less_or_greater:
case Op::op_ordered:
case Op::op_unordered:
case Op::op_logical_equal:
case Op::op_logical_not_equal:
case Op::op_logical_or:
case Op::op_logical_and:
case Op::op_logical_not:
case Op::op_select:
case Op::op_i_equal:
case Op::op_i_not_equal:
case Op::op_u_greater_than:
case Op::op_s_greater_than:
case Op::op_u_greater_than_equal:
case Op::op_s_greater_than_equal:
case Op::op_u_less_than:
case Op::op_s_less_than:
case Op::op_u_less_than_equal:
case Op::op_s_less_than_equal:
case Op::op_f_ord_equal:
case Op::op_f_unord_equal:
case Op::op_f_ord_not_equal:
case Op::op_f_unord_not_equal:
case Op::op_f_ord_less_than:
case Op::op_f_unord_less_than:
case Op::op_f_ord_greater_than:
case Op::op_f_unord_greater_than:
case Op::op_f_ord_less_than_equal:
case Op::op_f_unord_less_than_equal:
case Op::op_f_ord_greater_than_equal:
case Op::op_f_unord_greater_than_equal:
case Op::op_shift_right_logical:
case Op::op_shift_right_arithmetic:
case Op::op_shift_left_logical:
case Op::op_bitwise_or:
case Op::op_bitwise_xor:
case Op::op_bitwise_and:
case Op::op_not:
case Op::op_bit_field_insert:
case Op::op_bit_field_s_extract:
case Op::op_bit_field_u_extract:
case Op::op_bit_reverse:
case Op::op_bit_count:
case Op::op_d_pdx:
case Op::op_d_pdy:
case Op::op_fwidth:
case Op::op_d_pdx_fine:
case Op::op_d_pdy_fine:
case Op::op_fwidth_fine:
case Op::op_d_pdx_coarse:
case Op::op_d_pdy_coarse:
case Op::op_fwidth_coarse:
case Op::op_atomic_load:
case Op::op_atomic_exchange:
case Op::op_atomic_compare_exchange:
case Op::op_atomic_compare_exchange_weak:
case Op::op_atomic_i_increment:
case Op::op_atomic_i_decrement:
case Op::op_atomic_i_add:
case Op::op_atomic_i_sub:
case Op::op_atomic_s_min:
case Op::op_atomic_u_min:
case Op::op_atomic_s_max:
case Op::op_atomic_u_max:
case Op::op_atomic_and:
case Op::op_atomic_or:
case Op::op_atomic_xor:
case Op::op_phi:
case Op::op_group_async_copy:
case Op::op_group_all:
case Op::op_group_any:
case Op::op_group_broadcast:
case Op::op_group_i_add:
case Op::op_group_f_add:
case Op::op_group_f_min:
case Op::op_group_u_min:
case Op::op_group_s_min:
case Op::op_group_f_max:
case Op::op_group_u_max:
case Op::op_group_s_max:
case Op::op_read_pipe:
case Op::op_write_pipe:
case Op::op_reserved_read_pipe:
case Op::op_reserved_write_pipe:
case Op::op_reserve_read_pipe_packets:
case Op::op_reserve_write_pipe_packets:
case Op::op_is_valid_reserve_id:
case Op::op_get_num_pipe_packets:
case Op::op_get_max_pipe_packets:
case Op::op_group_reserve_read_pipe_packets:
case Op::op_group_reserve_write_pipe_packets:
case Op::op_enqueue_marker:
case Op::op_enqueue_kernel:
case Op::op_get_kernel_n_drange_sub_group_count:
case Op::op_get_kernel_n_drange_max_sub_group_size:
case Op::op_get_kernel_work_group_size:
case Op::op_get_kernel_preferred_work_group_size_multiple:
case Op::op_create_user_event:
case Op::op_is_valid_event:
case Op::op_get_default_queue:
case Op::op_build_nd_range:
case Op::op_image_sparse_sample_implicit_lod:
case Op::op_image_sparse_sample_explicit_lod:
case Op::op_image_sparse_sample_dref_implicit_lod:
case Op::op_image_sparse_sample_dref_explicit_lod:
case Op::op_image_sparse_sample_proj_implicit_lod:
case Op::op_image_sparse_sample_proj_explicit_lod:
case Op::op_image_sparse_sample_proj_dref_implicit_lod:
case Op::op_image_sparse_sample_proj_dref_explicit_lod:
case Op::op_image_sparse_fetch:
case Op::op_image_sparse_gather:
case Op::op_image_sparse_dref_gather:
case Op::op_image_sparse_texels_resident:
case Op::op_atomic_flag_test_and_set:
case Op::op_image_sparse_read:
case Op::op_size_of:
case Op::op_constant_pipe_storage:
case Op::op_create_pipe_from_pipe_storage:
case Op::op_get_kernel_local_size_for_subgroup_count:
case Op::op_get_kernel_max_num_subgroups:
case Op::op_named_barrier_initialize:
case Op::op_subgroup_ballot_khr:
case Op::op_subgroup_first_invocation_khr:
case Op::op_subgroup_all_khr:
case Op::op_subgroup_any_khr:
case Op::op_subgroup_all_equal_khr:
case Op::op_subgroup_read_invocation_khr:
{
Id_result_type result_type = read_id(word_index++, instruction_start_index, instruction_end_index);
Id_result result = read_id(word_index++, instruction_start_index, instruction_end_index);
auto &result_type_state = get_id_state(result_type);
if(result_type_state.type_word_count)
get_id_state(result).value_word_count = result_type_state.type_word_count;
break;
}
default:
break;
}
word_index = instruction_end_index;
}
word_index = instructions_start_index;
while(word_index < shader_size)
{
auto instruction_start_index = word_index;
Word instruction_word = read_word(word_index, instruction_start_index, shader_size);
Word instruction_length = instruction_word >> 16;
if(instruction_length == 0)
throw Parser_error(word_index, instruction_start_index, "invalid zero-length instruction");
std::size_t instruction_end_index = instruction_start_index + instruction_length;
if(instruction_end_index > shader_size)
throw Parser_error(word_index, instruction_start_index, "instruction extends past end of shader");
Word opcode = instruction_word & 0xFFFFU;
word_index++;
switch(static_cast<Op>(opcode))
{
case Op::op_ext_inst:
{
Id_result_type result_type = read_id(word_index++, instruction_start_index, instruction_end_index);
Id_result result = read_id(word_index++, instruction_start_index, instruction_end_index);
Id_ref instruction_set_id = read_id(word_index++, instruction_start_index, instruction_end_index);
auto instruction_integer = parse_literal_ext_inst_integer(word_index, instruction_start_index, instruction_end_index);
auto &instruction_set_id_state = get_id_state(instruction_set_id);
switch(instruction_set_id_state.instruction_set.value_or(Extension_instruction_set::unknown))
{
case Extension_instruction_set::unknown:
{
std::vector<Id_ref> args(shader_words + word_index, shader_words + instruction_end_index);
word_index = instruction_end_index;
parser_callbacks.handle_instruction_op_ext_inst(Op_ext_inst(result_type, result, instruction_set_id, instruction_integer, std::move(args)), instruction_start_index);
break;
}
case Extension_instruction_set::open_cl_std:
{
auto operation = static_cast<Op_open_cl_std>(instruction_integer);
switch(operation)
{
case Op_open_cl_std::acos:
{
Open_cl_std_op_acos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_acos(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::acosh:
{
Open_cl_std_op_acosh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_acosh(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::acospi:
{
Open_cl_std_op_acospi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_acospi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::asin:
{
Open_cl_std_op_asin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_asin(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::asinh:
{
Open_cl_std_op_asinh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_asinh(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::asinpi:
{
Open_cl_std_op_asinpi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_asinpi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::atan:
{
Open_cl_std_op_atan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_atan(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::atan2:
{
Open_cl_std_op_atan2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_atan2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::atanh:
{
Open_cl_std_op_atanh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_atanh(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::atanpi:
{
Open_cl_std_op_atanpi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_atanpi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::atan2pi:
{
Open_cl_std_op_atan2pi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_atan2pi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::cbrt:
{
Open_cl_std_op_cbrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_cbrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::ceil:
{
Open_cl_std_op_ceil instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_ceil(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::copysign:
{
Open_cl_std_op_copysign instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_copysign(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::cos:
{
Open_cl_std_op_cos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_cos(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::cosh:
{
Open_cl_std_op_cosh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_cosh(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::cospi:
{
Open_cl_std_op_cospi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_cospi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::erfc:
{
Open_cl_std_op_erfc instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_erfc(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::erf:
{
Open_cl_std_op_erf instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_erf(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::exp:
{
Open_cl_std_op_exp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_exp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::exp2:
{
Open_cl_std_op_exp2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_exp2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::exp10:
{
Open_cl_std_op_exp10 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_exp10(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::expm1:
{
Open_cl_std_op_expm1 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_expm1(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fabs:
{
Open_cl_std_op_fabs instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fabs(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fdim:
{
Open_cl_std_op_fdim instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fdim(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::floor:
{
Open_cl_std_op_floor instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_floor(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fma:
{
Open_cl_std_op_fma instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fma(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fmax:
{
Open_cl_std_op_fmax instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fmax(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fmin:
{
Open_cl_std_op_fmin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fmin(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fmod:
{
Open_cl_std_op_fmod instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fmod(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fract:
{
Open_cl_std_op_fract instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.ptr = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fract(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::frexp:
{
Open_cl_std_op_frexp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.exp = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_frexp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::hypot:
{
Open_cl_std_op_hypot instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_hypot(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::ilogb:
{
Open_cl_std_op_ilogb instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_ilogb(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::ldexp:
{
Open_cl_std_op_ldexp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.k = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_ldexp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::lgamma:
{
Open_cl_std_op_lgamma instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_lgamma(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::lgamma_r:
{
Open_cl_std_op_lgamma_r instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.signp = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_lgamma_r(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::log:
{
Open_cl_std_op_log instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_log(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::log2:
{
Open_cl_std_op_log2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_log2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::log10:
{
Open_cl_std_op_log10 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_log10(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::log1p:
{
Open_cl_std_op_log1p instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_log1p(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::logb:
{
Open_cl_std_op_logb instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_logb(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::mad:
{
Open_cl_std_op_mad instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_mad(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::maxmag:
{
Open_cl_std_op_maxmag instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_maxmag(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::minmag:
{
Open_cl_std_op_minmag instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_minmag(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::modf:
{
Open_cl_std_op_modf instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.iptr = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_modf(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::nan:
{
Open_cl_std_op_nan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.nancode = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_nan(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::nextafter:
{
Open_cl_std_op_nextafter instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_nextafter(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::pow:
{
Open_cl_std_op_pow instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_pow(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::pown:
{
Open_cl_std_op_pown instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_pown(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::powr:
{
Open_cl_std_op_powr instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_powr(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::remainder:
{
Open_cl_std_op_remainder instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_remainder(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::remquo:
{
Open_cl_std_op_remquo instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.quo = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_remquo(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::rint:
{
Open_cl_std_op_rint instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_rint(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::rootn:
{
Open_cl_std_op_rootn instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_rootn(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::round:
{
Open_cl_std_op_round instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_round(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::rsqrt:
{
Open_cl_std_op_rsqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_rsqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::sin:
{
Open_cl_std_op_sin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_sin(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::sincos:
{
Open_cl_std_op_sincos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.cosval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_sincos(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::sinh:
{
Open_cl_std_op_sinh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_sinh(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::sinpi:
{
Open_cl_std_op_sinpi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_sinpi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::sqrt:
{
Open_cl_std_op_sqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_sqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::tan:
{
Open_cl_std_op_tan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_tan(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::tanh:
{
Open_cl_std_op_tanh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_tanh(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::tanpi:
{
Open_cl_std_op_tanpi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_tanpi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::tgamma:
{
Open_cl_std_op_tgamma instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_tgamma(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::trunc:
{
Open_cl_std_op_trunc instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_trunc(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_cos:
{
Open_cl_std_op_half_cos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_cos(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_divide:
{
Open_cl_std_op_half_divide instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_divide(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_exp:
{
Open_cl_std_op_half_exp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_exp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_exp2:
{
Open_cl_std_op_half_exp2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_exp2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_exp10:
{
Open_cl_std_op_half_exp10 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_exp10(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_log:
{
Open_cl_std_op_half_log instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_log(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_log2:
{
Open_cl_std_op_half_log2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_log2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_log10:
{
Open_cl_std_op_half_log10 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_log10(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_powr:
{
Open_cl_std_op_half_powr instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_powr(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_recip:
{
Open_cl_std_op_half_recip instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_recip(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_rsqrt:
{
Open_cl_std_op_half_rsqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_rsqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_sin:
{
Open_cl_std_op_half_sin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_sin(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_sqrt:
{
Open_cl_std_op_half_sqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_sqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::half_tan:
{
Open_cl_std_op_half_tan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_half_tan(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_cos:
{
Open_cl_std_op_native_cos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_cos(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_divide:
{
Open_cl_std_op_native_divide instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_divide(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_exp:
{
Open_cl_std_op_native_exp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_exp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_exp2:
{
Open_cl_std_op_native_exp2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_exp2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_exp10:
{
Open_cl_std_op_native_exp10 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_exp10(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_log:
{
Open_cl_std_op_native_log instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_log(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_log2:
{
Open_cl_std_op_native_log2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_log2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_log10:
{
Open_cl_std_op_native_log10 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_log10(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_powr:
{
Open_cl_std_op_native_powr instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_powr(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_recip:
{
Open_cl_std_op_native_recip instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_recip(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_rsqrt:
{
Open_cl_std_op_native_rsqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_rsqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_sin:
{
Open_cl_std_op_native_sin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_sin(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_sqrt:
{
Open_cl_std_op_native_sqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_sqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::native_tan:
{
Open_cl_std_op_native_tan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_native_tan(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_abs:
{
Open_cl_std_op_s_abs instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_abs(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_abs_diff:
{
Open_cl_std_op_s_abs_diff instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_abs_diff(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_add_sat:
{
Open_cl_std_op_s_add_sat instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_add_sat(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_add_sat:
{
Open_cl_std_op_u_add_sat instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_add_sat(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_hadd:
{
Open_cl_std_op_s_hadd instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_hadd(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_hadd:
{
Open_cl_std_op_u_hadd instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_hadd(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_rhadd:
{
Open_cl_std_op_s_rhadd instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_rhadd(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_rhadd:
{
Open_cl_std_op_u_rhadd instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_rhadd(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_clamp:
{
Open_cl_std_op_s_clamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.minval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.maxval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_clamp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_clamp:
{
Open_cl_std_op_u_clamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.minval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.maxval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_clamp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::clz:
{
Open_cl_std_op_clz instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_clz(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::ctz:
{
Open_cl_std_op_ctz instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_ctz(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_mad_hi:
{
Open_cl_std_op_s_mad_hi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_mad_hi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_mad_sat:
{
Open_cl_std_op_u_mad_sat instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.z = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_mad_sat(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_mad_sat:
{
Open_cl_std_op_s_mad_sat instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.z = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_mad_sat(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_max:
{
Open_cl_std_op_s_max instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_max(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_max:
{
Open_cl_std_op_u_max instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_max(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_min:
{
Open_cl_std_op_s_min instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_min(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_min:
{
Open_cl_std_op_u_min instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_min(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_mul_hi:
{
Open_cl_std_op_s_mul_hi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_mul_hi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::rotate:
{
Open_cl_std_op_rotate instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.i = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_rotate(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_sub_sat:
{
Open_cl_std_op_s_sub_sat instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_sub_sat(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_sub_sat:
{
Open_cl_std_op_u_sub_sat instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_sub_sat(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_upsample:
{
Open_cl_std_op_u_upsample instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.hi = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.lo = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_upsample(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_upsample:
{
Open_cl_std_op_s_upsample instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.hi = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.lo = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_upsample(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::popcount:
{
Open_cl_std_op_popcount instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_popcount(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_mad24:
{
Open_cl_std_op_s_mad24 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.z = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_mad24(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_mad24:
{
Open_cl_std_op_u_mad24 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.z = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_mad24(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::s_mul24:
{
Open_cl_std_op_s_mul24 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_s_mul24(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_mul24:
{
Open_cl_std_op_u_mul24 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_mul24(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_abs:
{
Open_cl_std_op_u_abs instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_abs(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_abs_diff:
{
Open_cl_std_op_u_abs_diff instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_abs_diff(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_mul_hi:
{
Open_cl_std_op_u_mul_hi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_mul_hi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::u_mad_hi:
{
Open_cl_std_op_u_mad_hi instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_u_mad_hi(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fclamp:
{
Open_cl_std_op_fclamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.minval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.maxval = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fclamp(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::degrees:
{
Open_cl_std_op_degrees instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.radians = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_degrees(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fmax_common:
{
Open_cl_std_op_fmax_common instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fmax_common(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fmin_common:
{
Open_cl_std_op_fmin_common instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fmin_common(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::mix:
{
Open_cl_std_op_mix instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_mix(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::radians:
{
Open_cl_std_op_radians instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.degrees = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_radians(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::step:
{
Open_cl_std_op_step instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.edge = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_step(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::smoothstep:
{
Open_cl_std_op_smoothstep instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.edge0 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.edge1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_smoothstep(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::sign:
{
Open_cl_std_op_sign instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_sign(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::cross:
{
Open_cl_std_op_cross instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p0 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_cross(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::distance:
{
Open_cl_std_op_distance instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p0 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_distance(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::length:
{
Open_cl_std_op_length instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_length(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::normalize:
{
Open_cl_std_op_normalize instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_normalize(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fast_distance:
{
Open_cl_std_op_fast_distance instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p0 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fast_distance(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fast_length:
{
Open_cl_std_op_fast_length instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fast_length(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::fast_normalize:
{
Open_cl_std_op_fast_normalize instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_fast_normalize(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::bitselect:
{
Open_cl_std_op_bitselect instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_bitselect(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::select:
{
Open_cl_std_op_select instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_select(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vloadn:
{
Open_cl_std_op_vloadn instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.n = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_open_cl_std_op_vloadn(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstoren:
{
Open_cl_std_op_vstoren instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstoren(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vload_half:
{
Open_cl_std_op_vload_half instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vload_half(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vload_halfn:
{
Open_cl_std_op_vload_halfn instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.n = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_open_cl_std_op_vload_halfn(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstore_half:
{
Open_cl_std_op_vstore_half instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstore_half(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstore_half_r:
{
Open_cl_std_op_vstore_half_r instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.mode = parse_fp_rounding_mode(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstore_half_r(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstore_halfn:
{
Open_cl_std_op_vstore_halfn instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstore_halfn(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstore_halfn_r:
{
Open_cl_std_op_vstore_halfn_r instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.mode = parse_fp_rounding_mode(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstore_halfn_r(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vloada_halfn:
{
Open_cl_std_op_vloada_halfn instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.n = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_open_cl_std_op_vloada_halfn(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstorea_halfn:
{
Open_cl_std_op_vstorea_halfn instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstorea_halfn(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::vstorea_halfn_r:
{
Open_cl_std_op_vstorea_halfn_r instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.data = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.mode = parse_fp_rounding_mode(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_vstorea_halfn_r(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::shuffle:
{
Open_cl_std_op_shuffle instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.shuffle_mask = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_shuffle(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::shuffle2:
{
Open_cl_std_op_shuffle2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.shuffle_mask = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_shuffle2(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::printf:
{
Open_cl_std_op_printf instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.format = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.additional_arguments.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_open_cl_std_op_printf(std::move(instruction), instruction_start_index);
break;
}
case Op_open_cl_std::prefetch:
{
Open_cl_std_op_prefetch instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.ptr = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_elements = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_open_cl_std_op_prefetch(std::move(instruction), instruction_start_index);
break;
}
default:
throw Parser_error(word_index, instruction_start_index, "unknown extension instruction");
}
break;
}
case Extension_instruction_set::glsl_std_450:
{
auto operation = static_cast<Op_glsl_std_450>(instruction_integer);
switch(operation)
{
case Op_glsl_std_450::round:
{
Glsl_std_450_op_round instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_round(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::round_even:
{
Glsl_std_450_op_round_even instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_round_even(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::trunc:
{
Glsl_std_450_op_trunc instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_trunc(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::f_abs:
{
Glsl_std_450_op_f_abs instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_f_abs(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::s_abs:
{
Glsl_std_450_op_s_abs instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_s_abs(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::f_sign:
{
Glsl_std_450_op_f_sign instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_f_sign(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::s_sign:
{
Glsl_std_450_op_s_sign instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_s_sign(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::floor:
{
Glsl_std_450_op_floor instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_floor(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::ceil:
{
Glsl_std_450_op_ceil instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_ceil(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::fract:
{
Glsl_std_450_op_fract instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_fract(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::radians:
{
Glsl_std_450_op_radians instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.degrees = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_radians(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::degrees:
{
Glsl_std_450_op_degrees instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.radians = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_degrees(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::sin:
{
Glsl_std_450_op_sin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_sin(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::cos:
{
Glsl_std_450_op_cos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_cos(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::tan:
{
Glsl_std_450_op_tan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_tan(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::asin:
{
Glsl_std_450_op_asin instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_asin(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::acos:
{
Glsl_std_450_op_acos instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_acos(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::atan:
{
Glsl_std_450_op_atan instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.y_over_x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_atan(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::sinh:
{
Glsl_std_450_op_sinh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_sinh(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::cosh:
{
Glsl_std_450_op_cosh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_cosh(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::tanh:
{
Glsl_std_450_op_tanh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_tanh(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::asinh:
{
Glsl_std_450_op_asinh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_asinh(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::acosh:
{
Glsl_std_450_op_acosh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_acosh(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::atanh:
{
Glsl_std_450_op_atanh instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_atanh(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::atan2:
{
Glsl_std_450_op_atan2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_atan2(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pow:
{
Glsl_std_450_op_pow instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pow(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::exp:
{
Glsl_std_450_op_exp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_exp(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::log:
{
Glsl_std_450_op_log instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_log(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::exp2:
{
Glsl_std_450_op_exp2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_exp2(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::log2:
{
Glsl_std_450_op_log2 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_log2(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::sqrt:
{
Glsl_std_450_op_sqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_sqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::inverse_sqrt:
{
Glsl_std_450_op_inverse_sqrt instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_inverse_sqrt(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::determinant:
{
Glsl_std_450_op_determinant instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_determinant(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::matrix_inverse:
{
Glsl_std_450_op_matrix_inverse instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_matrix_inverse(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::modf:
{
Glsl_std_450_op_modf instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.i = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_modf(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::modf_struct:
{
Glsl_std_450_op_modf_struct instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_modf_struct(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::f_min:
{
Glsl_std_450_op_f_min instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_f_min(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::u_min:
{
Glsl_std_450_op_u_min instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_u_min(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::s_min:
{
Glsl_std_450_op_s_min instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_s_min(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::f_max:
{
Glsl_std_450_op_f_max instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_f_max(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::u_max:
{
Glsl_std_450_op_u_max instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_u_max(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::s_max:
{
Glsl_std_450_op_s_max instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_s_max(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::f_clamp:
{
Glsl_std_450_op_f_clamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.min_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.max_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_f_clamp(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::u_clamp:
{
Glsl_std_450_op_u_clamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.min_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.max_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_u_clamp(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::s_clamp:
{
Glsl_std_450_op_s_clamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.min_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.max_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_s_clamp(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::f_mix:
{
Glsl_std_450_op_f_mix instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_f_mix(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::i_mix:
{
Glsl_std_450_op_i_mix instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_i_mix(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::step:
{
Glsl_std_450_op_step instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.edge = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_step(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::smooth_step:
{
Glsl_std_450_op_smooth_step instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.edge0 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.edge1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_smooth_step(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::fma:
{
Glsl_std_450_op_fma instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.a = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.b = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.c = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_fma(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::frexp:
{
Glsl_std_450_op_frexp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.exp = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_frexp(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::frexp_struct:
{
Glsl_std_450_op_frexp_struct instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_frexp_struct(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::ldexp:
{
Glsl_std_450_op_ldexp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.exp = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_ldexp(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pack_snorm4x8:
{
Glsl_std_450_op_pack_snorm4x8 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pack_snorm4x8(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pack_unorm4x8:
{
Glsl_std_450_op_pack_unorm4x8 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pack_unorm4x8(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pack_snorm2x16:
{
Glsl_std_450_op_pack_snorm2x16 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pack_snorm2x16(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pack_unorm2x16:
{
Glsl_std_450_op_pack_unorm2x16 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pack_unorm2x16(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pack_half2x16:
{
Glsl_std_450_op_pack_half2x16 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pack_half2x16(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::pack_double2x32:
{
Glsl_std_450_op_pack_double2x32 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_pack_double2x32(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::unpack_snorm2x16:
{
Glsl_std_450_op_unpack_snorm2x16 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_unpack_snorm2x16(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::unpack_unorm2x16:
{
Glsl_std_450_op_unpack_unorm2x16 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_unpack_unorm2x16(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::unpack_half2x16:
{
Glsl_std_450_op_unpack_half2x16 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_unpack_half2x16(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::unpack_snorm4x8:
{
Glsl_std_450_op_unpack_snorm4x8 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_unpack_snorm4x8(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::unpack_unorm4x8:
{
Glsl_std_450_op_unpack_unorm4x8 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_unpack_unorm4x8(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::unpack_double2x32:
{
Glsl_std_450_op_unpack_double2x32 instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.v = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_unpack_double2x32(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::length:
{
Glsl_std_450_op_length instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_length(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::distance:
{
Glsl_std_450_op_distance instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.p0 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.p1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_distance(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::cross:
{
Glsl_std_450_op_cross instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_cross(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::normalize:
{
Glsl_std_450_op_normalize instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_normalize(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::face_forward:
{
Glsl_std_450_op_face_forward instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.n = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.i = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.nref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_face_forward(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::reflect:
{
Glsl_std_450_op_reflect instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.i = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.n = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_reflect(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::refract:
{
Glsl_std_450_op_refract instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.i = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.n = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.eta = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_refract(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::find_i_lsb:
{
Glsl_std_450_op_find_i_lsb instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_find_i_lsb(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::find_s_msb:
{
Glsl_std_450_op_find_s_msb instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_find_s_msb(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::find_u_msb:
{
Glsl_std_450_op_find_u_msb instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_find_u_msb(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::interpolate_at_centroid:
{
Glsl_std_450_op_interpolate_at_centroid instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.interpolant = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_interpolate_at_centroid(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::interpolate_at_sample:
{
Glsl_std_450_op_interpolate_at_sample instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.interpolant = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.sample = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_interpolate_at_sample(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::interpolate_at_offset:
{
Glsl_std_450_op_interpolate_at_offset instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.interpolant = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_interpolate_at_offset(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::n_min:
{
Glsl_std_450_op_n_min instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_n_min(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::n_max:
{
Glsl_std_450_op_n_max instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_n_max(std::move(instruction), instruction_start_index);
break;
}
case Op_glsl_std_450::n_clamp:
{
Glsl_std_450_op_n_clamp instruction{};
instruction.result_type = result_type;
instruction.result = result;
instruction.set = instruction_set_id;
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.min_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.max_val = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_glsl_std_450_op_n_clamp(std::move(instruction), instruction_start_index);
break;
}
default:
throw Parser_error(word_index, instruction_start_index, "unknown extension instruction");
}
break;
}
}
break;
}
case Op::op_nop:
{
Op_nop instruction{};
parser_callbacks.handle_instruction_op_nop(std::move(instruction), instruction_start_index);
break;
}
case Op::op_undef:
{
Op_undef instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_undef(std::move(instruction), instruction_start_index);
break;
}
case Op::op_source_continued:
{
Op_source_continued instruction{};
instruction.continued_source = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_source_continued(std::move(instruction), instruction_start_index);
break;
}
case Op::op_source:
{
Op_source instruction{};
instruction.source_language = parse_source_language(word_index, instruction_start_index, instruction_end_index);
instruction.version = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
if(word_index < instruction_end_index)
instruction.file = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.source = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_source(std::move(instruction), instruction_start_index);
break;
}
case Op::op_source_extension:
{
Op_source_extension instruction{};
instruction.extension = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_source_extension(std::move(instruction), instruction_start_index);
break;
}
case Op::op_name:
{
Op_name instruction{};
instruction.target = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_name(std::move(instruction), instruction_start_index);
break;
}
case Op::op_member_name:
{
Op_member_name instruction{};
instruction.type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.member = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_member_name(std::move(instruction), instruction_start_index);
break;
}
case Op::op_string:
{
Op_string instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.string = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_string(std::move(instruction), instruction_start_index);
break;
}
case Op::op_line:
{
Op_line instruction{};
instruction.file = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.line = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.column = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_line(std::move(instruction), instruction_start_index);
break;
}
case Op::op_extension:
{
Op_extension instruction{};
instruction.name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_extension(std::move(instruction), instruction_start_index);
break;
}
case Op::op_ext_inst_import:
{
Op_ext_inst_import instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_ext_inst_import(std::move(instruction), instruction_start_index);
break;
}
case Op::op_memory_model:
{
Op_memory_model instruction{};
instruction.addressing_model = parse_addressing_model(word_index, instruction_start_index, instruction_end_index);
instruction.memory_model = parse_memory_model(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_memory_model(std::move(instruction), instruction_start_index);
break;
}
case Op::op_entry_point:
{
Op_entry_point instruction{};
instruction.execution_model = parse_execution_model(word_index, instruction_start_index, instruction_end_index);
instruction.entry_point = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.name = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.interface.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_entry_point(std::move(instruction), instruction_start_index);
break;
}
case Op::op_execution_mode:
{
Op_execution_mode instruction{};
instruction.entry_point = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.mode = parse_execution_mode(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_execution_mode(std::move(instruction), instruction_start_index);
break;
}
case Op::op_capability:
{
Op_capability instruction{};
instruction.capability = parse_capability(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_capability(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_void:
{
Op_type_void instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_void(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_bool:
{
Op_type_bool instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_bool(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_int:
{
Op_type_int instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.width = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.signedness = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_type_int(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_float:
{
Op_type_float instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.width = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_type_float(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_vector:
{
Op_type_vector instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.component_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.component_count = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_type_vector(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_matrix:
{
Op_type_matrix instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.column_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.column_count = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_type_matrix(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_image:
{
Op_type_image instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.dim = parse_dim(word_index, instruction_start_index, instruction_end_index);
instruction.depth = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.arrayed = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.ms = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.sampled = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.image_format = parse_image_format(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.access_qualifier = parse_access_qualifier(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_image(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_sampler:
{
Op_type_sampler instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_sampler(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_sampled_image:
{
Op_type_sampled_image instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_sampled_image(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_array:
{
Op_type_array instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.element_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.length = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_array(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_runtime_array:
{
Op_type_runtime_array instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.element_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_runtime_array(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_struct:
{
Op_type_struct instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.member_0_type_member_1_type.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_type_struct(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_opaque:
{
Op_type_opaque instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.the_name_of_the_opaque_type = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_opaque(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_pointer:
{
Op_type_pointer instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.storage_class = parse_storage_class(word_index, instruction_start_index, instruction_end_index);
instruction.type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_pointer(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_function:
{
Op_type_function instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.return_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.parameter_0_type_parameter_1_type.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_type_function(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_event:
{
Op_type_event instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_event(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_device_event:
{
Op_type_device_event instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_device_event(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_reserve_id:
{
Op_type_reserve_id instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_reserve_id(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_queue:
{
Op_type_queue instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_queue(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_pipe:
{
Op_type_pipe instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.qualifier = parse_access_qualifier(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_forward_pointer:
{
Op_type_forward_pointer instruction{};
instruction.pointer_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.storage_class = parse_storage_class(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_forward_pointer(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant_true:
{
Op_constant_true instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_constant_true(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant_false:
{
Op_constant_false instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_constant_false(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant:
{
Op_constant instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_literal_context_dependent_number(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_constant(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant_composite:
{
Op_constant_composite instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.constituents.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_constant_composite(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant_sampler:
{
Op_constant_sampler instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampler_addressing_mode = parse_sampler_addressing_mode(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.sampler_filter_mode = parse_sampler_filter_mode(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_constant_sampler(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant_null:
{
Op_constant_null instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_constant_null(std::move(instruction), instruction_start_index);
break;
}
case Op::op_spec_constant_true:
{
Op_spec_constant_true instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_spec_constant_true(std::move(instruction), instruction_start_index);
break;
}
case Op::op_spec_constant_false:
{
Op_spec_constant_false instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_spec_constant_false(std::move(instruction), instruction_start_index);
break;
}
case Op::op_spec_constant:
{
Op_spec_constant instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_literal_context_dependent_number(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_spec_constant(std::move(instruction), instruction_start_index);
break;
}
case Op::op_spec_constant_composite:
{
Op_spec_constant_composite instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.constituents.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_spec_constant_composite(std::move(instruction), instruction_start_index);
break;
}
case Op::op_spec_constant_op:
{
Op_spec_constant_op instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.opcode = parse_literal_spec_constant_op_integer(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_spec_constant_op(std::move(instruction), instruction_start_index);
break;
}
case Op::op_function:
{
Op_function instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.function_control = parse_function_control(word_index, instruction_start_index, instruction_end_index);
instruction.function_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_function(std::move(instruction), instruction_start_index);
break;
}
case Op::op_function_parameter:
{
Op_function_parameter instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_function_parameter(std::move(instruction), instruction_start_index);
break;
}
case Op::op_function_end:
{
Op_function_end instruction{};
parser_callbacks.handle_instruction_op_function_end(std::move(instruction), instruction_start_index);
break;
}
case Op::op_function_call:
{
Op_function_call instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.function = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.argument_0_argument_1.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_function_call(std::move(instruction), instruction_start_index);
break;
}
case Op::op_variable:
{
Op_variable instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.storage_class = parse_storage_class(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.initializer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_variable(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_texel_pointer:
{
Op_image_texel_pointer instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.sample = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_texel_pointer(std::move(instruction), instruction_start_index);
break;
}
case Op::op_load:
{
Op_load instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.memory_access = parse_memory_access(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_load(std::move(instruction), instruction_start_index);
break;
}
case Op::op_store:
{
Op_store instruction{};
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.object = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.memory_access = parse_memory_access(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_store(std::move(instruction), instruction_start_index);
break;
}
case Op::op_copy_memory:
{
Op_copy_memory instruction{};
instruction.target = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.source = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.memory_access = parse_memory_access(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_copy_memory(std::move(instruction), instruction_start_index);
break;
}
case Op::op_copy_memory_sized:
{
Op_copy_memory_sized instruction{};
instruction.target = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.source = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.memory_access = parse_memory_access(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_copy_memory_sized(std::move(instruction), instruction_start_index);
break;
}
case Op::op_access_chain:
{
Op_access_chain instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.indexes.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_access_chain(std::move(instruction), instruction_start_index);
break;
}
case Op::op_in_bounds_access_chain:
{
Op_in_bounds_access_chain instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.indexes.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_in_bounds_access_chain(std::move(instruction), instruction_start_index);
break;
}
case Op::op_ptr_access_chain:
{
Op_ptr_access_chain instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.element = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.indexes.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_ptr_access_chain(std::move(instruction), instruction_start_index);
break;
}
case Op::op_array_length:
{
Op_array_length instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.structure = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.array_member = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_array_length(std::move(instruction), instruction_start_index);
break;
}
case Op::op_generic_ptr_mem_semantics:
{
Op_generic_ptr_mem_semantics instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_generic_ptr_mem_semantics(std::move(instruction), instruction_start_index);
break;
}
case Op::op_in_bounds_ptr_access_chain:
{
Op_in_bounds_ptr_access_chain instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.element = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.indexes.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_in_bounds_ptr_access_chain(std::move(instruction), instruction_start_index);
break;
}
case Op::op_decorate:
{
Op_decorate instruction{};
instruction.target = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.decoration = parse_decoration(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_decorate(std::move(instruction), instruction_start_index);
break;
}
case Op::op_member_decorate:
{
Op_member_decorate instruction{};
instruction.structure_type = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.member = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.decoration = parse_decoration(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_member_decorate(std::move(instruction), instruction_start_index);
break;
}
case Op::op_decoration_group:
{
Op_decoration_group instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_decoration_group(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_decorate:
{
Op_group_decorate instruction{};
instruction.decoration_group = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.targets.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_group_decorate(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_member_decorate:
{
Op_group_member_decorate instruction{};
instruction.decoration_group = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.targets.push_back(parse_pair_id_ref_literal_integer(word_index, instruction_start_index, instruction_end_index, 1));
parser_callbacks.handle_instruction_op_group_member_decorate(std::move(instruction), instruction_start_index);
break;
}
case Op::op_vector_extract_dynamic:
{
Op_vector_extract_dynamic instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.index = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_vector_extract_dynamic(std::move(instruction), instruction_start_index);
break;
}
case Op::op_vector_insert_dynamic:
{
Op_vector_insert_dynamic instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.component = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.index = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_vector_insert_dynamic(std::move(instruction), instruction_start_index);
break;
}
case Op::op_vector_shuffle:
{
Op_vector_shuffle instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.vector_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.components.push_back(parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1));
parser_callbacks.handle_instruction_op_vector_shuffle(std::move(instruction), instruction_start_index);
break;
}
case Op::op_composite_construct:
{
Op_composite_construct instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.constituents.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_composite_construct(std::move(instruction), instruction_start_index);
break;
}
case Op::op_composite_extract:
{
Op_composite_extract instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.composite = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.indexes.push_back(parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1));
parser_callbacks.handle_instruction_op_composite_extract(std::move(instruction), instruction_start_index);
break;
}
case Op::op_composite_insert:
{
Op_composite_insert instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.object = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.composite = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.indexes.push_back(parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1));
parser_callbacks.handle_instruction_op_composite_insert(std::move(instruction), instruction_start_index);
break;
}
case Op::op_copy_object:
{
Op_copy_object instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_copy_object(std::move(instruction), instruction_start_index);
break;
}
case Op::op_transpose:
{
Op_transpose instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.matrix = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_transpose(std::move(instruction), instruction_start_index);
break;
}
case Op::op_sampled_image:
{
Op_sampled_image instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.sampler = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_sampled_image(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_implicit_lod:
{
Op_image_sample_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_explicit_lod:
{
Op_image_sample_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_dref_implicit_lod:
{
Op_image_sample_dref_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_dref_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_dref_explicit_lod:
{
Op_image_sample_dref_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_dref_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_proj_implicit_lod:
{
Op_image_sample_proj_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_proj_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_proj_explicit_lod:
{
Op_image_sample_proj_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_proj_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_proj_dref_implicit_lod:
{
Op_image_sample_proj_dref_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_proj_dref_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sample_proj_dref_explicit_lod:
{
Op_image_sample_proj_dref_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sample_proj_dref_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_fetch:
{
Op_image_fetch instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_fetch(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_gather:
{
Op_image_gather instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.component = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_gather(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_dref_gather:
{
Op_image_dref_gather instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_dref_gather(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_read:
{
Op_image_read instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_read(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_write:
{
Op_image_write instruction{};
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.texel = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_write(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image:
{
Op_image instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_format:
{
Op_image_query_format instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_format(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_order:
{
Op_image_query_order instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_order(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_size_lod:
{
Op_image_query_size_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.level_of_detail = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_size_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_size:
{
Op_image_query_size instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_size(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_lod:
{
Op_image_query_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_levels:
{
Op_image_query_levels instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_levels(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_query_samples:
{
Op_image_query_samples instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_query_samples(std::move(instruction), instruction_start_index);
break;
}
case Op::op_convert_f_to_u:
{
Op_convert_f_to_u instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.float_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_convert_f_to_u(std::move(instruction), instruction_start_index);
break;
}
case Op::op_convert_f_to_s:
{
Op_convert_f_to_s instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.float_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_convert_f_to_s(std::move(instruction), instruction_start_index);
break;
}
case Op::op_convert_s_to_f:
{
Op_convert_s_to_f instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.signed_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_convert_s_to_f(std::move(instruction), instruction_start_index);
break;
}
case Op::op_convert_u_to_f:
{
Op_convert_u_to_f instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.unsigned_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_convert_u_to_f(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_convert:
{
Op_u_convert instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.unsigned_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_convert(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_convert:
{
Op_s_convert instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.signed_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_convert(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_convert:
{
Op_f_convert instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.float_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_convert(std::move(instruction), instruction_start_index);
break;
}
case Op::op_quantize_to_f16:
{
Op_quantize_to_f16 instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_quantize_to_f16(std::move(instruction), instruction_start_index);
break;
}
case Op::op_convert_ptr_to_u:
{
Op_convert_ptr_to_u instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_convert_ptr_to_u(std::move(instruction), instruction_start_index);
break;
}
case Op::op_sat_convert_s_to_u:
{
Op_sat_convert_s_to_u instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.signed_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_sat_convert_s_to_u(std::move(instruction), instruction_start_index);
break;
}
case Op::op_sat_convert_u_to_s:
{
Op_sat_convert_u_to_s instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.unsigned_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_sat_convert_u_to_s(std::move(instruction), instruction_start_index);
break;
}
case Op::op_convert_u_to_ptr:
{
Op_convert_u_to_ptr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.integer_value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_convert_u_to_ptr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_ptr_cast_to_generic:
{
Op_ptr_cast_to_generic instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_ptr_cast_to_generic(std::move(instruction), instruction_start_index);
break;
}
case Op::op_generic_cast_to_ptr:
{
Op_generic_cast_to_ptr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_generic_cast_to_ptr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_generic_cast_to_ptr_explicit:
{
Op_generic_cast_to_ptr_explicit instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.storage = parse_storage_class(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_generic_cast_to_ptr_explicit(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bitcast:
{
Op_bitcast instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bitcast(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_negate:
{
Op_s_negate instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_negate(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_negate:
{
Op_f_negate instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_negate(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_add:
{
Op_i_add instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_add(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_add:
{
Op_f_add instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_add(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_sub:
{
Op_i_sub instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_sub(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_sub:
{
Op_f_sub instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_sub(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_mul:
{
Op_i_mul instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_mul(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_mul:
{
Op_f_mul instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_mul(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_div:
{
Op_u_div instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_div(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_div:
{
Op_s_div instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_div(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_div:
{
Op_f_div instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_div(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_mod:
{
Op_u_mod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_mod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_rem:
{
Op_s_rem instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_rem(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_mod:
{
Op_s_mod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_mod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_rem:
{
Op_f_rem instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_rem(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_mod:
{
Op_f_mod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_mod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_vector_times_scalar:
{
Op_vector_times_scalar instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scalar = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_vector_times_scalar(std::move(instruction), instruction_start_index);
break;
}
case Op::op_matrix_times_scalar:
{
Op_matrix_times_scalar instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.matrix = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scalar = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_matrix_times_scalar(std::move(instruction), instruction_start_index);
break;
}
case Op::op_vector_times_matrix:
{
Op_vector_times_matrix instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.matrix = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_vector_times_matrix(std::move(instruction), instruction_start_index);
break;
}
case Op::op_matrix_times_vector:
{
Op_matrix_times_vector instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.matrix = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_matrix_times_vector(std::move(instruction), instruction_start_index);
break;
}
case Op::op_matrix_times_matrix:
{
Op_matrix_times_matrix instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.left_matrix = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.right_matrix = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_matrix_times_matrix(std::move(instruction), instruction_start_index);
break;
}
case Op::op_outer_product:
{
Op_outer_product instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.vector_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_outer_product(std::move(instruction), instruction_start_index);
break;
}
case Op::op_dot:
{
Op_dot instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.vector_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_dot(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_add_carry:
{
Op_i_add_carry instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_add_carry(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_sub_borrow:
{
Op_i_sub_borrow instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_sub_borrow(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_mul_extended:
{
Op_u_mul_extended instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_mul_extended(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_mul_extended:
{
Op_s_mul_extended instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_mul_extended(std::move(instruction), instruction_start_index);
break;
}
case Op::op_any:
{
Op_any instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_any(std::move(instruction), instruction_start_index);
break;
}
case Op::op_all:
{
Op_all instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.vector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_all(std::move(instruction), instruction_start_index);
break;
}
case Op::op_is_nan:
{
Op_is_nan instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_is_nan(std::move(instruction), instruction_start_index);
break;
}
case Op::op_is_inf:
{
Op_is_inf instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_is_inf(std::move(instruction), instruction_start_index);
break;
}
case Op::op_is_finite:
{
Op_is_finite instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_is_finite(std::move(instruction), instruction_start_index);
break;
}
case Op::op_is_normal:
{
Op_is_normal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_is_normal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_sign_bit_set:
{
Op_sign_bit_set instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_sign_bit_set(std::move(instruction), instruction_start_index);
break;
}
case Op::op_less_or_greater:
{
Op_less_or_greater instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_less_or_greater(std::move(instruction), instruction_start_index);
break;
}
case Op::op_ordered:
{
Op_ordered instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_ordered(std::move(instruction), instruction_start_index);
break;
}
case Op::op_unordered:
{
Op_unordered instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.y = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_unordered(std::move(instruction), instruction_start_index);
break;
}
case Op::op_logical_equal:
{
Op_logical_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_logical_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_logical_not_equal:
{
Op_logical_not_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_logical_not_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_logical_or:
{
Op_logical_or instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_logical_or(std::move(instruction), instruction_start_index);
break;
}
case Op::op_logical_and:
{
Op_logical_and instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_logical_and(std::move(instruction), instruction_start_index);
break;
}
case Op::op_logical_not:
{
Op_logical_not instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_logical_not(std::move(instruction), instruction_start_index);
break;
}
case Op::op_select:
{
Op_select instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.condition = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.object_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.object_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_select(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_equal:
{
Op_i_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_i_not_equal:
{
Op_i_not_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_i_not_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_greater_than:
{
Op_u_greater_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_greater_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_greater_than:
{
Op_s_greater_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_greater_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_greater_than_equal:
{
Op_u_greater_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_greater_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_greater_than_equal:
{
Op_s_greater_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_greater_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_less_than:
{
Op_u_less_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_less_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_less_than:
{
Op_s_less_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_less_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_u_less_than_equal:
{
Op_u_less_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_u_less_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_s_less_than_equal:
{
Op_s_less_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_s_less_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_ord_equal:
{
Op_f_ord_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_ord_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_unord_equal:
{
Op_f_unord_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_unord_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_ord_not_equal:
{
Op_f_ord_not_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_ord_not_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_unord_not_equal:
{
Op_f_unord_not_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_unord_not_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_ord_less_than:
{
Op_f_ord_less_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_ord_less_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_unord_less_than:
{
Op_f_unord_less_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_unord_less_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_ord_greater_than:
{
Op_f_ord_greater_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_ord_greater_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_unord_greater_than:
{
Op_f_unord_greater_than instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_unord_greater_than(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_ord_less_than_equal:
{
Op_f_ord_less_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_ord_less_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_unord_less_than_equal:
{
Op_f_unord_less_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_unord_less_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_ord_greater_than_equal:
{
Op_f_ord_greater_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_ord_greater_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_f_unord_greater_than_equal:
{
Op_f_unord_greater_than_equal instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_f_unord_greater_than_equal(std::move(instruction), instruction_start_index);
break;
}
case Op::op_shift_right_logical:
{
Op_shift_right_logical instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.shift = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_shift_right_logical(std::move(instruction), instruction_start_index);
break;
}
case Op::op_shift_right_arithmetic:
{
Op_shift_right_arithmetic instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.shift = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_shift_right_arithmetic(std::move(instruction), instruction_start_index);
break;
}
case Op::op_shift_left_logical:
{
Op_shift_left_logical instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.shift = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_shift_left_logical(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bitwise_or:
{
Op_bitwise_or instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bitwise_or(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bitwise_xor:
{
Op_bitwise_xor instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bitwise_xor(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bitwise_and:
{
Op_bitwise_and instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand_1 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.operand_2 = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bitwise_and(std::move(instruction), instruction_start_index);
break;
}
case Op::op_not:
{
Op_not instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.operand = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_not(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bit_field_insert:
{
Op_bit_field_insert instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.insert = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.count = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bit_field_insert(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bit_field_s_extract:
{
Op_bit_field_s_extract instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.count = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bit_field_s_extract(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bit_field_u_extract:
{
Op_bit_field_u_extract instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.count = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bit_field_u_extract(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bit_reverse:
{
Op_bit_reverse instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bit_reverse(std::move(instruction), instruction_start_index);
break;
}
case Op::op_bit_count:
{
Op_bit_count instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.base = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_bit_count(std::move(instruction), instruction_start_index);
break;
}
case Op::op_d_pdx:
{
Op_d_pdx instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_d_pdx(std::move(instruction), instruction_start_index);
break;
}
case Op::op_d_pdy:
{
Op_d_pdy instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_d_pdy(std::move(instruction), instruction_start_index);
break;
}
case Op::op_fwidth:
{
Op_fwidth instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_fwidth(std::move(instruction), instruction_start_index);
break;
}
case Op::op_d_pdx_fine:
{
Op_d_pdx_fine instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_d_pdx_fine(std::move(instruction), instruction_start_index);
break;
}
case Op::op_d_pdy_fine:
{
Op_d_pdy_fine instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_d_pdy_fine(std::move(instruction), instruction_start_index);
break;
}
case Op::op_fwidth_fine:
{
Op_fwidth_fine instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_fwidth_fine(std::move(instruction), instruction_start_index);
break;
}
case Op::op_d_pdx_coarse:
{
Op_d_pdx_coarse instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_d_pdx_coarse(std::move(instruction), instruction_start_index);
break;
}
case Op::op_d_pdy_coarse:
{
Op_d_pdy_coarse instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_d_pdy_coarse(std::move(instruction), instruction_start_index);
break;
}
case Op::op_fwidth_coarse:
{
Op_fwidth_coarse instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.p = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_fwidth_coarse(std::move(instruction), instruction_start_index);
break;
}
case Op::op_emit_vertex:
{
Op_emit_vertex instruction{};
parser_callbacks.handle_instruction_op_emit_vertex(std::move(instruction), instruction_start_index);
break;
}
case Op::op_end_primitive:
{
Op_end_primitive instruction{};
parser_callbacks.handle_instruction_op_end_primitive(std::move(instruction), instruction_start_index);
break;
}
case Op::op_emit_stream_vertex:
{
Op_emit_stream_vertex instruction{};
instruction.stream = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_emit_stream_vertex(std::move(instruction), instruction_start_index);
break;
}
case Op::op_end_stream_primitive:
{
Op_end_stream_primitive instruction{};
instruction.stream = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_end_stream_primitive(std::move(instruction), instruction_start_index);
break;
}
case Op::op_control_barrier:
{
Op_control_barrier instruction{};
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.memory = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_control_barrier(std::move(instruction), instruction_start_index);
break;
}
case Op::op_memory_barrier:
{
Op_memory_barrier instruction{};
instruction.memory = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_memory_barrier(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_load:
{
Op_atomic_load instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_load(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_store:
{
Op_atomic_store instruction{};
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_store(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_exchange:
{
Op_atomic_exchange instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_exchange(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_compare_exchange:
{
Op_atomic_compare_exchange instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.equal = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.unequal = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.comparator = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_compare_exchange(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_compare_exchange_weak:
{
Op_atomic_compare_exchange_weak instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.equal = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.unequal = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.comparator = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_compare_exchange_weak(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_i_increment:
{
Op_atomic_i_increment instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_i_increment(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_i_decrement:
{
Op_atomic_i_decrement instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_i_decrement(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_i_add:
{
Op_atomic_i_add instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_i_add(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_i_sub:
{
Op_atomic_i_sub instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_i_sub(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_s_min:
{
Op_atomic_s_min instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_s_min(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_u_min:
{
Op_atomic_u_min instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_u_min(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_s_max:
{
Op_atomic_s_max instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_s_max(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_u_max:
{
Op_atomic_u_max instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_u_max(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_and:
{
Op_atomic_and instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_and(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_or:
{
Op_atomic_or instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_or(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_xor:
{
Op_atomic_xor instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_xor(std::move(instruction), instruction_start_index);
break;
}
case Op::op_phi:
{
Op_phi instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.variable_parent.push_back(parse_pair_id_ref_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_phi(std::move(instruction), instruction_start_index);
break;
}
case Op::op_loop_merge:
{
Op_loop_merge instruction{};
instruction.merge_block = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.continue_target = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.loop_control = parse_loop_control(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_loop_merge(std::move(instruction), instruction_start_index);
break;
}
case Op::op_selection_merge:
{
Op_selection_merge instruction{};
instruction.merge_block = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.selection_control = parse_selection_control(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_selection_merge(std::move(instruction), instruction_start_index);
break;
}
case Op::op_label:
{
Op_label instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_label(std::move(instruction), instruction_start_index);
break;
}
case Op::op_branch:
{
Op_branch instruction{};
instruction.target_label = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_branch(std::move(instruction), instruction_start_index);
break;
}
case Op::op_branch_conditional:
{
Op_branch_conditional instruction{};
instruction.condition = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.true_label = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.false_label = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.branch_weights.push_back(parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1));
parser_callbacks.handle_instruction_op_branch_conditional(std::move(instruction), instruction_start_index);
break;
}
case Op::op_switch:
{
Op_switch instruction{};
instruction.selector = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.default_ = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.target.push_back(parse_pair_literal_integer_id_ref(word_index, instruction_start_index, instruction_end_index, get_operand_literal_integer_size(word_index, instruction_start_index, instruction.selector)));
parser_callbacks.handle_instruction_op_switch(std::move(instruction), instruction_start_index);
break;
}
case Op::op_kill:
{
Op_kill instruction{};
parser_callbacks.handle_instruction_op_kill(std::move(instruction), instruction_start_index);
break;
}
case Op::op_return:
{
Op_return instruction{};
parser_callbacks.handle_instruction_op_return(std::move(instruction), instruction_start_index);
break;
}
case Op::op_return_value:
{
Op_return_value instruction{};
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_return_value(std::move(instruction), instruction_start_index);
break;
}
case Op::op_unreachable:
{
Op_unreachable instruction{};
parser_callbacks.handle_instruction_op_unreachable(std::move(instruction), instruction_start_index);
break;
}
case Op::op_lifetime_start:
{
Op_lifetime_start instruction{};
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_lifetime_start(std::move(instruction), instruction_start_index);
break;
}
case Op::op_lifetime_stop:
{
Op_lifetime_stop instruction{};
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_lifetime_stop(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_async_copy:
{
Op_group_async_copy instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.destination = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.source = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_elements = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.stride = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_async_copy(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_wait_events:
{
Op_group_wait_events instruction{};
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.num_events = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.events_list = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_wait_events(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_all:
{
Op_group_all instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.predicate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_all(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_any:
{
Op_group_any instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.predicate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_any(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_broadcast:
{
Op_group_broadcast instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.local_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_broadcast(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_i_add:
{
Op_group_i_add instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_i_add(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_f_add:
{
Op_group_f_add instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_f_add(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_f_min:
{
Op_group_f_min instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_f_min(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_u_min:
{
Op_group_u_min instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_u_min(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_s_min:
{
Op_group_s_min instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_s_min(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_f_max:
{
Op_group_f_max instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_f_max(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_u_max:
{
Op_group_u_max instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_u_max(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_s_max:
{
Op_group_s_max instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.operation = parse_group_operation(word_index, instruction_start_index, instruction_end_index);
instruction.x = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_s_max(std::move(instruction), instruction_start_index);
break;
}
case Op::op_read_pipe:
{
Op_read_pipe instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_read_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_write_pipe:
{
Op_write_pipe instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_write_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_reserved_read_pipe:
{
Op_reserved_read_pipe instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.index = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_reserved_read_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_reserved_write_pipe:
{
Op_reserved_write_pipe instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.index = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_reserved_write_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_reserve_read_pipe_packets:
{
Op_reserve_read_pipe_packets instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_packets = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_reserve_read_pipe_packets(std::move(instruction), instruction_start_index);
break;
}
case Op::op_reserve_write_pipe_packets:
{
Op_reserve_write_pipe_packets instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_packets = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_reserve_write_pipe_packets(std::move(instruction), instruction_start_index);
break;
}
case Op::op_commit_read_pipe:
{
Op_commit_read_pipe instruction{};
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_commit_read_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_commit_write_pipe:
{
Op_commit_write_pipe instruction{};
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_commit_write_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_is_valid_reserve_id:
{
Op_is_valid_reserve_id instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_is_valid_reserve_id(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_num_pipe_packets:
{
Op_get_num_pipe_packets instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_num_pipe_packets(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_max_pipe_packets:
{
Op_get_max_pipe_packets instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_max_pipe_packets(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_reserve_read_pipe_packets:
{
Op_group_reserve_read_pipe_packets instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_packets = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_reserve_read_pipe_packets(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_reserve_write_pipe_packets:
{
Op_group_reserve_write_pipe_packets instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_packets = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_reserve_write_pipe_packets(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_commit_read_pipe:
{
Op_group_commit_read_pipe instruction{};
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_commit_read_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_group_commit_write_pipe:
{
Op_group_commit_write_pipe instruction{};
instruction.execution = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.pipe = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.reserve_id = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.packet_alignment = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_group_commit_write_pipe(std::move(instruction), instruction_start_index);
break;
}
case Op::op_enqueue_marker:
{
Op_enqueue_marker instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.queue = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_events = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.wait_events = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.ret_event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_enqueue_marker(std::move(instruction), instruction_start_index);
break;
}
case Op::op_enqueue_kernel:
{
Op_enqueue_kernel instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.queue = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.flags = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.nd_range = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.num_events = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.wait_events = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.ret_event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
while(word_index < instruction_end_index)
instruction.local_size.push_back(parse_id_ref(word_index, instruction_start_index, instruction_end_index));
parser_callbacks.handle_instruction_op_enqueue_kernel(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_kernel_n_drange_sub_group_count:
{
Op_get_kernel_n_drange_sub_group_count instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.nd_range = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_kernel_n_drange_sub_group_count(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_kernel_n_drange_max_sub_group_size:
{
Op_get_kernel_n_drange_max_sub_group_size instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.nd_range = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_kernel_n_drange_max_sub_group_size(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_kernel_work_group_size:
{
Op_get_kernel_work_group_size instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_kernel_work_group_size(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_kernel_preferred_work_group_size_multiple:
{
Op_get_kernel_preferred_work_group_size_multiple instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_kernel_preferred_work_group_size_multiple(std::move(instruction), instruction_start_index);
break;
}
case Op::op_retain_event:
{
Op_retain_event instruction{};
instruction.event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_retain_event(std::move(instruction), instruction_start_index);
break;
}
case Op::op_release_event:
{
Op_release_event instruction{};
instruction.event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_release_event(std::move(instruction), instruction_start_index);
break;
}
case Op::op_create_user_event:
{
Op_create_user_event instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_create_user_event(std::move(instruction), instruction_start_index);
break;
}
case Op::op_is_valid_event:
{
Op_is_valid_event instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_is_valid_event(std::move(instruction), instruction_start_index);
break;
}
case Op::op_set_user_event_status:
{
Op_set_user_event_status instruction{};
instruction.event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.status = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_set_user_event_status(std::move(instruction), instruction_start_index);
break;
}
case Op::op_capture_event_profiling_info:
{
Op_capture_event_profiling_info instruction{};
instruction.event = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.profiling_info = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_capture_event_profiling_info(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_default_queue:
{
Op_get_default_queue instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_default_queue(std::move(instruction), instruction_start_index);
break;
}
case Op::op_build_nd_range:
{
Op_build_nd_range instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.global_work_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.local_work_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.global_work_offset = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_build_nd_range(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_implicit_lod:
{
Op_image_sparse_sample_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_explicit_lod:
{
Op_image_sparse_sample_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_dref_implicit_lod:
{
Op_image_sparse_sample_dref_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_dref_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_dref_explicit_lod:
{
Op_image_sparse_sample_dref_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_dref_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_proj_implicit_lod:
{
Op_image_sparse_sample_proj_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_proj_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_proj_explicit_lod:
{
Op_image_sparse_sample_proj_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_proj_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_proj_dref_implicit_lod:
{
Op_image_sparse_sample_proj_dref_implicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_proj_dref_implicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_sample_proj_dref_explicit_lod:
{
Op_image_sparse_sample_proj_dref_explicit_lod instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_sample_proj_dref_explicit_lod(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_fetch:
{
Op_image_sparse_fetch instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_fetch(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_gather:
{
Op_image_sparse_gather instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.component = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_gather(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_dref_gather:
{
Op_image_sparse_dref_gather instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.sampled_image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.d_ref = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_dref_gather(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_texels_resident:
{
Op_image_sparse_texels_resident instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.resident_code = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_texels_resident(std::move(instruction), instruction_start_index);
break;
}
case Op::op_no_line:
{
Op_no_line instruction{};
parser_callbacks.handle_instruction_op_no_line(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_flag_test_and_set:
{
Op_atomic_flag_test_and_set instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_flag_test_and_set(std::move(instruction), instruction_start_index);
break;
}
case Op::op_atomic_flag_clear:
{
Op_atomic_flag_clear instruction{};
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.scope = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_atomic_flag_clear(std::move(instruction), instruction_start_index);
break;
}
case Op::op_image_sparse_read:
{
Op_image_sparse_read instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.image = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.coordinate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
if(word_index < instruction_end_index)
instruction.image_operands = parse_image_operands(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_image_sparse_read(std::move(instruction), instruction_start_index);
break;
}
case Op::op_size_of:
{
Op_size_of instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pointer = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_size_of(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_pipe_storage:
{
Op_type_pipe_storage instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_pipe_storage(std::move(instruction), instruction_start_index);
break;
}
case Op::op_constant_pipe_storage:
{
Op_constant_pipe_storage instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.packet_size = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.packet_alignment = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
instruction.capacity = parse_literal_integer(word_index, instruction_start_index, instruction_end_index, 1);
parser_callbacks.handle_instruction_op_constant_pipe_storage(std::move(instruction), instruction_start_index);
break;
}
case Op::op_create_pipe_from_pipe_storage:
{
Op_create_pipe_from_pipe_storage instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.pipe_storage = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_create_pipe_from_pipe_storage(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_kernel_local_size_for_subgroup_count:
{
Op_get_kernel_local_size_for_subgroup_count instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.subgroup_count = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_kernel_local_size_for_subgroup_count(std::move(instruction), instruction_start_index);
break;
}
case Op::op_get_kernel_max_num_subgroups:
{
Op_get_kernel_max_num_subgroups instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.invoke = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_size = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.param_align = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_get_kernel_max_num_subgroups(std::move(instruction), instruction_start_index);
break;
}
case Op::op_type_named_barrier:
{
Op_type_named_barrier instruction{};
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_type_named_barrier(std::move(instruction), instruction_start_index);
break;
}
case Op::op_named_barrier_initialize:
{
Op_named_barrier_initialize instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.subgroup_count = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_named_barrier_initialize(std::move(instruction), instruction_start_index);
break;
}
case Op::op_memory_named_barrier:
{
Op_memory_named_barrier instruction{};
instruction.named_barrier = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.memory = parse_id_scope(word_index, instruction_start_index, instruction_end_index);
instruction.semantics = parse_id_memory_semantics(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_memory_named_barrier(std::move(instruction), instruction_start_index);
break;
}
case Op::op_module_processed:
{
Op_module_processed instruction{};
instruction.process = parse_literal_string(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_module_processed(std::move(instruction), instruction_start_index);
break;
}
case Op::op_execution_mode_id:
{
Op_execution_mode_id instruction{};
instruction.entry_point = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.mode = parse_execution_mode(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_execution_mode_id(std::move(instruction), instruction_start_index);
break;
}
case Op::op_decorate_id:
{
Op_decorate_id instruction{};
instruction.target = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.decoration = parse_decoration(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_decorate_id(std::move(instruction), instruction_start_index);
break;
}
case Op::op_subgroup_ballot_khr:
{
Op_subgroup_ballot_khr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.predicate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_subgroup_ballot_khr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_subgroup_first_invocation_khr:
{
Op_subgroup_first_invocation_khr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_subgroup_first_invocation_khr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_subgroup_all_khr:
{
Op_subgroup_all_khr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.predicate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_subgroup_all_khr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_subgroup_any_khr:
{
Op_subgroup_any_khr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.predicate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_subgroup_any_khr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_subgroup_all_equal_khr:
{
Op_subgroup_all_equal_khr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.predicate = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_subgroup_all_equal_khr(std::move(instruction), instruction_start_index);
break;
}
case Op::op_subgroup_read_invocation_khr:
{
Op_subgroup_read_invocation_khr instruction{};
instruction.result_type = parse_id_result_type(word_index, instruction_start_index, instruction_end_index);
instruction.result = parse_id_result(word_index, instruction_start_index, instruction_end_index);
instruction.value = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
instruction.index = parse_id_ref(word_index, instruction_start_index, instruction_end_index);
parser_callbacks.handle_instruction_op_subgroup_read_invocation_khr(std::move(instruction), instruction_start_index);
break;
}
default:
throw Parser_error(word_index, instruction_start_index, "unknown instruction");
}
if(word_index != instruction_end_index)
throw Parser_error(word_index, instruction_start_index, "instruction has extra words after end");
}
}
public:
static constexpr Word max_id_bound() noexcept
{
return 0x1000'0000UL;
}
static void parse(Parser_callbacks &parser_callbacks,
const Word *shader_words,
std::size_t shader_size)
{
Parser(parser_callbacks, shader_words, shader_size).parse();
}
};
void parse(Parser_callbacks &parser_callbacks,
const Word *shader_words,
std::size_t shader_size)
{
Parser::parse(parser_callbacks, shader_words, shader_size);
}
}
}
This file has been truncated, but you can view the full file.
/* This file is automatically generated by generate_spirv_parser. DO NOT MODIFY. */
/*
* Copyright (c) 2014-2016 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and/or associated documentation files (the "Materials"),
* to deal in the Materials without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Materials, and to permit persons to whom the
* Materials are furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Materials.
*
* MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
* STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
* HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
* IN THE MATERIALS.
*/
#ifndef SPIRV_PARSER_H_
#define SPIRV_PARSER_H_
#include "spirv.h"
#include "util/string_view.h"
#include <sstream>
#include <stdexcept>
namespace vulkan_cpu
{
namespace spirv
{
struct Parser_error : public std::runtime_error
{
std::size_t error_index;
std::size_t instruction_start_index;
static std::string make_error_message(std::size_t error_index,
std::size_t instruction_start_index,
util::string_view message)
{
std::ostringstream ss;
ss << "parse error at 0x" << std::hex << std::uppercase << error_index;
if(instruction_start_index != 0)
ss << " (instruction starts at 0x" << instruction_start_index << ")";
ss << ": " << message;
return ss.str();
}
Parser_error(std::size_t error_index, std::size_t instruction_start_index, util::string_view message)
: runtime_error(make_error_message(error_index, instruction_start_index, message)),
error_index(error_index),
instruction_start_index(instruction_start_index)
{
}
};
struct Parser_callbacks
{
virtual ~Parser_callbacks() = default;
virtual void handle_header(unsigned version_number_major,
unsigned version_number_minor,
Word generator_magic_number,
Word id_bound,
Word instruction_schema) = 0;
virtual void handle_instruction_op_nop(Op_nop instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_undef(Op_undef instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_source_continued(Op_source_continued instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_source(Op_source instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_source_extension(Op_source_extension instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_name(Op_name instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_member_name(Op_member_name instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_string(Op_string instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_line(Op_line instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_extension(Op_extension instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_ext_inst_import(Op_ext_inst_import instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_ext_inst(Op_ext_inst instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_memory_model(Op_memory_model instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_entry_point(Op_entry_point instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_execution_mode(Op_execution_mode instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_capability(Op_capability instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_void(Op_type_void instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_bool(Op_type_bool instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_int(Op_type_int instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_float(Op_type_float instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_vector(Op_type_vector instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_matrix(Op_type_matrix instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_image(Op_type_image instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_sampler(Op_type_sampler instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_sampled_image(Op_type_sampled_image instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_array(Op_type_array instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_runtime_array(Op_type_runtime_array instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_struct(Op_type_struct instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_opaque(Op_type_opaque instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_pointer(Op_type_pointer instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_function(Op_type_function instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_event(Op_type_event instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_device_event(Op_type_device_event instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_reserve_id(Op_type_reserve_id instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_queue(Op_type_queue instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_pipe(Op_type_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_forward_pointer(Op_type_forward_pointer instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant_true(Op_constant_true instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant_false(Op_constant_false instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant(Op_constant instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant_composite(Op_constant_composite instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant_sampler(Op_constant_sampler instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant_null(Op_constant_null instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_spec_constant_true(Op_spec_constant_true instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_spec_constant_false(Op_spec_constant_false instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_spec_constant(Op_spec_constant instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_spec_constant_composite(Op_spec_constant_composite instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_spec_constant_op(Op_spec_constant_op instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_function(Op_function instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_function_parameter(Op_function_parameter instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_function_end(Op_function_end instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_function_call(Op_function_call instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_variable(Op_variable instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_texel_pointer(Op_image_texel_pointer instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_load(Op_load instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_store(Op_store instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_copy_memory(Op_copy_memory instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_copy_memory_sized(Op_copy_memory_sized instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_access_chain(Op_access_chain instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_in_bounds_access_chain(Op_in_bounds_access_chain instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_ptr_access_chain(Op_ptr_access_chain instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_array_length(Op_array_length instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_generic_ptr_mem_semantics(Op_generic_ptr_mem_semantics instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_in_bounds_ptr_access_chain(Op_in_bounds_ptr_access_chain instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_decorate(Op_decorate instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_member_decorate(Op_member_decorate instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_decoration_group(Op_decoration_group instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_decorate(Op_group_decorate instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_member_decorate(Op_group_member_decorate instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_vector_extract_dynamic(Op_vector_extract_dynamic instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_vector_insert_dynamic(Op_vector_insert_dynamic instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_vector_shuffle(Op_vector_shuffle instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_composite_construct(Op_composite_construct instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_composite_extract(Op_composite_extract instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_composite_insert(Op_composite_insert instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_copy_object(Op_copy_object instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_transpose(Op_transpose instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_sampled_image(Op_sampled_image instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_implicit_lod(Op_image_sample_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_explicit_lod(Op_image_sample_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_dref_implicit_lod(Op_image_sample_dref_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_dref_explicit_lod(Op_image_sample_dref_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_proj_implicit_lod(Op_image_sample_proj_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_proj_explicit_lod(Op_image_sample_proj_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_proj_dref_implicit_lod(Op_image_sample_proj_dref_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sample_proj_dref_explicit_lod(Op_image_sample_proj_dref_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_fetch(Op_image_fetch instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_gather(Op_image_gather instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_dref_gather(Op_image_dref_gather instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_read(Op_image_read instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_write(Op_image_write instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image(Op_image instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_format(Op_image_query_format instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_order(Op_image_query_order instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_size_lod(Op_image_query_size_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_size(Op_image_query_size instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_lod(Op_image_query_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_levels(Op_image_query_levels instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_query_samples(Op_image_query_samples instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_convert_f_to_u(Op_convert_f_to_u instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_convert_f_to_s(Op_convert_f_to_s instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_convert_s_to_f(Op_convert_s_to_f instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_convert_u_to_f(Op_convert_u_to_f instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_convert(Op_u_convert instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_convert(Op_s_convert instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_convert(Op_f_convert instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_quantize_to_f16(Op_quantize_to_f16 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_convert_ptr_to_u(Op_convert_ptr_to_u instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_sat_convert_s_to_u(Op_sat_convert_s_to_u instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_sat_convert_u_to_s(Op_sat_convert_u_to_s instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_convert_u_to_ptr(Op_convert_u_to_ptr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_ptr_cast_to_generic(Op_ptr_cast_to_generic instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_generic_cast_to_ptr(Op_generic_cast_to_ptr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_generic_cast_to_ptr_explicit(Op_generic_cast_to_ptr_explicit instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bitcast(Op_bitcast instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_negate(Op_s_negate instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_negate(Op_f_negate instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_add(Op_i_add instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_add(Op_f_add instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_sub(Op_i_sub instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_sub(Op_f_sub instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_mul(Op_i_mul instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_mul(Op_f_mul instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_div(Op_u_div instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_div(Op_s_div instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_div(Op_f_div instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_mod(Op_u_mod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_rem(Op_s_rem instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_mod(Op_s_mod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_rem(Op_f_rem instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_mod(Op_f_mod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_vector_times_scalar(Op_vector_times_scalar instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_matrix_times_scalar(Op_matrix_times_scalar instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_vector_times_matrix(Op_vector_times_matrix instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_matrix_times_vector(Op_matrix_times_vector instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_matrix_times_matrix(Op_matrix_times_matrix instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_outer_product(Op_outer_product instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_dot(Op_dot instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_add_carry(Op_i_add_carry instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_sub_borrow(Op_i_sub_borrow instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_mul_extended(Op_u_mul_extended instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_mul_extended(Op_s_mul_extended instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_any(Op_any instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_all(Op_all instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_is_nan(Op_is_nan instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_is_inf(Op_is_inf instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_is_finite(Op_is_finite instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_is_normal(Op_is_normal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_sign_bit_set(Op_sign_bit_set instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_less_or_greater(Op_less_or_greater instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_ordered(Op_ordered instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_unordered(Op_unordered instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_logical_equal(Op_logical_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_logical_not_equal(Op_logical_not_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_logical_or(Op_logical_or instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_logical_and(Op_logical_and instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_logical_not(Op_logical_not instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_select(Op_select instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_equal(Op_i_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_i_not_equal(Op_i_not_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_greater_than(Op_u_greater_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_greater_than(Op_s_greater_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_greater_than_equal(Op_u_greater_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_greater_than_equal(Op_s_greater_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_less_than(Op_u_less_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_less_than(Op_s_less_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_u_less_than_equal(Op_u_less_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_s_less_than_equal(Op_s_less_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_ord_equal(Op_f_ord_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_unord_equal(Op_f_unord_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_ord_not_equal(Op_f_ord_not_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_unord_not_equal(Op_f_unord_not_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_ord_less_than(Op_f_ord_less_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_unord_less_than(Op_f_unord_less_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_ord_greater_than(Op_f_ord_greater_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_unord_greater_than(Op_f_unord_greater_than instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_ord_less_than_equal(Op_f_ord_less_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_unord_less_than_equal(Op_f_unord_less_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_ord_greater_than_equal(Op_f_ord_greater_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_f_unord_greater_than_equal(Op_f_unord_greater_than_equal instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_shift_right_logical(Op_shift_right_logical instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_shift_right_arithmetic(Op_shift_right_arithmetic instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_shift_left_logical(Op_shift_left_logical instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bitwise_or(Op_bitwise_or instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bitwise_xor(Op_bitwise_xor instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bitwise_and(Op_bitwise_and instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_not(Op_not instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bit_field_insert(Op_bit_field_insert instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bit_field_s_extract(Op_bit_field_s_extract instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bit_field_u_extract(Op_bit_field_u_extract instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bit_reverse(Op_bit_reverse instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_bit_count(Op_bit_count instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_d_pdx(Op_d_pdx instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_d_pdy(Op_d_pdy instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_fwidth(Op_fwidth instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_d_pdx_fine(Op_d_pdx_fine instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_d_pdy_fine(Op_d_pdy_fine instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_fwidth_fine(Op_fwidth_fine instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_d_pdx_coarse(Op_d_pdx_coarse instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_d_pdy_coarse(Op_d_pdy_coarse instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_fwidth_coarse(Op_fwidth_coarse instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_emit_vertex(Op_emit_vertex instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_end_primitive(Op_end_primitive instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_emit_stream_vertex(Op_emit_stream_vertex instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_end_stream_primitive(Op_end_stream_primitive instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_control_barrier(Op_control_barrier instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_memory_barrier(Op_memory_barrier instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_load(Op_atomic_load instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_store(Op_atomic_store instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_exchange(Op_atomic_exchange instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_compare_exchange(Op_atomic_compare_exchange instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_compare_exchange_weak(Op_atomic_compare_exchange_weak instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_i_increment(Op_atomic_i_increment instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_i_decrement(Op_atomic_i_decrement instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_i_add(Op_atomic_i_add instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_i_sub(Op_atomic_i_sub instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_s_min(Op_atomic_s_min instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_u_min(Op_atomic_u_min instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_s_max(Op_atomic_s_max instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_u_max(Op_atomic_u_max instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_and(Op_atomic_and instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_or(Op_atomic_or instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_xor(Op_atomic_xor instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_phi(Op_phi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_loop_merge(Op_loop_merge instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_selection_merge(Op_selection_merge instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_label(Op_label instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_branch(Op_branch instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_branch_conditional(Op_branch_conditional instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_switch(Op_switch instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_kill(Op_kill instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_return(Op_return instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_return_value(Op_return_value instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_unreachable(Op_unreachable instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_lifetime_start(Op_lifetime_start instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_lifetime_stop(Op_lifetime_stop instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_async_copy(Op_group_async_copy instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_wait_events(Op_group_wait_events instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_all(Op_group_all instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_any(Op_group_any instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_broadcast(Op_group_broadcast instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_i_add(Op_group_i_add instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_f_add(Op_group_f_add instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_f_min(Op_group_f_min instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_u_min(Op_group_u_min instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_s_min(Op_group_s_min instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_f_max(Op_group_f_max instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_u_max(Op_group_u_max instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_s_max(Op_group_s_max instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_read_pipe(Op_read_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_write_pipe(Op_write_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_reserved_read_pipe(Op_reserved_read_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_reserved_write_pipe(Op_reserved_write_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_reserve_read_pipe_packets(Op_reserve_read_pipe_packets instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_reserve_write_pipe_packets(Op_reserve_write_pipe_packets instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_commit_read_pipe(Op_commit_read_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_commit_write_pipe(Op_commit_write_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_is_valid_reserve_id(Op_is_valid_reserve_id instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_num_pipe_packets(Op_get_num_pipe_packets instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_max_pipe_packets(Op_get_max_pipe_packets instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_reserve_read_pipe_packets(Op_group_reserve_read_pipe_packets instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_reserve_write_pipe_packets(Op_group_reserve_write_pipe_packets instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_commit_read_pipe(Op_group_commit_read_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_group_commit_write_pipe(Op_group_commit_write_pipe instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_enqueue_marker(Op_enqueue_marker instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_enqueue_kernel(Op_enqueue_kernel instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_kernel_n_drange_sub_group_count(Op_get_kernel_n_drange_sub_group_count instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_kernel_n_drange_max_sub_group_size(Op_get_kernel_n_drange_max_sub_group_size instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_kernel_work_group_size(Op_get_kernel_work_group_size instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_kernel_preferred_work_group_size_multiple(Op_get_kernel_preferred_work_group_size_multiple instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_retain_event(Op_retain_event instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_release_event(Op_release_event instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_create_user_event(Op_create_user_event instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_is_valid_event(Op_is_valid_event instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_set_user_event_status(Op_set_user_event_status instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_capture_event_profiling_info(Op_capture_event_profiling_info instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_default_queue(Op_get_default_queue instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_build_nd_range(Op_build_nd_range instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_implicit_lod(Op_image_sparse_sample_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_explicit_lod(Op_image_sparse_sample_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_dref_implicit_lod(Op_image_sparse_sample_dref_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_dref_explicit_lod(Op_image_sparse_sample_dref_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_proj_implicit_lod(Op_image_sparse_sample_proj_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_proj_explicit_lod(Op_image_sparse_sample_proj_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_proj_dref_implicit_lod(Op_image_sparse_sample_proj_dref_implicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_sample_proj_dref_explicit_lod(Op_image_sparse_sample_proj_dref_explicit_lod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_fetch(Op_image_sparse_fetch instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_gather(Op_image_sparse_gather instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_dref_gather(Op_image_sparse_dref_gather instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_texels_resident(Op_image_sparse_texels_resident instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_no_line(Op_no_line instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_flag_test_and_set(Op_atomic_flag_test_and_set instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_atomic_flag_clear(Op_atomic_flag_clear instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_image_sparse_read(Op_image_sparse_read instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_size_of(Op_size_of instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_pipe_storage(Op_type_pipe_storage instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_constant_pipe_storage(Op_constant_pipe_storage instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_create_pipe_from_pipe_storage(Op_create_pipe_from_pipe_storage instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_kernel_local_size_for_subgroup_count(Op_get_kernel_local_size_for_subgroup_count instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_get_kernel_max_num_subgroups(Op_get_kernel_max_num_subgroups instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_type_named_barrier(Op_type_named_barrier instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_named_barrier_initialize(Op_named_barrier_initialize instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_memory_named_barrier(Op_memory_named_barrier instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_module_processed(Op_module_processed instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_execution_mode_id(Op_execution_mode_id instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_decorate_id(Op_decorate_id instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_subgroup_ballot_khr(Op_subgroup_ballot_khr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_subgroup_first_invocation_khr(Op_subgroup_first_invocation_khr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_subgroup_all_khr(Op_subgroup_all_khr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_subgroup_any_khr(Op_subgroup_any_khr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_subgroup_all_equal_khr(Op_subgroup_all_equal_khr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_op_subgroup_read_invocation_khr(Op_subgroup_read_invocation_khr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_acos(Open_cl_std_op_acos instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_acosh(Open_cl_std_op_acosh instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_acospi(Open_cl_std_op_acospi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_asin(Open_cl_std_op_asin instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_asinh(Open_cl_std_op_asinh instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_asinpi(Open_cl_std_op_asinpi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_atan(Open_cl_std_op_atan instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_atan2(Open_cl_std_op_atan2 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_atanh(Open_cl_std_op_atanh instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_atanpi(Open_cl_std_op_atanpi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_atan2pi(Open_cl_std_op_atan2pi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_cbrt(Open_cl_std_op_cbrt instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_ceil(Open_cl_std_op_ceil instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_copysign(Open_cl_std_op_copysign instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_cos(Open_cl_std_op_cos instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_cosh(Open_cl_std_op_cosh instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_cospi(Open_cl_std_op_cospi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_erfc(Open_cl_std_op_erfc instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_erf(Open_cl_std_op_erf instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_exp(Open_cl_std_op_exp instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_exp2(Open_cl_std_op_exp2 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_exp10(Open_cl_std_op_exp10 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_expm1(Open_cl_std_op_expm1 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fabs(Open_cl_std_op_fabs instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fdim(Open_cl_std_op_fdim instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_floor(Open_cl_std_op_floor instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fma(Open_cl_std_op_fma instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fmax(Open_cl_std_op_fmax instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fmin(Open_cl_std_op_fmin instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fmod(Open_cl_std_op_fmod instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_fract(Open_cl_std_op_fract instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_frexp(Open_cl_std_op_frexp instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_hypot(Open_cl_std_op_hypot instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_ilogb(Open_cl_std_op_ilogb instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_ldexp(Open_cl_std_op_ldexp instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_lgamma(Open_cl_std_op_lgamma instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_lgamma_r(Open_cl_std_op_lgamma_r instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_log(Open_cl_std_op_log instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_log2(Open_cl_std_op_log2 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_log10(Open_cl_std_op_log10 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_log1p(Open_cl_std_op_log1p instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_logb(Open_cl_std_op_logb instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_mad(Open_cl_std_op_mad instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_maxmag(Open_cl_std_op_maxmag instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_minmag(Open_cl_std_op_minmag instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_modf(Open_cl_std_op_modf instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_nan(Open_cl_std_op_nan instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_nextafter(Open_cl_std_op_nextafter instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_pow(Open_cl_std_op_pow instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_pown(Open_cl_std_op_pown instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_powr(Open_cl_std_op_powr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_remainder(Open_cl_std_op_remainder instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_remquo(Open_cl_std_op_remquo instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_rint(Open_cl_std_op_rint instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_rootn(Open_cl_std_op_rootn instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_round(Open_cl_std_op_round instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_rsqrt(Open_cl_std_op_rsqrt instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_sin(Open_cl_std_op_sin instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_sincos(Open_cl_std_op_sincos instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_sinh(Open_cl_std_op_sinh instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_sinpi(Open_cl_std_op_sinpi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_sqrt(Open_cl_std_op_sqrt instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_tan(Open_cl_std_op_tan instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_tanh(Open_cl_std_op_tanh instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_tanpi(Open_cl_std_op_tanpi instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_tgamma(Open_cl_std_op_tgamma instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_trunc(Open_cl_std_op_trunc instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_cos(Open_cl_std_op_half_cos instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_divide(Open_cl_std_op_half_divide instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_exp(Open_cl_std_op_half_exp instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_exp2(Open_cl_std_op_half_exp2 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_exp10(Open_cl_std_op_half_exp10 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_log(Open_cl_std_op_half_log instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_log2(Open_cl_std_op_half_log2 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_log10(Open_cl_std_op_half_log10 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_powr(Open_cl_std_op_half_powr instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_recip(Open_cl_std_op_half_recip instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_rsqrt(Open_cl_std_op_half_rsqrt instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_sin(Open_cl_std_op_half_sin instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_sqrt(Open_cl_std_op_half_sqrt instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_half_tan(Open_cl_std_op_half_tan instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_native_cos(Open_cl_std_op_native_cos instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_native_divide(Open_cl_std_op_native_divide instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_native_exp(Open_cl_std_op_native_exp instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_native_exp2(Open_cl_std_op_native_exp2 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_native_exp10(Open_cl_std_op_native_exp10 instruction, std::size_t instruction_start_index) = 0;
virtual void handle_instruction_open_cl_std_op_native_log(Open_cl_std_op_native_log instruction, st
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment