diff options
Diffstat (limited to 'src/shader_recompiler/backend')
9 files changed, 1167 insertions, 840 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_context.cpp b/src/shader_recompiler/backend/glasm/emit_context.cpp index b4db4ff8f..9f839f3bf 100644 --- a/src/shader_recompiler/backend/glasm/emit_context.cpp +++ b/src/shader_recompiler/backend/glasm/emit_context.cpp | |||
| @@ -3,9 +3,28 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "shader_recompiler/backend/glasm/emit_context.h" | 5 | #include "shader_recompiler/backend/glasm/emit_context.h" |
| 6 | #include "shader_recompiler/frontend/ir/program.h" | ||
| 6 | 7 | ||
| 7 | namespace Shader::Backend::GLASM { | 8 | namespace Shader::Backend::GLASM { |
| 8 | 9 | ||
| 9 | EmitContext::EmitContext() = default; | 10 | EmitContext::EmitContext(IR::Program& program) { |
| 11 | // FIXME: Temporary partial implementation | ||
| 12 | u32 cbuf_index{}; | ||
| 13 | for (const auto& desc : program.info.constant_buffer_descriptors) { | ||
| 14 | if (desc.count != 1) { | ||
| 15 | throw NotImplementedException("Constant buffer descriptor array"); | ||
| 16 | } | ||
| 17 | Add("CBUFFER c{}[]={{program.buffer[{}]}};", desc.index, cbuf_index); | ||
| 18 | ++cbuf_index; | ||
| 19 | } | ||
| 20 | for (const auto& desc : program.info.storage_buffers_descriptors) { | ||
| 21 | if (desc.count != 1) { | ||
| 22 | throw NotImplementedException("Storage buffer descriptor array"); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | if (const size_t num = program.info.storage_buffers_descriptors.size(); num > 0) { | ||
| 26 | Add("PARAM c[{}]={{program.local[0..{}]}};", num, num - 1); | ||
| 27 | } | ||
| 28 | } | ||
| 10 | 29 | ||
| 11 | } // namespace Shader::Backend::GLASM | 30 | } // namespace Shader::Backend::GLASM |
diff --git a/src/shader_recompiler/backend/glasm/emit_context.h b/src/shader_recompiler/backend/glasm/emit_context.h index cf66619de..4f98a9816 100644 --- a/src/shader_recompiler/backend/glasm/emit_context.h +++ b/src/shader_recompiler/backend/glasm/emit_context.h | |||
| @@ -13,13 +13,14 @@ | |||
| 13 | 13 | ||
| 14 | namespace Shader::IR { | 14 | namespace Shader::IR { |
| 15 | class Inst; | 15 | class Inst; |
| 16 | } | 16 | struct Program; |
| 17 | } // namespace Shader::IR | ||
| 17 | 18 | ||
| 18 | namespace Shader::Backend::GLASM { | 19 | namespace Shader::Backend::GLASM { |
| 19 | 20 | ||
| 20 | class EmitContext { | 21 | class EmitContext { |
| 21 | public: | 22 | public: |
| 22 | explicit EmitContext(); | 23 | explicit EmitContext(IR::Program& program); |
| 23 | 24 | ||
| 24 | template <typename... Args> | 25 | template <typename... Args> |
| 25 | void Add(const char* fmt, IR::Inst& inst, Args&&... args) { | 26 | void Add(const char* fmt, IR::Inst& inst, Args&&... args) { |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index 59d7c0f96..65600f58c 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -50,7 +50,7 @@ template <auto func, bool is_first_arg_inst, size_t... I> | |||
| 50 | void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence<I...>) { | 50 | void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence<I...>) { |
| 51 | using Traits = FuncTraits<decltype(func)>; | 51 | using Traits = FuncTraits<decltype(func)>; |
| 52 | if constexpr (is_first_arg_inst) { | 52 | if constexpr (is_first_arg_inst) { |
| 53 | func(ctx, inst, Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...); | 53 | func(ctx, *inst, Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...); |
| 54 | } else { | 54 | } else { |
| 55 | func(ctx, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...); | 55 | func(ctx, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...); |
| 56 | } | 56 | } |
| @@ -64,7 +64,7 @@ void Invoke(EmitContext& ctx, IR::Inst* inst) { | |||
| 64 | Invoke<func, false>(ctx, inst, std::make_index_sequence<0>{}); | 64 | Invoke<func, false>(ctx, inst, std::make_index_sequence<0>{}); |
| 65 | } else { | 65 | } else { |
| 66 | using FirstArgType = typename Traits::template ArgType<1>; | 66 | using FirstArgType = typename Traits::template ArgType<1>; |
| 67 | static constexpr bool is_first_arg_inst = std::is_same_v<FirstArgType, IR::Inst*>; | 67 | static constexpr bool is_first_arg_inst = std::is_same_v<FirstArgType, IR::Inst&>; |
| 68 | using Indices = std::make_index_sequence<Traits::NUM_ARGS - (is_first_arg_inst ? 2 : 1)>; | 68 | using Indices = std::make_index_sequence<Traits::NUM_ARGS - (is_first_arg_inst ? 2 : 1)>; |
| 69 | Invoke<func, is_first_arg_inst>(ctx, inst, Indices{}); | 69 | Invoke<func, is_first_arg_inst>(ctx, inst, Indices{}); |
| 70 | } | 70 | } |
| @@ -80,16 +80,76 @@ void EmitInst(EmitContext& ctx, IR::Inst* inst) { | |||
| 80 | } | 80 | } |
| 81 | throw LogicError("Invalid opcode {}", inst->GetOpcode()); | 81 | throw LogicError("Invalid opcode {}", inst->GetOpcode()); |
| 82 | } | 82 | } |
| 83 | |||
| 84 | void Identity(IR::Inst& inst, const IR::Value& value) { | ||
| 85 | if (value.IsImmediate()) { | ||
| 86 | return; | ||
| 87 | } | ||
| 88 | IR::Inst* const value_inst{value.InstRecursive()}; | ||
| 89 | if (inst.GetOpcode() == IR::Opcode::Identity) { | ||
| 90 | value_inst->DestructiveAddUsage(inst.UseCount()); | ||
| 91 | value_inst->DestructiveRemoveUsage(); | ||
| 92 | } | ||
| 93 | inst.SetDefinition(value_inst->Definition<Id>()); | ||
| 94 | } | ||
| 83 | } // Anonymous namespace | 95 | } // Anonymous namespace |
| 84 | 96 | ||
| 85 | std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { | 97 | std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { |
| 86 | EmitContext ctx; | 98 | EmitContext ctx{program}; |
| 87 | for (IR::Block* const block : program.blocks) { | 99 | for (IR::Block* const block : program.blocks) { |
| 88 | for (IR::Inst& inst : block->Instructions()) { | 100 | for (IR::Inst& inst : block->Instructions()) { |
| 89 | EmitInst(ctx, &inst); | 101 | EmitInst(ctx, &inst); |
| 90 | } | 102 | } |
| 91 | } | 103 | } |
| 104 | std::string header = "!!NVcp5.0\n" | ||
| 105 | "OPTION NV_internal;"; | ||
| 106 | switch (program.stage) { | ||
| 107 | case Stage::Compute: | ||
| 108 | header += fmt::format("GROUP_SIZE {} {} {};", program.workgroup_size[0], | ||
| 109 | program.workgroup_size[1], program.workgroup_size[2]); | ||
| 110 | break; | ||
| 111 | default: | ||
| 112 | break; | ||
| 113 | } | ||
| 114 | header += "TEMP "; | ||
| 115 | for (size_t index = 0; index < ctx.reg_alloc.NumUsedRegisters(); ++index) { | ||
| 116 | header += fmt::format("R{},", index); | ||
| 117 | } | ||
| 118 | header += "RC;"; | ||
| 119 | if (!program.info.storage_buffers_descriptors.empty()) { | ||
| 120 | header += "LONG TEMP LC;"; | ||
| 121 | } | ||
| 122 | ctx.code.insert(0, header); | ||
| 123 | ctx.code += "END"; | ||
| 92 | return ctx.code; | 124 | return ctx.code; |
| 93 | } | 125 | } |
| 94 | 126 | ||
| 127 | void EmitIdentity(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 128 | Identity(inst, value); | ||
| 129 | } | ||
| 130 | |||
| 131 | void EmitBitCastU16F16(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 132 | Identity(inst, value); | ||
| 133 | } | ||
| 134 | |||
| 135 | void EmitBitCastU32F32(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 136 | Identity(inst, value); | ||
| 137 | } | ||
| 138 | |||
| 139 | void EmitBitCastU64F64(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 140 | Identity(inst, value); | ||
| 141 | } | ||
| 142 | |||
| 143 | void EmitBitCastF16U16(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 144 | Identity(inst, value); | ||
| 145 | } | ||
| 146 | |||
| 147 | void EmitBitCastF32U32(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 148 | Identity(inst, value); | ||
| 149 | } | ||
| 150 | |||
| 151 | void EmitBitCastF64U64(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) { | ||
| 152 | Identity(inst, value); | ||
| 153 | } | ||
| 154 | |||
| 95 | } // namespace Shader::Backend::GLASM | 155 | } // namespace Shader::Backend::GLASM |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index e69de29bb..72733d1cf 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <string_view> | ||
| 6 | |||
| 7 | #include "shader_recompiler/backend/glasm/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | |||
| 11 | namespace Shader::Backend::GLASM { | ||
| 12 | namespace { | ||
| 13 | void GetCbuf(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, const IR::Value& offset, | ||
| 14 | std::string_view size) { | ||
| 15 | if (!binding.IsImmediate()) { | ||
| 16 | throw NotImplementedException("Indirect constant buffer loading"); | ||
| 17 | } | ||
| 18 | const std::string ret{ctx.reg_alloc.Define(inst)}; | ||
| 19 | ctx.Add("LDC.{} {},c{}[{}];", size, ret, binding.U32(), ctx.reg_alloc.Consume(offset)); | ||
| 20 | } | ||
| 21 | } // Anonymous namespace | ||
| 22 | |||
| 23 | void EmitGetCbufU8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 24 | const IR::Value& offset) { | ||
| 25 | GetCbuf(ctx, inst, binding, offset, "U8"); | ||
| 26 | } | ||
| 27 | |||
| 28 | void EmitGetCbufS8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 29 | const IR::Value& offset) { | ||
| 30 | GetCbuf(ctx, inst, binding, offset, "S8"); | ||
| 31 | } | ||
| 32 | |||
| 33 | void EmitGetCbufU16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 34 | const IR::Value& offset) { | ||
| 35 | GetCbuf(ctx, inst, binding, offset, "U16"); | ||
| 36 | } | ||
| 37 | |||
| 38 | void EmitGetCbufS16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 39 | const IR::Value& offset) { | ||
| 40 | GetCbuf(ctx, inst, binding, offset, "S16"); | ||
| 41 | } | ||
| 42 | |||
| 43 | void EmitGetCbufU32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 44 | const IR::Value& offset) { | ||
| 45 | GetCbuf(ctx, inst, binding, offset, "U32"); | ||
| 46 | } | ||
| 47 | |||
| 48 | void EmitGetCbufF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 49 | const IR::Value& offset) { | ||
| 50 | GetCbuf(ctx, inst, binding, offset, "F32"); | ||
| 51 | } | ||
| 52 | |||
| 53 | void EmitGetCbufU32x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 54 | const IR::Value& offset) { | ||
| 55 | GetCbuf(ctx, inst, binding, offset, "U32X2"); | ||
| 56 | } | ||
| 57 | |||
| 58 | void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, | ||
| 59 | [[maybe_unused]] std::string_view vertex) { | ||
| 60 | if (IR::IsGeneric(attr)) { | ||
| 61 | const u32 index{IR::GenericAttributeIndex(attr)}; | ||
| 62 | const u32 element{IR::GenericAttributeElement(attr)}; | ||
| 63 | ctx.Add("MOV.F {},in_attr{}.{};", inst, index, "xyzw"[element]); | ||
| 64 | return; | ||
| 65 | } | ||
| 66 | throw NotImplementedException("Get attribute {}", attr); | ||
| 67 | } | ||
| 68 | |||
| 69 | void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value, | ||
| 70 | [[maybe_unused]] std::string_view vertex) { | ||
| 71 | const u32 element{static_cast<u32>(attr) % 4}; | ||
| 72 | const char swizzle{"xyzw"[element]}; | ||
| 73 | if (IR::IsGeneric(attr)) { | ||
| 74 | const u32 index{IR::GenericAttributeIndex(attr)}; | ||
| 75 | ctx.Add("MOV.F out_attr{}.{},{};", index, swizzle, value); | ||
| 76 | return; | ||
| 77 | } | ||
| 78 | switch (attr) { | ||
| 79 | case IR::Attribute::PositionX: | ||
| 80 | case IR::Attribute::PositionY: | ||
| 81 | case IR::Attribute::PositionZ: | ||
| 82 | case IR::Attribute::PositionW: | ||
| 83 | ctx.Add("MOV.F result.position.{},{};", swizzle, value); | ||
| 84 | break; | ||
| 85 | default: | ||
| 86 | throw NotImplementedException("Set attribute {}", attr); | ||
| 87 | } | ||
| 88 | } | ||
| 89 | |||
| 90 | void EmitGetAttributeIndexed([[maybe_unused]] EmitContext& ctx, | ||
| 91 | [[maybe_unused]] std::string_view offset, | ||
| 92 | [[maybe_unused]] std::string_view vertex) { | ||
| 93 | throw NotImplementedException("GLASM instruction"); | ||
| 94 | } | ||
| 95 | |||
| 96 | void EmitSetAttributeIndexed([[maybe_unused]] EmitContext& ctx, | ||
| 97 | [[maybe_unused]] std::string_view offset, | ||
| 98 | [[maybe_unused]] std::string_view value, | ||
| 99 | [[maybe_unused]] std::string_view vertex) { | ||
| 100 | throw NotImplementedException("GLASM instruction"); | ||
| 101 | } | ||
| 102 | |||
| 103 | void EmitGetPatch([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Patch patch) { | ||
| 104 | throw NotImplementedException("GLASM instruction"); | ||
| 105 | } | ||
| 106 | |||
| 107 | void EmitSetPatch([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Patch patch, | ||
| 108 | [[maybe_unused]] std::string_view value) { | ||
| 109 | throw NotImplementedException("GLASM instruction"); | ||
| 110 | } | ||
| 111 | |||
| 112 | void EmitSetFragColor([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] u32 index, | ||
| 113 | [[maybe_unused]] u32 component, [[maybe_unused]] std::string_view value) { | ||
| 114 | throw NotImplementedException("GLASM instruction"); | ||
| 115 | } | ||
| 116 | |||
| 117 | void EmitSetSampleMask([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 118 | throw NotImplementedException("GLASM instruction"); | ||
| 119 | } | ||
| 120 | |||
| 121 | void EmitSetFragDepth([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 122 | throw NotImplementedException("GLASM instruction"); | ||
| 123 | } | ||
| 124 | |||
| 125 | } // namespace Shader::Backend::GLASM | ||
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp index e69de29bb..db9dda261 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_floating_point.cpp | |||
| @@ -0,0 +1,421 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <string_view> | ||
| 6 | |||
| 7 | #include "shader_recompiler/backend/glasm/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | |||
| 11 | namespace Shader::Backend::GLASM { | ||
| 12 | |||
| 13 | void EmitFPAbs16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 14 | throw NotImplementedException("GLASM instruction"); | ||
| 15 | } | ||
| 16 | |||
| 17 | void EmitFPAbs32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 18 | ctx.Add("MOV.F {},|{}|;", inst, value); | ||
| 19 | } | ||
| 20 | |||
| 21 | void EmitFPAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 22 | throw NotImplementedException("GLASM instruction"); | ||
| 23 | } | ||
| 24 | |||
| 25 | void EmitFPAdd16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 26 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 27 | throw NotImplementedException("GLASM instruction"); | ||
| 28 | } | ||
| 29 | |||
| 30 | void EmitFPAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 31 | ctx.Add("ADD.F {},{},{};", inst, a, b); | ||
| 32 | } | ||
| 33 | |||
| 34 | void EmitFPAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 35 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 36 | throw NotImplementedException("GLASM instruction"); | ||
| 37 | } | ||
| 38 | |||
| 39 | void EmitFPFma16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 40 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b, | ||
| 41 | [[maybe_unused]] std::string_view c) { | ||
| 42 | throw NotImplementedException("GLASM instruction"); | ||
| 43 | } | ||
| 44 | |||
| 45 | void EmitFPFma32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, | ||
| 46 | std::string_view c) { | ||
| 47 | ctx.Add("MAD.F {},{},{},{};", inst, a, b, c); | ||
| 48 | } | ||
| 49 | |||
| 50 | void EmitFPFma64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 51 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b, | ||
| 52 | [[maybe_unused]] std::string_view c) { | ||
| 53 | throw NotImplementedException("GLASM instruction"); | ||
| 54 | } | ||
| 55 | |||
| 56 | void EmitFPMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 57 | [[maybe_unused]] std::string_view b) { | ||
| 58 | throw NotImplementedException("GLASM instruction"); | ||
| 59 | } | ||
| 60 | |||
| 61 | void EmitFPMax64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 62 | [[maybe_unused]] std::string_view b) { | ||
| 63 | throw NotImplementedException("GLASM instruction"); | ||
| 64 | } | ||
| 65 | |||
| 66 | void EmitFPMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 67 | [[maybe_unused]] std::string_view b) { | ||
| 68 | throw NotImplementedException("GLASM instruction"); | ||
| 69 | } | ||
| 70 | |||
| 71 | void EmitFPMin64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 72 | [[maybe_unused]] std::string_view b) { | ||
| 73 | throw NotImplementedException("GLASM instruction"); | ||
| 74 | } | ||
| 75 | |||
| 76 | void EmitFPMul16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 77 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 78 | throw NotImplementedException("GLASM instruction"); | ||
| 79 | } | ||
| 80 | |||
| 81 | void EmitFPMul32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 82 | ctx.Add("MUL.F {},{},{};", inst, a, b); | ||
| 83 | } | ||
| 84 | |||
| 85 | void EmitFPMul64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 86 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 87 | throw NotImplementedException("GLASM instruction"); | ||
| 88 | } | ||
| 89 | |||
| 90 | void EmitFPNeg16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 91 | throw NotImplementedException("GLASM instruction"); | ||
| 92 | } | ||
| 93 | |||
| 94 | void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 95 | if (value[0] == '-') { | ||
| 96 | // Guard against negating a negative immediate | ||
| 97 | ctx.Add("MOV.F {},{};", inst, value.substr(1)); | ||
| 98 | } else { | ||
| 99 | ctx.Add("MOV.F {},-{};", inst, value); | ||
| 100 | } | ||
| 101 | } | ||
| 102 | |||
| 103 | void EmitFPNeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 104 | throw NotImplementedException("GLASM instruction"); | ||
| 105 | } | ||
| 106 | |||
| 107 | void EmitFPSin([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 108 | throw NotImplementedException("GLASM instruction"); | ||
| 109 | } | ||
| 110 | |||
| 111 | void EmitFPCos([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 112 | throw NotImplementedException("GLASM instruction"); | ||
| 113 | } | ||
| 114 | |||
| 115 | void EmitFPExp2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 116 | throw NotImplementedException("GLASM instruction"); | ||
| 117 | } | ||
| 118 | |||
| 119 | void EmitFPLog2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 120 | throw NotImplementedException("GLASM instruction"); | ||
| 121 | } | ||
| 122 | |||
| 123 | void EmitFPRecip32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 124 | throw NotImplementedException("GLASM instruction"); | ||
| 125 | } | ||
| 126 | |||
| 127 | void EmitFPRecip64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 128 | throw NotImplementedException("GLASM instruction"); | ||
| 129 | } | ||
| 130 | |||
| 131 | void EmitFPRecipSqrt32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 132 | throw NotImplementedException("GLASM instruction"); | ||
| 133 | } | ||
| 134 | |||
| 135 | void EmitFPRecipSqrt64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 136 | throw NotImplementedException("GLASM instruction"); | ||
| 137 | } | ||
| 138 | |||
| 139 | void EmitFPSqrt([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 140 | throw NotImplementedException("GLASM instruction"); | ||
| 141 | } | ||
| 142 | |||
| 143 | void EmitFPSaturate16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 144 | throw NotImplementedException("GLASM instruction"); | ||
| 145 | } | ||
| 146 | |||
| 147 | void EmitFPSaturate32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 148 | ctx.Add("MOV.F.SAT {},{};", inst, value); | ||
| 149 | } | ||
| 150 | |||
| 151 | void EmitFPSaturate64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 152 | throw NotImplementedException("GLASM instruction"); | ||
| 153 | } | ||
| 154 | |||
| 155 | void EmitFPClamp16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value, | ||
| 156 | [[maybe_unused]] std::string_view min_value, | ||
| 157 | [[maybe_unused]] std::string_view max_value) { | ||
| 158 | throw NotImplementedException("GLASM instruction"); | ||
| 159 | } | ||
| 160 | |||
| 161 | void EmitFPClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value, | ||
| 162 | [[maybe_unused]] std::string_view min_value, | ||
| 163 | [[maybe_unused]] std::string_view max_value) { | ||
| 164 | throw NotImplementedException("GLASM instruction"); | ||
| 165 | } | ||
| 166 | |||
| 167 | void EmitFPClamp64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value, | ||
| 168 | [[maybe_unused]] std::string_view min_value, | ||
| 169 | [[maybe_unused]] std::string_view max_value) { | ||
| 170 | throw NotImplementedException("GLASM instruction"); | ||
| 171 | } | ||
| 172 | |||
| 173 | void EmitFPRoundEven16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 174 | throw NotImplementedException("GLASM instruction"); | ||
| 175 | } | ||
| 176 | |||
| 177 | void EmitFPRoundEven32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 178 | throw NotImplementedException("GLASM instruction"); | ||
| 179 | } | ||
| 180 | |||
| 181 | void EmitFPRoundEven64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 182 | throw NotImplementedException("GLASM instruction"); | ||
| 183 | } | ||
| 184 | |||
| 185 | void EmitFPFloor16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 186 | throw NotImplementedException("GLASM instruction"); | ||
| 187 | } | ||
| 188 | |||
| 189 | void EmitFPFloor32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 190 | throw NotImplementedException("GLASM instruction"); | ||
| 191 | } | ||
| 192 | |||
| 193 | void EmitFPFloor64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 194 | throw NotImplementedException("GLASM instruction"); | ||
| 195 | } | ||
| 196 | |||
| 197 | void EmitFPCeil16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 198 | throw NotImplementedException("GLASM instruction"); | ||
| 199 | } | ||
| 200 | |||
| 201 | void EmitFPCeil32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 202 | throw NotImplementedException("GLASM instruction"); | ||
| 203 | } | ||
| 204 | |||
| 205 | void EmitFPCeil64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 206 | throw NotImplementedException("GLASM instruction"); | ||
| 207 | } | ||
| 208 | |||
| 209 | void EmitFPTrunc16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 210 | throw NotImplementedException("GLASM instruction"); | ||
| 211 | } | ||
| 212 | |||
| 213 | void EmitFPTrunc32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 214 | throw NotImplementedException("GLASM instruction"); | ||
| 215 | } | ||
| 216 | |||
| 217 | void EmitFPTrunc64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 218 | throw NotImplementedException("GLASM instruction"); | ||
| 219 | } | ||
| 220 | |||
| 221 | void EmitFPOrdEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 222 | [[maybe_unused]] std::string_view rhs) { | ||
| 223 | throw NotImplementedException("GLASM instruction"); | ||
| 224 | } | ||
| 225 | |||
| 226 | void EmitFPOrdEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 227 | std::string_view rhs) { | ||
| 228 | const std::string ret{ctx.reg_alloc.Define(inst)}; | ||
| 229 | ctx.Add("SEQ.F {},{},{};SNE.S {},{},0;", ret, lhs, rhs, ret, ret); | ||
| 230 | } | ||
| 231 | |||
| 232 | void EmitFPOrdEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 233 | [[maybe_unused]] std::string_view rhs) { | ||
| 234 | throw NotImplementedException("GLASM instruction"); | ||
| 235 | } | ||
| 236 | |||
| 237 | void EmitFPUnordEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 238 | [[maybe_unused]] std::string_view rhs) { | ||
| 239 | throw NotImplementedException("GLASM instruction"); | ||
| 240 | } | ||
| 241 | |||
| 242 | void EmitFPUnordEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 243 | [[maybe_unused]] std::string_view rhs) { | ||
| 244 | throw NotImplementedException("GLASM instruction"); | ||
| 245 | } | ||
| 246 | |||
| 247 | void EmitFPUnordEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 248 | [[maybe_unused]] std::string_view rhs) { | ||
| 249 | throw NotImplementedException("GLASM instruction"); | ||
| 250 | } | ||
| 251 | |||
| 252 | void EmitFPOrdNotEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 253 | [[maybe_unused]] std::string_view rhs) { | ||
| 254 | throw NotImplementedException("GLASM instruction"); | ||
| 255 | } | ||
| 256 | |||
| 257 | void EmitFPOrdNotEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 258 | [[maybe_unused]] std::string_view rhs) { | ||
| 259 | throw NotImplementedException("GLASM instruction"); | ||
| 260 | } | ||
| 261 | |||
| 262 | void EmitFPOrdNotEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 263 | [[maybe_unused]] std::string_view rhs) { | ||
| 264 | throw NotImplementedException("GLASM instruction"); | ||
| 265 | } | ||
| 266 | |||
| 267 | void EmitFPUnordNotEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 268 | [[maybe_unused]] std::string_view rhs) { | ||
| 269 | throw NotImplementedException("GLASM instruction"); | ||
| 270 | } | ||
| 271 | |||
| 272 | void EmitFPUnordNotEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 273 | [[maybe_unused]] std::string_view rhs) { | ||
| 274 | throw NotImplementedException("GLASM instruction"); | ||
| 275 | } | ||
| 276 | |||
| 277 | void EmitFPUnordNotEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 278 | [[maybe_unused]] std::string_view rhs) { | ||
| 279 | throw NotImplementedException("GLASM instruction"); | ||
| 280 | } | ||
| 281 | |||
| 282 | void EmitFPOrdLessThan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 283 | [[maybe_unused]] std::string_view rhs) { | ||
| 284 | throw NotImplementedException("GLASM instruction"); | ||
| 285 | } | ||
| 286 | |||
| 287 | void EmitFPOrdLessThan32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 288 | std::string_view rhs) { | ||
| 289 | const std::string ret{ctx.reg_alloc.Define(inst)}; | ||
| 290 | ctx.Add("SLT.F {},{},{};SNE.S {},{},0;", ret, lhs, rhs, ret, ret); | ||
| 291 | } | ||
| 292 | |||
| 293 | void EmitFPOrdLessThan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 294 | [[maybe_unused]] std::string_view rhs) { | ||
| 295 | throw NotImplementedException("GLASM instruction"); | ||
| 296 | } | ||
| 297 | |||
| 298 | void EmitFPUnordLessThan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 299 | [[maybe_unused]] std::string_view rhs) { | ||
| 300 | throw NotImplementedException("GLASM instruction"); | ||
| 301 | } | ||
| 302 | |||
| 303 | void EmitFPUnordLessThan32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 304 | [[maybe_unused]] std::string_view rhs) { | ||
| 305 | throw NotImplementedException("GLASM instruction"); | ||
| 306 | } | ||
| 307 | |||
| 308 | void EmitFPUnordLessThan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 309 | [[maybe_unused]] std::string_view rhs) { | ||
| 310 | throw NotImplementedException("GLASM instruction"); | ||
| 311 | } | ||
| 312 | |||
| 313 | void EmitFPOrdGreaterThan16([[maybe_unused]] EmitContext& ctx, | ||
| 314 | [[maybe_unused]] std::string_view lhs, | ||
| 315 | [[maybe_unused]] std::string_view rhs) { | ||
| 316 | throw NotImplementedException("GLASM instruction"); | ||
| 317 | } | ||
| 318 | |||
| 319 | void EmitFPOrdGreaterThan32([[maybe_unused]] EmitContext& ctx, | ||
| 320 | [[maybe_unused]] std::string_view lhs, | ||
| 321 | [[maybe_unused]] std::string_view rhs) { | ||
| 322 | throw NotImplementedException("GLASM instruction"); | ||
| 323 | } | ||
| 324 | |||
| 325 | void EmitFPOrdGreaterThan64([[maybe_unused]] EmitContext& ctx, | ||
| 326 | [[maybe_unused]] std::string_view lhs, | ||
| 327 | [[maybe_unused]] std::string_view rhs) { | ||
| 328 | throw NotImplementedException("GLASM instruction"); | ||
| 329 | } | ||
| 330 | |||
| 331 | void EmitFPUnordGreaterThan16([[maybe_unused]] EmitContext& ctx, | ||
| 332 | [[maybe_unused]] std::string_view lhs, | ||
| 333 | [[maybe_unused]] std::string_view rhs) { | ||
| 334 | throw NotImplementedException("GLASM instruction"); | ||
| 335 | } | ||
| 336 | |||
| 337 | void EmitFPUnordGreaterThan32([[maybe_unused]] EmitContext& ctx, | ||
| 338 | [[maybe_unused]] std::string_view lhs, | ||
| 339 | [[maybe_unused]] std::string_view rhs) { | ||
| 340 | throw NotImplementedException("GLASM instruction"); | ||
| 341 | } | ||
| 342 | |||
| 343 | void EmitFPUnordGreaterThan64([[maybe_unused]] EmitContext& ctx, | ||
| 344 | [[maybe_unused]] std::string_view lhs, | ||
| 345 | [[maybe_unused]] std::string_view rhs) { | ||
| 346 | throw NotImplementedException("GLASM instruction"); | ||
| 347 | } | ||
| 348 | |||
| 349 | void EmitFPOrdLessThanEqual16([[maybe_unused]] EmitContext& ctx, | ||
| 350 | [[maybe_unused]] std::string_view lhs, | ||
| 351 | [[maybe_unused]] std::string_view rhs) { | ||
| 352 | throw NotImplementedException("GLASM instruction"); | ||
| 353 | } | ||
| 354 | |||
| 355 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 356 | std::string_view rhs) { | ||
| 357 | const std::string ret{ctx.reg_alloc.Define(inst)}; | ||
| 358 | ctx.Add("SLE.F {},{},{};SNE.S {},{},0;", ret, lhs, rhs, ret, ret); | ||
| 359 | } | ||
| 360 | |||
| 361 | void EmitFPOrdLessThanEqual64([[maybe_unused]] EmitContext& ctx, | ||
| 362 | [[maybe_unused]] std::string_view lhs, | ||
| 363 | [[maybe_unused]] std::string_view rhs) { | ||
| 364 | throw NotImplementedException("GLASM instruction"); | ||
| 365 | } | ||
| 366 | |||
| 367 | void EmitFPUnordLessThanEqual16([[maybe_unused]] EmitContext& ctx, | ||
| 368 | [[maybe_unused]] std::string_view lhs, | ||
| 369 | [[maybe_unused]] std::string_view rhs) { | ||
| 370 | throw NotImplementedException("GLASM instruction"); | ||
| 371 | } | ||
| 372 | |||
| 373 | void EmitFPUnordLessThanEqual32([[maybe_unused]] EmitContext& ctx, | ||
| 374 | [[maybe_unused]] std::string_view lhs, | ||
| 375 | [[maybe_unused]] std::string_view rhs) { | ||
| 376 | throw NotImplementedException("GLASM instruction"); | ||
| 377 | } | ||
| 378 | |||
| 379 | void EmitFPUnordLessThanEqual64([[maybe_unused]] EmitContext& ctx, | ||
| 380 | [[maybe_unused]] std::string_view lhs, | ||
| 381 | [[maybe_unused]] std::string_view rhs) { | ||
| 382 | throw NotImplementedException("GLASM instruction"); | ||
| 383 | } | ||
| 384 | |||
| 385 | void EmitFPOrdGreaterThanEqual16([[maybe_unused]] EmitContext& ctx, | ||
| 386 | [[maybe_unused]] std::string_view lhs, | ||
| 387 | [[maybe_unused]] std::string_view rhs) { | ||
| 388 | throw NotImplementedException("GLASM instruction"); | ||
| 389 | } | ||
| 390 | |||
| 391 | void EmitFPOrdGreaterThanEqual32([[maybe_unused]] EmitContext& ctx, | ||
| 392 | [[maybe_unused]] std::string_view lhs, | ||
| 393 | [[maybe_unused]] std::string_view rhs) { | ||
| 394 | throw NotImplementedException("GLASM instruction"); | ||
| 395 | } | ||
| 396 | |||
| 397 | void EmitFPOrdGreaterThanEqual64([[maybe_unused]] EmitContext& ctx, | ||
| 398 | [[maybe_unused]] std::string_view lhs, | ||
| 399 | [[maybe_unused]] std::string_view rhs) { | ||
| 400 | throw NotImplementedException("GLASM instruction"); | ||
| 401 | } | ||
| 402 | |||
| 403 | void EmitFPUnordGreaterThanEqual16([[maybe_unused]] EmitContext& ctx, | ||
| 404 | [[maybe_unused]] std::string_view lhs, | ||
| 405 | [[maybe_unused]] std::string_view rhs) { | ||
| 406 | throw NotImplementedException("GLASM instruction"); | ||
| 407 | } | ||
| 408 | |||
| 409 | void EmitFPUnordGreaterThanEqual32([[maybe_unused]] EmitContext& ctx, | ||
| 410 | [[maybe_unused]] std::string_view lhs, | ||
| 411 | [[maybe_unused]] std::string_view rhs) { | ||
| 412 | throw NotImplementedException("GLASM instruction"); | ||
| 413 | } | ||
| 414 | |||
| 415 | void EmitFPUnordGreaterThanEqual64([[maybe_unused]] EmitContext& ctx, | ||
| 416 | [[maybe_unused]] std::string_view lhs, | ||
| 417 | [[maybe_unused]] std::string_view rhs) { | ||
| 418 | throw NotImplementedException("GLASM instruction"); | ||
| 419 | } | ||
| 420 | |||
| 421 | } // namespace Shader::Backend::GLASM | ||
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h index 21d6af914..30cc6c2eb 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h +++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | |||
| @@ -20,9 +20,9 @@ namespace Shader::Backend::GLASM { | |||
| 20 | class EmitContext; | 20 | class EmitContext; |
| 21 | 21 | ||
| 22 | // Microinstruction emitters | 22 | // Microinstruction emitters |
| 23 | void EmitPhi(EmitContext& ctx, IR::Inst* inst); | 23 | void EmitPhi(EmitContext& ctx, IR::Inst& inst); |
| 24 | void EmitVoid(EmitContext& ctx); | 24 | void EmitVoid(EmitContext& ctx); |
| 25 | void EmitIdentity(EmitContext& ctx, const IR::Value& value); | 25 | void EmitIdentity(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 26 | void EmitBranch(EmitContext& ctx, std::string_view label); | 26 | void EmitBranch(EmitContext& ctx, std::string_view label); |
| 27 | void EmitBranchConditional(EmitContext& ctx, std::string_view condition, | 27 | void EmitBranchConditional(EmitContext& ctx, std::string_view condition, |
| 28 | std::string_view true_label, std::string_view false_label); | 28 | std::string_view true_label, std::string_view false_label); |
| @@ -47,14 +47,22 @@ void EmitSetGotoVariable(EmitContext& ctx); | |||
| 47 | void EmitGetGotoVariable(EmitContext& ctx); | 47 | void EmitGetGotoVariable(EmitContext& ctx); |
| 48 | void EmitSetIndirectBranchVariable(EmitContext& ctx); | 48 | void EmitSetIndirectBranchVariable(EmitContext& ctx); |
| 49 | void EmitGetIndirectBranchVariable(EmitContext& ctx); | 49 | void EmitGetIndirectBranchVariable(EmitContext& ctx); |
| 50 | void EmitGetCbufU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 50 | void EmitGetCbufU8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 51 | void EmitGetCbufS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 51 | const IR::Value& offset); |
| 52 | void EmitGetCbufU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 52 | void EmitGetCbufS8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 53 | void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 53 | const IR::Value& offset); |
| 54 | void EmitGetCbufU32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 54 | void EmitGetCbufU16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 55 | void EmitGetCbufF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 55 | const IR::Value& offset); |
| 56 | void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 56 | void EmitGetCbufS16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 57 | void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex); | 57 | const IR::Value& offset); |
| 58 | void EmitGetCbufU32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 59 | const IR::Value& offset); | ||
| 60 | void EmitGetCbufF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 61 | const IR::Value& offset); | ||
| 62 | void EmitGetCbufU32x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 63 | const IR::Value& offset); | ||
| 64 | void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, | ||
| 65 | std::string_view vertex); | ||
| 58 | void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value, | 66 | void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value, |
| 59 | std::string_view vertex); | 67 | std::string_view vertex); |
| 60 | void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex); | 68 | void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex); |
| @@ -100,26 +108,33 @@ void EmitWriteGlobalS16(EmitContext& ctx); | |||
| 100 | void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value); | 108 | void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value); |
| 101 | void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value); | 109 | void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value); |
| 102 | void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value); | 110 | void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value); |
| 103 | void EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 111 | void EmitLoadStorageU8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 104 | void EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 112 | std::string_view offset); |
| 105 | void EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 113 | void EmitLoadStorageS8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 106 | void EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 114 | std::string_view offset); |
| 107 | void EmitLoadStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 115 | void EmitLoadStorageU16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 108 | void EmitLoadStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 116 | std::string_view offset); |
| 109 | void EmitLoadStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 117 | void EmitLoadStorageS16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 110 | void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 118 | std::string_view offset); |
| 119 | void EmitLoadStorage32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 120 | std::string_view offset); | ||
| 121 | void EmitLoadStorage64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 122 | std::string_view offset); | ||
| 123 | void EmitLoadStorage128(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 124 | std::string_view offset); | ||
| 125 | void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 111 | std::string_view value); | 126 | std::string_view value); |
| 112 | void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 127 | void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, std::string_view offset, |
| 113 | std::string_view value); | 128 | std::string_view value); |
| 114 | void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 129 | void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, std::string_view offset, |
| 115 | std::string_view value); | 130 | std::string_view value); |
| 116 | void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 131 | void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, std::string_view offset, |
| 117 | std::string_view value); | 132 | std::string_view value); |
| 118 | void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 133 | void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, std::string_view offset, |
| 119 | std::string_view value); | 134 | std::string_view value); |
| 120 | void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 135 | void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, std::string_view offset, |
| 121 | std::string_view value); | 136 | std::string_view value); |
| 122 | void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | 137 | void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, std::string_view offset, |
| 123 | std::string_view value); | 138 | std::string_view value); |
| 124 | void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset); | 139 | void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset); |
| 125 | void EmitLoadSharedS8(EmitContext& ctx, std::string_view offset); | 140 | void EmitLoadSharedS8(EmitContext& ctx, std::string_view offset); |
| @@ -203,12 +218,12 @@ void EmitSelectF32(EmitContext& ctx, std::string_view cond, std::string_view tru | |||
| 203 | std::string_view false_value); | 218 | std::string_view false_value); |
| 204 | void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value, | 219 | void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value, |
| 205 | std::string_view false_value); | 220 | std::string_view false_value); |
| 206 | void EmitBitCastU16F16(EmitContext& ctx); | 221 | void EmitBitCastU16F16(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 207 | void EmitBitCastU32F32(EmitContext& ctx, std::string_view value); | 222 | void EmitBitCastU32F32(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 208 | void EmitBitCastU64F64(EmitContext& ctx); | 223 | void EmitBitCastU64F64(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 209 | void EmitBitCastF16U16(EmitContext& ctx); | 224 | void EmitBitCastF16U16(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 210 | void EmitBitCastF32U32(EmitContext& ctx, std::string_view value); | 225 | void EmitBitCastF32U32(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 211 | void EmitBitCastF64U64(EmitContext& ctx); | 226 | void EmitBitCastF64U64(EmitContext& ctx, IR::Inst& inst, const IR::Value& value); |
| 212 | void EmitPackUint2x32(EmitContext& ctx, std::string_view value); | 227 | void EmitPackUint2x32(EmitContext& ctx, std::string_view value); |
| 213 | void EmitUnpackUint2x32(EmitContext& ctx, std::string_view value); | 228 | void EmitUnpackUint2x32(EmitContext& ctx, std::string_view value); |
| 214 | void EmitPackFloat2x16(EmitContext& ctx, std::string_view value); | 229 | void EmitPackFloat2x16(EmitContext& ctx, std::string_view value); |
| @@ -224,26 +239,26 @@ void EmitGetOverflowFromOp(EmitContext& ctx); | |||
| 224 | void EmitGetSparseFromOp(EmitContext& ctx); | 239 | void EmitGetSparseFromOp(EmitContext& ctx); |
| 225 | void EmitGetInBoundsFromOp(EmitContext& ctx); | 240 | void EmitGetInBoundsFromOp(EmitContext& ctx); |
| 226 | void EmitFPAbs16(EmitContext& ctx, std::string_view value); | 241 | void EmitFPAbs16(EmitContext& ctx, std::string_view value); |
| 227 | void EmitFPAbs32(EmitContext& ctx, std::string_view value); | 242 | void EmitFPAbs32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 228 | void EmitFPAbs64(EmitContext& ctx, std::string_view value); | 243 | void EmitFPAbs64(EmitContext& ctx, std::string_view value); |
| 229 | void EmitFPAdd16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 244 | void EmitFPAdd16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 230 | void EmitFPAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 245 | void EmitFPAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 231 | void EmitFPAdd64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 246 | void EmitFPAdd64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 232 | void EmitFPFma16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b, | 247 | void EmitFPFma16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, |
| 233 | std::string_view c); | 248 | std::string_view c); |
| 234 | void EmitFPFma32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b, | 249 | void EmitFPFma32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, |
| 235 | std::string_view c); | 250 | std::string_view c); |
| 236 | void EmitFPFma64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b, | 251 | void EmitFPFma64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, |
| 237 | std::string_view c); | 252 | std::string_view c); |
| 238 | void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b); | 253 | void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b); |
| 239 | void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b); | 254 | void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b); |
| 240 | void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b); | 255 | void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b); |
| 241 | void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b); | 256 | void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b); |
| 242 | void EmitFPMul16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 257 | void EmitFPMul16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 243 | void EmitFPMul32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 258 | void EmitFPMul32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 244 | void EmitFPMul64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 259 | void EmitFPMul64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 245 | void EmitFPNeg16(EmitContext& ctx, std::string_view value); | 260 | void EmitFPNeg16(EmitContext& ctx, std::string_view value); |
| 246 | void EmitFPNeg32(EmitContext& ctx, std::string_view value); | 261 | void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 247 | void EmitFPNeg64(EmitContext& ctx, std::string_view value); | 262 | void EmitFPNeg64(EmitContext& ctx, std::string_view value); |
| 248 | void EmitFPSin(EmitContext& ctx, std::string_view value); | 263 | void EmitFPSin(EmitContext& ctx, std::string_view value); |
| 249 | void EmitFPCos(EmitContext& ctx, std::string_view value); | 264 | void EmitFPCos(EmitContext& ctx, std::string_view value); |
| @@ -255,7 +270,7 @@ void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value); | |||
| 255 | void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value); | 270 | void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value); |
| 256 | void EmitFPSqrt(EmitContext& ctx, std::string_view value); | 271 | void EmitFPSqrt(EmitContext& ctx, std::string_view value); |
| 257 | void EmitFPSaturate16(EmitContext& ctx, std::string_view value); | 272 | void EmitFPSaturate16(EmitContext& ctx, std::string_view value); |
| 258 | void EmitFPSaturate32(EmitContext& ctx, std::string_view value); | 273 | void EmitFPSaturate32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 259 | void EmitFPSaturate64(EmitContext& ctx, std::string_view value); | 274 | void EmitFPSaturate64(EmitContext& ctx, std::string_view value); |
| 260 | void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value, | 275 | void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value, |
| 261 | std::string_view max_value); | 276 | std::string_view max_value); |
| @@ -276,7 +291,7 @@ void EmitFPTrunc16(EmitContext& ctx, std::string_view value); | |||
| 276 | void EmitFPTrunc32(EmitContext& ctx, std::string_view value); | 291 | void EmitFPTrunc32(EmitContext& ctx, std::string_view value); |
| 277 | void EmitFPTrunc64(EmitContext& ctx, std::string_view value); | 292 | void EmitFPTrunc64(EmitContext& ctx, std::string_view value); |
| 278 | void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 293 | void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 279 | void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 294 | void EmitFPOrdEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, std::string_view rhs); |
| 280 | void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 295 | void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 281 | void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 296 | void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 282 | void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 297 | void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| @@ -288,7 +303,8 @@ void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_v | |||
| 288 | void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 303 | void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 289 | void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 304 | void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 290 | void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 305 | void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 291 | void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 306 | void EmitFPOrdLessThan32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 307 | std::string_view rhs); | ||
| 292 | void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 308 | void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 293 | void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 309 | void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 294 | void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 310 | void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| @@ -300,7 +316,8 @@ void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::strin | |||
| 300 | void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 316 | void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 301 | void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 317 | void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 302 | void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 318 | void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 303 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 319 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 320 | std::string_view rhs); | ||
| 304 | void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 321 | void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 305 | void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 322 | void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 306 | void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 323 | void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| @@ -314,7 +331,7 @@ void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std:: | |||
| 314 | void EmitFPIsNan16(EmitContext& ctx, std::string_view value); | 331 | void EmitFPIsNan16(EmitContext& ctx, std::string_view value); |
| 315 | void EmitFPIsNan32(EmitContext& ctx, std::string_view value); | 332 | void EmitFPIsNan32(EmitContext& ctx, std::string_view value); |
| 316 | void EmitFPIsNan64(EmitContext& ctx, std::string_view value); | 333 | void EmitFPIsNan64(EmitContext& ctx, std::string_view value); |
| 317 | void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 334 | void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 318 | void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b); | 335 | void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b); |
| 319 | void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b); | 336 | void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b); |
| 320 | void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b); | 337 | void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b); |
| @@ -329,14 +346,14 @@ void EmitShiftRightLogical32(EmitContext& ctx, std::string_view base, std::strin | |||
| 329 | void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift); | 346 | void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift); |
| 330 | void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift); | 347 | void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift); |
| 331 | void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift); | 348 | void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift); |
| 332 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 349 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 333 | void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 350 | void EmitBitwiseOr32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 334 | void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b); | 351 | void EmitBitwiseXor32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 335 | void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert, | 352 | void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert, |
| 336 | std::string_view offset, std::string_view count); | 353 | std::string_view offset, std::string_view count); |
| 337 | void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base, | 354 | void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst& inst, std::string_view base, |
| 338 | std::string_view offset, std::string_view count); | 355 | std::string_view offset, std::string_view count); |
| 339 | void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base, | 356 | void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst& inst, std::string_view base, |
| 340 | std::string_view offset, std::string_view count); | 357 | std::string_view offset, std::string_view count); |
| 341 | void EmitBitReverse32(EmitContext& ctx, std::string_view value); | 358 | void EmitBitReverse32(EmitContext& ctx, std::string_view value); |
| 342 | void EmitBitCount32(EmitContext& ctx, std::string_view value); | 359 | void EmitBitCount32(EmitContext& ctx, std::string_view value); |
| @@ -347,9 +364,9 @@ void EmitSMin32(EmitContext& ctx, std::string_view a, std::string_view b); | |||
| 347 | void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b); | 364 | void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b); |
| 348 | void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b); | 365 | void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b); |
| 349 | void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b); | 366 | void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b); |
| 350 | void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min, | 367 | void EmitSClamp32(EmitContext& ctx, IR::Inst& inst, std::string_view value, std::string_view min, |
| 351 | std::string_view max); | 368 | std::string_view max); |
| 352 | void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min, | 369 | void EmitUClamp32(EmitContext& ctx, IR::Inst& inst, std::string_view value, std::string_view min, |
| 353 | std::string_view max); | 370 | std::string_view max); |
| 354 | void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 371 | void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| 355 | void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 372 | void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs); |
| @@ -544,36 +561,36 @@ void EmitBoundImageQueryLod(EmitContext&); | |||
| 544 | void EmitBoundImageGradient(EmitContext&); | 561 | void EmitBoundImageGradient(EmitContext&); |
| 545 | void EmitBoundImageRead(EmitContext&); | 562 | void EmitBoundImageRead(EmitContext&); |
| 546 | void EmitBoundImageWrite(EmitContext&); | 563 | void EmitBoundImageWrite(EmitContext&); |
| 547 | void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 564 | void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 548 | std::string_view coords, std::string_view bias_lc, | 565 | std::string_view coords, std::string_view bias_lc, |
| 549 | const IR::Value& offset); | 566 | const IR::Value& offset); |
| 550 | void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 567 | void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 551 | std::string_view coords, std::string_view lod_lc, | 568 | std::string_view coords, std::string_view lod_lc, |
| 552 | const IR::Value& offset); | 569 | const IR::Value& offset); |
| 553 | void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 570 | void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 554 | std::string_view coords, std::string_view dref, | 571 | std::string_view coords, std::string_view dref, |
| 555 | std::string_view bias_lc, const IR::Value& offset); | 572 | std::string_view bias_lc, const IR::Value& offset); |
| 556 | void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 573 | void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 557 | std::string_view coords, std::string_view dref, | 574 | std::string_view coords, std::string_view dref, |
| 558 | std::string_view lod_lc, const IR::Value& offset); | 575 | std::string_view lod_lc, const IR::Value& offset); |
| 559 | void EmitImageGather(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 576 | void EmitImageGather(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 560 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2); | 577 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2); |
| 561 | void EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 578 | void EmitImageGatherDref(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 562 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2, | 579 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2, |
| 563 | std::string_view dref); | 580 | std::string_view dref); |
| 564 | void EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 581 | void EmitImageFetch(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 565 | std::string_view coords, std::string_view offset, std::string_view lod, | 582 | std::string_view coords, std::string_view offset, std::string_view lod, |
| 566 | std::string_view ms); | 583 | std::string_view ms); |
| 567 | void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 584 | void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 568 | std::string_view lod); | 585 | std::string_view lod); |
| 569 | void EmitImageQueryLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 586 | void EmitImageQueryLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 570 | std::string_view coords); | 587 | std::string_view coords); |
| 571 | void EmitImageGradient(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 588 | void EmitImageGradient(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 572 | std::string_view coords, std::string_view derivates, std::string_view offset, | 589 | std::string_view coords, std::string_view derivates, std::string_view offset, |
| 573 | std::string_view lod_clamp); | 590 | std::string_view lod_clamp); |
| 574 | void EmitImageRead(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 591 | void EmitImageRead(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 575 | std::string_view coords); | 592 | std::string_view coords); |
| 576 | void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 593 | void EmitImageWrite(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 577 | std::string_view coords, std::string_view color); | 594 | std::string_view coords, std::string_view color); |
| 578 | void EmitBindlessImageAtomicIAdd32(EmitContext&); | 595 | void EmitBindlessImageAtomicIAdd32(EmitContext&); |
| 579 | void EmitBindlessImageAtomicSMin32(EmitContext&); | 596 | void EmitBindlessImageAtomicSMin32(EmitContext&); |
| @@ -597,27 +614,27 @@ void EmitBoundImageAtomicAnd32(EmitContext&); | |||
| 597 | void EmitBoundImageAtomicOr32(EmitContext&); | 614 | void EmitBoundImageAtomicOr32(EmitContext&); |
| 598 | void EmitBoundImageAtomicXor32(EmitContext&); | 615 | void EmitBoundImageAtomicXor32(EmitContext&); |
| 599 | void EmitBoundImageAtomicExchange32(EmitContext&); | 616 | void EmitBoundImageAtomicExchange32(EmitContext&); |
| 600 | void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 617 | void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 601 | std::string_view coords, std::string_view value); | 618 | std::string_view coords, std::string_view value); |
| 602 | void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 619 | void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 603 | std::string_view coords, std::string_view value); | 620 | std::string_view coords, std::string_view value); |
| 604 | void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 621 | void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 605 | std::string_view coords, std::string_view value); | 622 | std::string_view coords, std::string_view value); |
| 606 | void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 623 | void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 607 | std::string_view coords, std::string_view value); | 624 | std::string_view coords, std::string_view value); |
| 608 | void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 625 | void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 609 | std::string_view coords, std::string_view value); | 626 | std::string_view coords, std::string_view value); |
| 610 | void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 627 | void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 611 | std::string_view coords, std::string_view value); | 628 | std::string_view coords, std::string_view value); |
| 612 | void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 629 | void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 613 | std::string_view coords, std::string_view value); | 630 | std::string_view coords, std::string_view value); |
| 614 | void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 631 | void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 615 | std::string_view coords, std::string_view value); | 632 | std::string_view coords, std::string_view value); |
| 616 | void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 633 | void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 617 | std::string_view coords, std::string_view value); | 634 | std::string_view coords, std::string_view value); |
| 618 | void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 635 | void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 619 | std::string_view coords, std::string_view value); | 636 | std::string_view coords, std::string_view value); |
| 620 | void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 637 | void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 621 | std::string_view coords, std::string_view value); | 638 | std::string_view coords, std::string_view value); |
| 622 | void EmitLaneId(EmitContext& ctx); | 639 | void EmitLaneId(EmitContext& ctx); |
| 623 | void EmitVoteAll(EmitContext& ctx, std::string_view pred); | 640 | void EmitVoteAll(EmitContext& ctx, std::string_view pred); |
| @@ -629,15 +646,15 @@ void EmitSubgroupLtMask(EmitContext& ctx); | |||
| 629 | void EmitSubgroupLeMask(EmitContext& ctx); | 646 | void EmitSubgroupLeMask(EmitContext& ctx); |
| 630 | void EmitSubgroupGtMask(EmitContext& ctx); | 647 | void EmitSubgroupGtMask(EmitContext& ctx); |
| 631 | void EmitSubgroupGeMask(EmitContext& ctx); | 648 | void EmitSubgroupGeMask(EmitContext& ctx); |
| 632 | void EmitShuffleIndex(EmitContext& ctx, IR::Inst* inst, std::string_view value, | 649 | void EmitShuffleIndex(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 633 | std::string_view index, std::string_view clamp, | 650 | std::string_view index, std::string_view clamp, |
| 634 | std::string_view segmentation_mask); | 651 | std::string_view segmentation_mask); |
| 635 | void EmitShuffleUp(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view index, | 652 | void EmitShuffleUp(EmitContext& ctx, IR::Inst& inst, std::string_view value, std::string_view index, |
| 636 | std::string_view clamp, std::string_view segmentation_mask); | 653 | std::string_view clamp, std::string_view segmentation_mask); |
| 637 | void EmitShuffleDown(EmitContext& ctx, IR::Inst* inst, std::string_view value, | 654 | void EmitShuffleDown(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 638 | std::string_view index, std::string_view clamp, | 655 | std::string_view index, std::string_view clamp, |
| 639 | std::string_view segmentation_mask); | 656 | std::string_view segmentation_mask); |
| 640 | void EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, std::string_view value, | 657 | void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 641 | std::string_view index, std::string_view clamp, | 658 | std::string_view index, std::string_view clamp, |
| 642 | std::string_view segmentation_mask); | 659 | std::string_view segmentation_mask); |
| 643 | void EmitFSwizzleAdd(EmitContext& ctx, std::string_view op_a, std::string_view op_b, | 660 | void EmitFSwizzleAdd(EmitContext& ctx, std::string_view op_a, std::string_view op_b, |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp index e69de29bb..e228fa072 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp | |||
| @@ -0,0 +1,228 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <string_view> | ||
| 6 | |||
| 7 | #include "shader_recompiler/backend/glasm/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | |||
| 11 | namespace Shader::Backend::GLASM { | ||
| 12 | |||
| 13 | void EmitIAdd32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 14 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 15 | throw NotImplementedException("GLASM instruction"); | ||
| 16 | } | ||
| 17 | |||
| 18 | void EmitIAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 19 | [[maybe_unused]] std::string_view b) { | ||
| 20 | throw NotImplementedException("GLASM instruction"); | ||
| 21 | } | ||
| 22 | |||
| 23 | void EmitISub32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 24 | [[maybe_unused]] std::string_view b) { | ||
| 25 | throw NotImplementedException("GLASM instruction"); | ||
| 26 | } | ||
| 27 | |||
| 28 | void EmitISub64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 29 | [[maybe_unused]] std::string_view b) { | ||
| 30 | throw NotImplementedException("GLASM instruction"); | ||
| 31 | } | ||
| 32 | |||
| 33 | void EmitIMul32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 34 | [[maybe_unused]] std::string_view b) { | ||
| 35 | throw NotImplementedException("GLASM instruction"); | ||
| 36 | } | ||
| 37 | |||
| 38 | void EmitINeg32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 39 | throw NotImplementedException("GLASM instruction"); | ||
| 40 | } | ||
| 41 | |||
| 42 | void EmitINeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 43 | throw NotImplementedException("GLASM instruction"); | ||
| 44 | } | ||
| 45 | |||
| 46 | void EmitIAbs32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 47 | throw NotImplementedException("GLASM instruction"); | ||
| 48 | } | ||
| 49 | |||
| 50 | void EmitIAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 51 | throw NotImplementedException("GLASM instruction"); | ||
| 52 | } | ||
| 53 | |||
| 54 | void EmitShiftLeftLogical32([[maybe_unused]] EmitContext& ctx, | ||
| 55 | [[maybe_unused]] std::string_view base, | ||
| 56 | [[maybe_unused]] std::string_view shift) { | ||
| 57 | throw NotImplementedException("GLASM instruction"); | ||
| 58 | } | ||
| 59 | |||
| 60 | void EmitShiftLeftLogical64([[maybe_unused]] EmitContext& ctx, | ||
| 61 | [[maybe_unused]] std::string_view base, | ||
| 62 | [[maybe_unused]] std::string_view shift) { | ||
| 63 | throw NotImplementedException("GLASM instruction"); | ||
| 64 | } | ||
| 65 | |||
| 66 | void EmitShiftRightLogical32([[maybe_unused]] EmitContext& ctx, | ||
| 67 | [[maybe_unused]] std::string_view base, | ||
| 68 | [[maybe_unused]] std::string_view shift) { | ||
| 69 | throw NotImplementedException("GLASM instruction"); | ||
| 70 | } | ||
| 71 | |||
| 72 | void EmitShiftRightLogical64([[maybe_unused]] EmitContext& ctx, | ||
| 73 | [[maybe_unused]] std::string_view base, | ||
| 74 | [[maybe_unused]] std::string_view shift) { | ||
| 75 | throw NotImplementedException("GLASM instruction"); | ||
| 76 | } | ||
| 77 | |||
| 78 | void EmitShiftRightArithmetic32([[maybe_unused]] EmitContext& ctx, | ||
| 79 | [[maybe_unused]] std::string_view base, | ||
| 80 | [[maybe_unused]] std::string_view shift) { | ||
| 81 | throw NotImplementedException("GLASM instruction"); | ||
| 82 | } | ||
| 83 | |||
| 84 | void EmitShiftRightArithmetic64([[maybe_unused]] EmitContext& ctx, | ||
| 85 | [[maybe_unused]] std::string_view base, | ||
| 86 | [[maybe_unused]] std::string_view shift) { | ||
| 87 | throw NotImplementedException("GLASM instruction"); | ||
| 88 | } | ||
| 89 | |||
| 90 | void EmitBitwiseAnd32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 91 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 92 | throw NotImplementedException("GLASM instruction"); | ||
| 93 | } | ||
| 94 | |||
| 95 | void EmitBitwiseOr32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 96 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 97 | throw NotImplementedException("GLASM instruction"); | ||
| 98 | } | ||
| 99 | |||
| 100 | void EmitBitwiseXor32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 101 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 102 | throw NotImplementedException("GLASM instruction"); | ||
| 103 | } | ||
| 104 | |||
| 105 | void EmitBitFieldInsert([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view base, | ||
| 106 | [[maybe_unused]] std::string_view insert, | ||
| 107 | [[maybe_unused]] std::string_view offset, | ||
| 108 | [[maybe_unused]] std::string_view count) { | ||
| 109 | throw NotImplementedException("GLASM instruction"); | ||
| 110 | } | ||
| 111 | |||
| 112 | void EmitBitFieldSExtract([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 113 | [[maybe_unused]] std::string_view base, | ||
| 114 | [[maybe_unused]] std::string_view offset, | ||
| 115 | [[maybe_unused]] std::string_view count) { | ||
| 116 | throw NotImplementedException("GLASM instruction"); | ||
| 117 | } | ||
| 118 | |||
| 119 | void EmitBitFieldUExtract([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 120 | [[maybe_unused]] std::string_view base, | ||
| 121 | [[maybe_unused]] std::string_view offset, | ||
| 122 | [[maybe_unused]] std::string_view count) { | ||
| 123 | throw NotImplementedException("GLASM instruction"); | ||
| 124 | } | ||
| 125 | |||
| 126 | void EmitBitReverse32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 127 | throw NotImplementedException("GLASM instruction"); | ||
| 128 | } | ||
| 129 | |||
| 130 | void EmitBitCount32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 131 | throw NotImplementedException("GLASM instruction"); | ||
| 132 | } | ||
| 133 | |||
| 134 | void EmitBitwiseNot32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 135 | throw NotImplementedException("GLASM instruction"); | ||
| 136 | } | ||
| 137 | |||
| 138 | void EmitFindSMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 139 | throw NotImplementedException("GLASM instruction"); | ||
| 140 | } | ||
| 141 | |||
| 142 | void EmitFindUMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 143 | throw NotImplementedException("GLASM instruction"); | ||
| 144 | } | ||
| 145 | |||
| 146 | void EmitSMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 147 | [[maybe_unused]] std::string_view b) { | ||
| 148 | throw NotImplementedException("GLASM instruction"); | ||
| 149 | } | ||
| 150 | |||
| 151 | void EmitUMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 152 | [[maybe_unused]] std::string_view b) { | ||
| 153 | throw NotImplementedException("GLASM instruction"); | ||
| 154 | } | ||
| 155 | |||
| 156 | void EmitSMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 157 | [[maybe_unused]] std::string_view b) { | ||
| 158 | throw NotImplementedException("GLASM instruction"); | ||
| 159 | } | ||
| 160 | |||
| 161 | void EmitUMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view a, | ||
| 162 | [[maybe_unused]] std::string_view b) { | ||
| 163 | throw NotImplementedException("GLASM instruction"); | ||
| 164 | } | ||
| 165 | |||
| 166 | void EmitSClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 167 | [[maybe_unused]] std::string_view value, [[maybe_unused]] std::string_view min, | ||
| 168 | [[maybe_unused]] std::string_view max) { | ||
| 169 | throw NotImplementedException("GLASM instruction"); | ||
| 170 | } | ||
| 171 | |||
| 172 | void EmitUClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 173 | [[maybe_unused]] std::string_view value, [[maybe_unused]] std::string_view min, | ||
| 174 | [[maybe_unused]] std::string_view max) { | ||
| 175 | throw NotImplementedException("GLASM instruction"); | ||
| 176 | } | ||
| 177 | |||
| 178 | void EmitSLessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 179 | [[maybe_unused]] std::string_view rhs) { | ||
| 180 | throw NotImplementedException("GLASM instruction"); | ||
| 181 | } | ||
| 182 | |||
| 183 | void EmitULessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 184 | [[maybe_unused]] std::string_view rhs) { | ||
| 185 | throw NotImplementedException("GLASM instruction"); | ||
| 186 | } | ||
| 187 | |||
| 188 | void EmitIEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 189 | [[maybe_unused]] std::string_view rhs) { | ||
| 190 | throw NotImplementedException("GLASM instruction"); | ||
| 191 | } | ||
| 192 | |||
| 193 | void EmitSLessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 194 | [[maybe_unused]] std::string_view rhs) { | ||
| 195 | throw NotImplementedException("GLASM instruction"); | ||
| 196 | } | ||
| 197 | |||
| 198 | void EmitULessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 199 | [[maybe_unused]] std::string_view rhs) { | ||
| 200 | throw NotImplementedException("GLASM instruction"); | ||
| 201 | } | ||
| 202 | |||
| 203 | void EmitSGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 204 | [[maybe_unused]] std::string_view rhs) { | ||
| 205 | throw NotImplementedException("GLASM instruction"); | ||
| 206 | } | ||
| 207 | |||
| 208 | void EmitUGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 209 | [[maybe_unused]] std::string_view rhs) { | ||
| 210 | throw NotImplementedException("GLASM instruction"); | ||
| 211 | } | ||
| 212 | |||
| 213 | void EmitINotEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 214 | [[maybe_unused]] std::string_view rhs) { | ||
| 215 | throw NotImplementedException("GLASM instruction"); | ||
| 216 | } | ||
| 217 | |||
| 218 | void EmitSGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 219 | [[maybe_unused]] std::string_view rhs) { | ||
| 220 | throw NotImplementedException("GLASM instruction"); | ||
| 221 | } | ||
| 222 | |||
| 223 | void EmitUGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view lhs, | ||
| 224 | [[maybe_unused]] std::string_view rhs) { | ||
| 225 | throw NotImplementedException("GLASM instruction"); | ||
| 226 | } | ||
| 227 | |||
| 228 | } // namespace Shader::Backend::GLASM | ||
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp index e69de29bb..9e38a1bdf 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_memory.cpp | |||
| @@ -0,0 +1,178 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <string_view> | ||
| 6 | |||
| 7 | #include "shader_recompiler/backend/glasm/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/program.h" | ||
| 10 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 11 | |||
| 12 | namespace Shader::Backend::GLASM { | ||
| 13 | namespace { | ||
| 14 | void StorageOp(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 15 | std::string_view then_expr, std::string_view else_expr = {}) { | ||
| 16 | // Operate on bindless SSBO, call the expression with bounds checking | ||
| 17 | // address = c[binding].xy | ||
| 18 | // length = c[binding].z | ||
| 19 | const u32 sb_binding{binding.U32()}; | ||
| 20 | ctx.Add("PK64.U LC,c[{}];" // pointer = address | ||
| 21 | "CVT.U64.U32 LC.z,{};" // offset = uint64_t(offset) | ||
| 22 | "ADD.U64 LC.x,LC.x,LC.z;" // pointer += offset | ||
| 23 | "SLT.U.CC RC.x,{},c[{}].z;", // cc = offset < length | ||
| 24 | sb_binding, offset, offset, sb_binding); | ||
| 25 | if (else_expr.empty()) { | ||
| 26 | ctx.Add("{}", then_expr); | ||
| 27 | } else { | ||
| 28 | ctx.Add("IF NE.x;{}ELSE;{}ENDIF;", then_expr, else_expr); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | void Store(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 33 | std::string_view value, std::string_view size) { | ||
| 34 | StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},LC.x;", size, value)); | ||
| 35 | } | ||
| 36 | |||
| 37 | void Load(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, std::string_view offset, | ||
| 38 | std::string_view size) { | ||
| 39 | const std::string ret{ctx.reg_alloc.Define(inst)}; | ||
| 40 | StorageOp(ctx, binding, offset, fmt::format("STORE.{} {},LC.x;", size, ret), | ||
| 41 | fmt::format("MOV.U {},{{0,0,0,0}};", ret)); | ||
| 42 | } | ||
| 43 | } // Anonymous namespace | ||
| 44 | |||
| 45 | void EmitLoadGlobalU8([[maybe_unused]] EmitContext& ctx) { | ||
| 46 | throw NotImplementedException("GLASM instruction"); | ||
| 47 | } | ||
| 48 | |||
| 49 | void EmitLoadGlobalS8([[maybe_unused]] EmitContext& ctx) { | ||
| 50 | throw NotImplementedException("GLASM instruction"); | ||
| 51 | } | ||
| 52 | |||
| 53 | void EmitLoadGlobalU16([[maybe_unused]] EmitContext& ctx) { | ||
| 54 | throw NotImplementedException("GLASM instruction"); | ||
| 55 | } | ||
| 56 | |||
| 57 | void EmitLoadGlobalS16([[maybe_unused]] EmitContext& ctx) { | ||
| 58 | throw NotImplementedException("GLASM instruction"); | ||
| 59 | } | ||
| 60 | |||
| 61 | void EmitLoadGlobal32([[maybe_unused]] EmitContext& ctx, | ||
| 62 | [[maybe_unused]] std::string_view address) { | ||
| 63 | throw NotImplementedException("GLASM instruction"); | ||
| 64 | } | ||
| 65 | |||
| 66 | void EmitLoadGlobal64([[maybe_unused]] EmitContext& ctx, | ||
| 67 | [[maybe_unused]] std::string_view address) { | ||
| 68 | throw NotImplementedException("GLASM instruction"); | ||
| 69 | } | ||
| 70 | |||
| 71 | void EmitLoadGlobal128([[maybe_unused]] EmitContext& ctx, | ||
| 72 | [[maybe_unused]] std::string_view address) { | ||
| 73 | throw NotImplementedException("GLASM instruction"); | ||
| 74 | } | ||
| 75 | |||
| 76 | void EmitWriteGlobalU8([[maybe_unused]] EmitContext& ctx) { | ||
| 77 | throw NotImplementedException("GLASM instruction"); | ||
| 78 | } | ||
| 79 | |||
| 80 | void EmitWriteGlobalS8([[maybe_unused]] EmitContext& ctx) { | ||
| 81 | throw NotImplementedException("GLASM instruction"); | ||
| 82 | } | ||
| 83 | |||
| 84 | void EmitWriteGlobalU16([[maybe_unused]] EmitContext& ctx) { | ||
| 85 | throw NotImplementedException("GLASM instruction"); | ||
| 86 | } | ||
| 87 | |||
| 88 | void EmitWriteGlobalS16([[maybe_unused]] EmitContext& ctx) { | ||
| 89 | throw NotImplementedException("GLASM instruction"); | ||
| 90 | } | ||
| 91 | |||
| 92 | void EmitWriteGlobal32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view address, | ||
| 93 | [[maybe_unused]] std::string_view value) { | ||
| 94 | throw NotImplementedException("GLASM instruction"); | ||
| 95 | } | ||
| 96 | |||
| 97 | void EmitWriteGlobal64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view address, | ||
| 98 | [[maybe_unused]] std::string_view value) { | ||
| 99 | throw NotImplementedException("GLASM instruction"); | ||
| 100 | } | ||
| 101 | |||
| 102 | void EmitWriteGlobal128([[maybe_unused]] EmitContext& ctx, | ||
| 103 | [[maybe_unused]] std::string_view address, | ||
| 104 | [[maybe_unused]] std::string_view value) { | ||
| 105 | throw NotImplementedException("GLASM instruction"); | ||
| 106 | } | ||
| 107 | |||
| 108 | void EmitLoadStorageU8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 109 | std::string_view offset) { | ||
| 110 | Load(ctx, inst, binding, offset, "U8"); | ||
| 111 | } | ||
| 112 | |||
| 113 | void EmitLoadStorageS8(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 114 | std::string_view offset) { | ||
| 115 | Load(ctx, inst, binding, offset, "S8"); | ||
| 116 | } | ||
| 117 | |||
| 118 | void EmitLoadStorageU16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 119 | std::string_view offset) { | ||
| 120 | Load(ctx, inst, binding, offset, "U16"); | ||
| 121 | } | ||
| 122 | |||
| 123 | void EmitLoadStorageS16(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 124 | std::string_view offset) { | ||
| 125 | Load(ctx, inst, binding, offset, "S16"); | ||
| 126 | } | ||
| 127 | |||
| 128 | void EmitLoadStorage32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 129 | std::string_view offset) { | ||
| 130 | Load(ctx, inst, binding, offset, "U32"); | ||
| 131 | } | ||
| 132 | |||
| 133 | void EmitLoadStorage64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 134 | std::string_view offset) { | ||
| 135 | Load(ctx, inst, binding, offset, "U32X2"); | ||
| 136 | } | ||
| 137 | |||
| 138 | void EmitLoadStorage128(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 139 | std::string_view offset) { | ||
| 140 | Load(ctx, inst, binding, offset, "U32X4"); | ||
| 141 | } | ||
| 142 | |||
| 143 | void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 144 | std::string_view value) { | ||
| 145 | Store(ctx, binding, offset, value, "U8"); | ||
| 146 | } | ||
| 147 | |||
| 148 | void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 149 | std::string_view value) { | ||
| 150 | Store(ctx, binding, offset, value, "S8"); | ||
| 151 | } | ||
| 152 | |||
| 153 | void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 154 | std::string_view value) { | ||
| 155 | Store(ctx, binding, offset, value, "U16"); | ||
| 156 | } | ||
| 157 | |||
| 158 | void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 159 | std::string_view value) { | ||
| 160 | Store(ctx, binding, offset, value, "S16"); | ||
| 161 | } | ||
| 162 | |||
| 163 | void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 164 | std::string_view value) { | ||
| 165 | Store(ctx, binding, offset, value, "U32"); | ||
| 166 | } | ||
| 167 | |||
| 168 | void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 169 | std::string_view value) { | ||
| 170 | Store(ctx, binding, offset, value, "U32X2"); | ||
| 171 | } | ||
| 172 | |||
| 173 | void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, std::string_view offset, | ||
| 174 | std::string_view value) { | ||
| 175 | Store(ctx, binding, offset, value, "U32X4"); | ||
| 176 | } | ||
| 177 | |||
| 178 | } // namespace Shader::Backend::GLASM | ||
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp index e90224e15..1337f4ae8 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp | |||
| @@ -15,11 +15,9 @@ | |||
| 15 | 15 | ||
| 16 | namespace Shader::Backend::GLASM { | 16 | namespace Shader::Backend::GLASM { |
| 17 | 17 | ||
| 18 | static void NotImplemented() { | 18 | #define NotImplemented() throw NotImplementedException("GLASM instruction {}", __LINE__) |
| 19 | throw NotImplementedException("GLASM instruction"); | ||
| 20 | } | ||
| 21 | 19 | ||
| 22 | void EmitPhi(EmitContext& ctx, IR::Inst* inst) { | 20 | void EmitPhi(EmitContext& ctx, IR::Inst& inst) { |
| 23 | NotImplemented(); | 21 | NotImplemented(); |
| 24 | } | 22 | } |
| 25 | 23 | ||
| @@ -27,10 +25,6 @@ void EmitVoid(EmitContext& ctx) { | |||
| 27 | NotImplemented(); | 25 | NotImplemented(); |
| 28 | } | 26 | } |
| 29 | 27 | ||
| 30 | void EmitIdentity(EmitContext& ctx, const IR::Value& value) { | ||
| 31 | NotImplemented(); | ||
| 32 | } | ||
| 33 | |||
| 34 | void EmitBranch(EmitContext& ctx, std::string_view label) { | 28 | void EmitBranch(EmitContext& ctx, std::string_view label) { |
| 35 | NotImplemented(); | 29 | NotImplemented(); |
| 36 | } | 30 | } |
| @@ -50,7 +44,7 @@ void EmitSelectionMerge(EmitContext& ctx, std::string_view merge_label) { | |||
| 50 | } | 44 | } |
| 51 | 45 | ||
| 52 | void EmitReturn(EmitContext& ctx) { | 46 | void EmitReturn(EmitContext& ctx) { |
| 53 | NotImplemented(); | 47 | ctx.Add("RET;"); |
| 54 | } | 48 | } |
| 55 | 49 | ||
| 56 | void EmitJoin(EmitContext& ctx) { | 50 | void EmitJoin(EmitContext& ctx) { |
| @@ -78,11 +72,11 @@ void EmitDeviceMemoryBarrier(EmitContext& ctx) { | |||
| 78 | } | 72 | } |
| 79 | 73 | ||
| 80 | void EmitPrologue(EmitContext& ctx) { | 74 | void EmitPrologue(EmitContext& ctx) { |
| 81 | NotImplemented(); | 75 | // TODO |
| 82 | } | 76 | } |
| 83 | 77 | ||
| 84 | void EmitEpilogue(EmitContext& ctx) { | 78 | void EmitEpilogue(EmitContext& ctx) { |
| 85 | NotImplemented(); | 79 | // TODO |
| 86 | } | 80 | } |
| 87 | 81 | ||
| 88 | void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) { | 82 | void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) { |
| @@ -125,72 +119,6 @@ void EmitGetIndirectBranchVariable(EmitContext& ctx) { | |||
| 125 | NotImplemented(); | 119 | NotImplemented(); |
| 126 | } | 120 | } |
| 127 | 121 | ||
| 128 | void EmitGetCbufU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 129 | NotImplemented(); | ||
| 130 | } | ||
| 131 | |||
| 132 | void EmitGetCbufS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 133 | NotImplemented(); | ||
| 134 | } | ||
| 135 | |||
| 136 | void EmitGetCbufU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 137 | NotImplemented(); | ||
| 138 | } | ||
| 139 | |||
| 140 | void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 141 | NotImplemented(); | ||
| 142 | } | ||
| 143 | |||
| 144 | void EmitGetCbufU32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 145 | NotImplemented(); | ||
| 146 | } | ||
| 147 | |||
| 148 | void EmitGetCbufF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 149 | NotImplemented(); | ||
| 150 | } | ||
| 151 | |||
| 152 | void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 153 | NotImplemented(); | ||
| 154 | } | ||
| 155 | |||
| 156 | void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex) { | ||
| 157 | NotImplemented(); | ||
| 158 | } | ||
| 159 | |||
| 160 | void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value, | ||
| 161 | std::string_view vertex) { | ||
| 162 | NotImplemented(); | ||
| 163 | } | ||
| 164 | |||
| 165 | void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex) { | ||
| 166 | NotImplemented(); | ||
| 167 | } | ||
| 168 | |||
| 169 | void EmitSetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view value, | ||
| 170 | std::string_view vertex) { | ||
| 171 | NotImplemented(); | ||
| 172 | } | ||
| 173 | |||
| 174 | void EmitGetPatch(EmitContext& ctx, IR::Patch patch) { | ||
| 175 | NotImplemented(); | ||
| 176 | } | ||
| 177 | |||
| 178 | void EmitSetPatch(EmitContext& ctx, IR::Patch patch, std::string_view value) { | ||
| 179 | NotImplemented(); | ||
| 180 | } | ||
| 181 | |||
| 182 | void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, std::string_view value) { | ||
| 183 | NotImplemented(); | ||
| 184 | } | ||
| 185 | |||
| 186 | void EmitSetSampleMask(EmitContext& ctx, std::string_view value) { | ||
| 187 | NotImplemented(); | ||
| 188 | } | ||
| 189 | |||
| 190 | void EmitSetFragDepth(EmitContext& ctx, std::string_view value) { | ||
| 191 | NotImplemented(); | ||
| 192 | } | ||
| 193 | |||
| 194 | void EmitGetZFlag(EmitContext& ctx) { | 122 | void EmitGetZFlag(EmitContext& ctx) { |
| 195 | NotImplemented(); | 123 | NotImplemented(); |
| 196 | } | 124 | } |
| @@ -275,125 +203,6 @@ void EmitUndefU64(EmitContext& ctx) { | |||
| 275 | NotImplemented(); | 203 | NotImplemented(); |
| 276 | } | 204 | } |
| 277 | 205 | ||
| 278 | void EmitLoadGlobalU8(EmitContext& ctx) { | ||
| 279 | NotImplemented(); | ||
| 280 | } | ||
| 281 | |||
| 282 | void EmitLoadGlobalS8(EmitContext& ctx) { | ||
| 283 | NotImplemented(); | ||
| 284 | } | ||
| 285 | |||
| 286 | void EmitLoadGlobalU16(EmitContext& ctx) { | ||
| 287 | NotImplemented(); | ||
| 288 | } | ||
| 289 | |||
| 290 | void EmitLoadGlobalS16(EmitContext& ctx) { | ||
| 291 | NotImplemented(); | ||
| 292 | } | ||
| 293 | |||
| 294 | void EmitLoadGlobal32(EmitContext& ctx, std::string_view address) { | ||
| 295 | NotImplemented(); | ||
| 296 | } | ||
| 297 | |||
| 298 | void EmitLoadGlobal64(EmitContext& ctx, std::string_view address) { | ||
| 299 | NotImplemented(); | ||
| 300 | } | ||
| 301 | |||
| 302 | void EmitLoadGlobal128(EmitContext& ctx, std::string_view address) { | ||
| 303 | NotImplemented(); | ||
| 304 | } | ||
| 305 | |||
| 306 | void EmitWriteGlobalU8(EmitContext& ctx) { | ||
| 307 | NotImplemented(); | ||
| 308 | } | ||
| 309 | |||
| 310 | void EmitWriteGlobalS8(EmitContext& ctx) { | ||
| 311 | NotImplemented(); | ||
| 312 | } | ||
| 313 | |||
| 314 | void EmitWriteGlobalU16(EmitContext& ctx) { | ||
| 315 | NotImplemented(); | ||
| 316 | } | ||
| 317 | |||
| 318 | void EmitWriteGlobalS16(EmitContext& ctx) { | ||
| 319 | NotImplemented(); | ||
| 320 | } | ||
| 321 | |||
| 322 | void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value) { | ||
| 323 | NotImplemented(); | ||
| 324 | } | ||
| 325 | |||
| 326 | void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value) { | ||
| 327 | NotImplemented(); | ||
| 328 | } | ||
| 329 | |||
| 330 | void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value) { | ||
| 331 | NotImplemented(); | ||
| 332 | } | ||
| 333 | |||
| 334 | void EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 335 | NotImplemented(); | ||
| 336 | } | ||
| 337 | |||
| 338 | void EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 339 | NotImplemented(); | ||
| 340 | } | ||
| 341 | |||
| 342 | void EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 343 | NotImplemented(); | ||
| 344 | } | ||
| 345 | |||
| 346 | void EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 347 | NotImplemented(); | ||
| 348 | } | ||
| 349 | |||
| 350 | void EmitLoadStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 351 | NotImplemented(); | ||
| 352 | } | ||
| 353 | |||
| 354 | void EmitLoadStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 355 | NotImplemented(); | ||
| 356 | } | ||
| 357 | |||
| 358 | void EmitLoadStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) { | ||
| 359 | NotImplemented(); | ||
| 360 | } | ||
| 361 | |||
| 362 | void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 363 | std::string_view value) { | ||
| 364 | NotImplemented(); | ||
| 365 | } | ||
| 366 | |||
| 367 | void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 368 | std::string_view value) { | ||
| 369 | NotImplemented(); | ||
| 370 | } | ||
| 371 | |||
| 372 | void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 373 | std::string_view value) { | ||
| 374 | NotImplemented(); | ||
| 375 | } | ||
| 376 | |||
| 377 | void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 378 | std::string_view value) { | ||
| 379 | NotImplemented(); | ||
| 380 | } | ||
| 381 | |||
| 382 | void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 383 | std::string_view value) { | ||
| 384 | NotImplemented(); | ||
| 385 | } | ||
| 386 | |||
| 387 | void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 388 | std::string_view value) { | ||
| 389 | NotImplemented(); | ||
| 390 | } | ||
| 391 | |||
| 392 | void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, | ||
| 393 | std::string_view value) { | ||
| 394 | NotImplemented(); | ||
| 395 | } | ||
| 396 | |||
| 397 | void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset) { | 206 | void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset) { |
| 398 | NotImplemented(); | 207 | NotImplemented(); |
| 399 | } | 208 | } |
| @@ -644,30 +453,6 @@ void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view tru | |||
| 644 | NotImplemented(); | 453 | NotImplemented(); |
| 645 | } | 454 | } |
| 646 | 455 | ||
| 647 | void EmitBitCastU16F16(EmitContext& ctx) { | ||
| 648 | NotImplemented(); | ||
| 649 | } | ||
| 650 | |||
| 651 | void EmitBitCastU32F32(EmitContext& ctx, std::string_view value) { | ||
| 652 | NotImplemented(); | ||
| 653 | } | ||
| 654 | |||
| 655 | void EmitBitCastU64F64(EmitContext& ctx) { | ||
| 656 | NotImplemented(); | ||
| 657 | } | ||
| 658 | |||
| 659 | void EmitBitCastF16U16(EmitContext& ctx) { | ||
| 660 | NotImplemented(); | ||
| 661 | } | ||
| 662 | |||
| 663 | void EmitBitCastF32U32(EmitContext& ctx, std::string_view value) { | ||
| 664 | NotImplemented(); | ||
| 665 | } | ||
| 666 | |||
| 667 | void EmitBitCastF64U64(EmitContext& ctx) { | ||
| 668 | NotImplemented(); | ||
| 669 | } | ||
| 670 | |||
| 671 | void EmitPackUint2x32(EmitContext& ctx, std::string_view value) { | 456 | void EmitPackUint2x32(EmitContext& ctx, std::string_view value) { |
| 672 | NotImplemented(); | 457 | NotImplemented(); |
| 673 | } | 458 | } |
| @@ -724,340 +509,6 @@ void EmitGetInBoundsFromOp(EmitContext& ctx) { | |||
| 724 | NotImplemented(); | 509 | NotImplemented(); |
| 725 | } | 510 | } |
| 726 | 511 | ||
| 727 | void EmitFPAbs16(EmitContext& ctx, std::string_view value) { | ||
| 728 | NotImplemented(); | ||
| 729 | } | ||
| 730 | |||
| 731 | void EmitFPAbs32(EmitContext& ctx, std::string_view value) { | ||
| 732 | NotImplemented(); | ||
| 733 | } | ||
| 734 | |||
| 735 | void EmitFPAbs64(EmitContext& ctx, std::string_view value) { | ||
| 736 | NotImplemented(); | ||
| 737 | } | ||
| 738 | |||
| 739 | void EmitFPAdd16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 740 | NotImplemented(); | ||
| 741 | } | ||
| 742 | |||
| 743 | void EmitFPAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 744 | NotImplemented(); | ||
| 745 | } | ||
| 746 | |||
| 747 | void EmitFPAdd64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 748 | NotImplemented(); | ||
| 749 | } | ||
| 750 | |||
| 751 | void EmitFPFma16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b, | ||
| 752 | std::string_view c) { | ||
| 753 | NotImplemented(); | ||
| 754 | } | ||
| 755 | |||
| 756 | void EmitFPFma32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b, | ||
| 757 | std::string_view c) { | ||
| 758 | NotImplemented(); | ||
| 759 | } | ||
| 760 | |||
| 761 | void EmitFPFma64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b, | ||
| 762 | std::string_view c) { | ||
| 763 | NotImplemented(); | ||
| 764 | } | ||
| 765 | |||
| 766 | void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 767 | NotImplemented(); | ||
| 768 | } | ||
| 769 | |||
| 770 | void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 771 | NotImplemented(); | ||
| 772 | } | ||
| 773 | |||
| 774 | void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 775 | NotImplemented(); | ||
| 776 | } | ||
| 777 | |||
| 778 | void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 779 | NotImplemented(); | ||
| 780 | } | ||
| 781 | |||
| 782 | void EmitFPMul16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 783 | NotImplemented(); | ||
| 784 | } | ||
| 785 | |||
| 786 | void EmitFPMul32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 787 | NotImplemented(); | ||
| 788 | } | ||
| 789 | |||
| 790 | void EmitFPMul64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 791 | NotImplemented(); | ||
| 792 | } | ||
| 793 | |||
| 794 | void EmitFPNeg16(EmitContext& ctx, std::string_view value) { | ||
| 795 | NotImplemented(); | ||
| 796 | } | ||
| 797 | |||
| 798 | void EmitFPNeg32(EmitContext& ctx, std::string_view value) { | ||
| 799 | NotImplemented(); | ||
| 800 | } | ||
| 801 | |||
| 802 | void EmitFPNeg64(EmitContext& ctx, std::string_view value) { | ||
| 803 | NotImplemented(); | ||
| 804 | } | ||
| 805 | |||
| 806 | void EmitFPSin(EmitContext& ctx, std::string_view value) { | ||
| 807 | NotImplemented(); | ||
| 808 | } | ||
| 809 | |||
| 810 | void EmitFPCos(EmitContext& ctx, std::string_view value) { | ||
| 811 | NotImplemented(); | ||
| 812 | } | ||
| 813 | |||
| 814 | void EmitFPExp2(EmitContext& ctx, std::string_view value) { | ||
| 815 | NotImplemented(); | ||
| 816 | } | ||
| 817 | |||
| 818 | void EmitFPLog2(EmitContext& ctx, std::string_view value) { | ||
| 819 | NotImplemented(); | ||
| 820 | } | ||
| 821 | |||
| 822 | void EmitFPRecip32(EmitContext& ctx, std::string_view value) { | ||
| 823 | NotImplemented(); | ||
| 824 | } | ||
| 825 | |||
| 826 | void EmitFPRecip64(EmitContext& ctx, std::string_view value) { | ||
| 827 | NotImplemented(); | ||
| 828 | } | ||
| 829 | |||
| 830 | void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value) { | ||
| 831 | NotImplemented(); | ||
| 832 | } | ||
| 833 | |||
| 834 | void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value) { | ||
| 835 | NotImplemented(); | ||
| 836 | } | ||
| 837 | |||
| 838 | void EmitFPSqrt(EmitContext& ctx, std::string_view value) { | ||
| 839 | NotImplemented(); | ||
| 840 | } | ||
| 841 | |||
| 842 | void EmitFPSaturate16(EmitContext& ctx, std::string_view value) { | ||
| 843 | NotImplemented(); | ||
| 844 | } | ||
| 845 | |||
| 846 | void EmitFPSaturate32(EmitContext& ctx, std::string_view value) { | ||
| 847 | NotImplemented(); | ||
| 848 | } | ||
| 849 | |||
| 850 | void EmitFPSaturate64(EmitContext& ctx, std::string_view value) { | ||
| 851 | NotImplemented(); | ||
| 852 | } | ||
| 853 | |||
| 854 | void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value, | ||
| 855 | std::string_view max_value) { | ||
| 856 | NotImplemented(); | ||
| 857 | } | ||
| 858 | |||
| 859 | void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value, | ||
| 860 | std::string_view max_value) { | ||
| 861 | NotImplemented(); | ||
| 862 | } | ||
| 863 | |||
| 864 | void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value, | ||
| 865 | std::string_view max_value) { | ||
| 866 | NotImplemented(); | ||
| 867 | } | ||
| 868 | |||
| 869 | void EmitFPRoundEven16(EmitContext& ctx, std::string_view value) { | ||
| 870 | NotImplemented(); | ||
| 871 | } | ||
| 872 | |||
| 873 | void EmitFPRoundEven32(EmitContext& ctx, std::string_view value) { | ||
| 874 | NotImplemented(); | ||
| 875 | } | ||
| 876 | |||
| 877 | void EmitFPRoundEven64(EmitContext& ctx, std::string_view value) { | ||
| 878 | NotImplemented(); | ||
| 879 | } | ||
| 880 | |||
| 881 | void EmitFPFloor16(EmitContext& ctx, std::string_view value) { | ||
| 882 | NotImplemented(); | ||
| 883 | } | ||
| 884 | |||
| 885 | void EmitFPFloor32(EmitContext& ctx, std::string_view value) { | ||
| 886 | NotImplemented(); | ||
| 887 | } | ||
| 888 | |||
| 889 | void EmitFPFloor64(EmitContext& ctx, std::string_view value) { | ||
| 890 | NotImplemented(); | ||
| 891 | } | ||
| 892 | |||
| 893 | void EmitFPCeil16(EmitContext& ctx, std::string_view value) { | ||
| 894 | NotImplemented(); | ||
| 895 | } | ||
| 896 | |||
| 897 | void EmitFPCeil32(EmitContext& ctx, std::string_view value) { | ||
| 898 | NotImplemented(); | ||
| 899 | } | ||
| 900 | |||
| 901 | void EmitFPCeil64(EmitContext& ctx, std::string_view value) { | ||
| 902 | NotImplemented(); | ||
| 903 | } | ||
| 904 | |||
| 905 | void EmitFPTrunc16(EmitContext& ctx, std::string_view value) { | ||
| 906 | NotImplemented(); | ||
| 907 | } | ||
| 908 | |||
| 909 | void EmitFPTrunc32(EmitContext& ctx, std::string_view value) { | ||
| 910 | NotImplemented(); | ||
| 911 | } | ||
| 912 | |||
| 913 | void EmitFPTrunc64(EmitContext& ctx, std::string_view value) { | ||
| 914 | NotImplemented(); | ||
| 915 | } | ||
| 916 | |||
| 917 | void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 918 | NotImplemented(); | ||
| 919 | } | ||
| 920 | |||
| 921 | void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 922 | NotImplemented(); | ||
| 923 | } | ||
| 924 | |||
| 925 | void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 926 | NotImplemented(); | ||
| 927 | } | ||
| 928 | |||
| 929 | void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 930 | NotImplemented(); | ||
| 931 | } | ||
| 932 | |||
| 933 | void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 934 | NotImplemented(); | ||
| 935 | } | ||
| 936 | |||
| 937 | void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 938 | NotImplemented(); | ||
| 939 | } | ||
| 940 | |||
| 941 | void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 942 | NotImplemented(); | ||
| 943 | } | ||
| 944 | |||
| 945 | void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 946 | NotImplemented(); | ||
| 947 | } | ||
| 948 | |||
| 949 | void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 950 | NotImplemented(); | ||
| 951 | } | ||
| 952 | |||
| 953 | void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 954 | NotImplemented(); | ||
| 955 | } | ||
| 956 | |||
| 957 | void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 958 | NotImplemented(); | ||
| 959 | } | ||
| 960 | |||
| 961 | void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 962 | NotImplemented(); | ||
| 963 | } | ||
| 964 | |||
| 965 | void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 966 | NotImplemented(); | ||
| 967 | } | ||
| 968 | |||
| 969 | void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 970 | NotImplemented(); | ||
| 971 | } | ||
| 972 | |||
| 973 | void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 974 | NotImplemented(); | ||
| 975 | } | ||
| 976 | |||
| 977 | void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 978 | NotImplemented(); | ||
| 979 | } | ||
| 980 | |||
| 981 | void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 982 | NotImplemented(); | ||
| 983 | } | ||
| 984 | |||
| 985 | void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 986 | NotImplemented(); | ||
| 987 | } | ||
| 988 | |||
| 989 | void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 990 | NotImplemented(); | ||
| 991 | } | ||
| 992 | |||
| 993 | void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 994 | NotImplemented(); | ||
| 995 | } | ||
| 996 | |||
| 997 | void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 998 | NotImplemented(); | ||
| 999 | } | ||
| 1000 | |||
| 1001 | void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1002 | NotImplemented(); | ||
| 1003 | } | ||
| 1004 | |||
| 1005 | void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1006 | NotImplemented(); | ||
| 1007 | } | ||
| 1008 | |||
| 1009 | void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1010 | NotImplemented(); | ||
| 1011 | } | ||
| 1012 | |||
| 1013 | void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1014 | NotImplemented(); | ||
| 1015 | } | ||
| 1016 | |||
| 1017 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1018 | NotImplemented(); | ||
| 1019 | } | ||
| 1020 | |||
| 1021 | void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1022 | NotImplemented(); | ||
| 1023 | } | ||
| 1024 | |||
| 1025 | void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1026 | NotImplemented(); | ||
| 1027 | } | ||
| 1028 | |||
| 1029 | void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1030 | NotImplemented(); | ||
| 1031 | } | ||
| 1032 | |||
| 1033 | void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1034 | NotImplemented(); | ||
| 1035 | } | ||
| 1036 | |||
| 1037 | void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1038 | NotImplemented(); | ||
| 1039 | } | ||
| 1040 | |||
| 1041 | void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1042 | NotImplemented(); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1046 | NotImplemented(); | ||
| 1047 | } | ||
| 1048 | |||
| 1049 | void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1050 | NotImplemented(); | ||
| 1051 | } | ||
| 1052 | |||
| 1053 | void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1054 | NotImplemented(); | ||
| 1055 | } | ||
| 1056 | |||
| 1057 | void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1058 | NotImplemented(); | ||
| 1059 | } | ||
| 1060 | |||
| 1061 | void EmitFPIsNan16(EmitContext& ctx, std::string_view value) { | 512 | void EmitFPIsNan16(EmitContext& ctx, std::string_view value) { |
| 1062 | NotImplemented(); | 513 | NotImplemented(); |
| 1063 | } | 514 | } |
| @@ -1070,179 +521,6 @@ void EmitFPIsNan64(EmitContext& ctx, std::string_view value) { | |||
| 1070 | NotImplemented(); | 521 | NotImplemented(); |
| 1071 | } | 522 | } |
| 1072 | 523 | ||
| 1073 | void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 1074 | NotImplemented(); | ||
| 1075 | } | ||
| 1076 | |||
| 1077 | void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1078 | NotImplemented(); | ||
| 1079 | } | ||
| 1080 | |||
| 1081 | void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1082 | NotImplemented(); | ||
| 1083 | } | ||
| 1084 | |||
| 1085 | void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1086 | NotImplemented(); | ||
| 1087 | } | ||
| 1088 | |||
| 1089 | void EmitIMul32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1090 | NotImplemented(); | ||
| 1091 | } | ||
| 1092 | |||
| 1093 | void EmitINeg32(EmitContext& ctx, std::string_view value) { | ||
| 1094 | NotImplemented(); | ||
| 1095 | } | ||
| 1096 | |||
| 1097 | void EmitINeg64(EmitContext& ctx, std::string_view value) { | ||
| 1098 | NotImplemented(); | ||
| 1099 | } | ||
| 1100 | |||
| 1101 | void EmitIAbs32(EmitContext& ctx, std::string_view value) { | ||
| 1102 | NotImplemented(); | ||
| 1103 | } | ||
| 1104 | |||
| 1105 | void EmitIAbs64(EmitContext& ctx, std::string_view value) { | ||
| 1106 | NotImplemented(); | ||
| 1107 | } | ||
| 1108 | |||
| 1109 | void EmitShiftLeftLogical32(EmitContext& ctx, std::string_view base, std::string_view shift) { | ||
| 1110 | NotImplemented(); | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | void EmitShiftLeftLogical64(EmitContext& ctx, std::string_view base, std::string_view shift) { | ||
| 1114 | NotImplemented(); | ||
| 1115 | } | ||
| 1116 | |||
| 1117 | void EmitShiftRightLogical32(EmitContext& ctx, std::string_view base, std::string_view shift) { | ||
| 1118 | NotImplemented(); | ||
| 1119 | } | ||
| 1120 | |||
| 1121 | void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift) { | ||
| 1122 | NotImplemented(); | ||
| 1123 | } | ||
| 1124 | |||
| 1125 | void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift) { | ||
| 1126 | NotImplemented(); | ||
| 1127 | } | ||
| 1128 | |||
| 1129 | void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift) { | ||
| 1130 | NotImplemented(); | ||
| 1131 | } | ||
| 1132 | |||
| 1133 | void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 1134 | NotImplemented(); | ||
| 1135 | } | ||
| 1136 | |||
| 1137 | void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 1138 | NotImplemented(); | ||
| 1139 | } | ||
| 1140 | |||
| 1141 | void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) { | ||
| 1142 | NotImplemented(); | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert, | ||
| 1146 | std::string_view offset, std::string_view count) { | ||
| 1147 | NotImplemented(); | ||
| 1148 | } | ||
| 1149 | |||
| 1150 | void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base, | ||
| 1151 | std::string_view offset, std::string_view count) { | ||
| 1152 | NotImplemented(); | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base, | ||
| 1156 | std::string_view offset, std::string_view count) { | ||
| 1157 | NotImplemented(); | ||
| 1158 | } | ||
| 1159 | |||
| 1160 | void EmitBitReverse32(EmitContext& ctx, std::string_view value) { | ||
| 1161 | NotImplemented(); | ||
| 1162 | } | ||
| 1163 | |||
| 1164 | void EmitBitCount32(EmitContext& ctx, std::string_view value) { | ||
| 1165 | NotImplemented(); | ||
| 1166 | } | ||
| 1167 | |||
| 1168 | void EmitBitwiseNot32(EmitContext& ctx, std::string_view value) { | ||
| 1169 | NotImplemented(); | ||
| 1170 | } | ||
| 1171 | |||
| 1172 | void EmitFindSMsb32(EmitContext& ctx, std::string_view value) { | ||
| 1173 | NotImplemented(); | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | void EmitFindUMsb32(EmitContext& ctx, std::string_view value) { | ||
| 1177 | NotImplemented(); | ||
| 1178 | } | ||
| 1179 | |||
| 1180 | void EmitSMin32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1181 | NotImplemented(); | ||
| 1182 | } | ||
| 1183 | |||
| 1184 | void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1185 | NotImplemented(); | ||
| 1186 | } | ||
| 1187 | |||
| 1188 | void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1189 | NotImplemented(); | ||
| 1190 | } | ||
| 1191 | |||
| 1192 | void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 1193 | NotImplemented(); | ||
| 1194 | } | ||
| 1195 | |||
| 1196 | void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min, | ||
| 1197 | std::string_view max) { | ||
| 1198 | NotImplemented(); | ||
| 1199 | } | ||
| 1200 | |||
| 1201 | void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min, | ||
| 1202 | std::string_view max) { | ||
| 1203 | NotImplemented(); | ||
| 1204 | } | ||
| 1205 | |||
| 1206 | void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1207 | NotImplemented(); | ||
| 1208 | } | ||
| 1209 | |||
| 1210 | void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1211 | NotImplemented(); | ||
| 1212 | } | ||
| 1213 | |||
| 1214 | void EmitIEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1215 | NotImplemented(); | ||
| 1216 | } | ||
| 1217 | |||
| 1218 | void EmitSLessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1219 | NotImplemented(); | ||
| 1220 | } | ||
| 1221 | |||
| 1222 | void EmitULessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1223 | NotImplemented(); | ||
| 1224 | } | ||
| 1225 | |||
| 1226 | void EmitSGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1227 | NotImplemented(); | ||
| 1228 | } | ||
| 1229 | |||
| 1230 | void EmitUGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1231 | NotImplemented(); | ||
| 1232 | } | ||
| 1233 | |||
| 1234 | void EmitINotEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1235 | NotImplemented(); | ||
| 1236 | } | ||
| 1237 | |||
| 1238 | void EmitSGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1239 | NotImplemented(); | ||
| 1240 | } | ||
| 1241 | |||
| 1242 | void EmitUGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 1243 | NotImplemented(); | ||
| 1244 | } | ||
| 1245 | |||
| 1246 | void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset, | 524 | void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset, |
| 1247 | std::string_view value) { | 525 | std::string_view value) { |
| 1248 | NotImplemented(); | 526 | NotImplemented(); |
| @@ -1858,69 +1136,69 @@ void EmitBoundImageWrite(EmitContext&) { | |||
| 1858 | NotImplemented(); | 1136 | NotImplemented(); |
| 1859 | } | 1137 | } |
| 1860 | 1138 | ||
| 1861 | void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1139 | void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1862 | std::string_view coords, std::string_view bias_lc, | 1140 | std::string_view coords, std::string_view bias_lc, |
| 1863 | const IR::Value& offset) { | 1141 | const IR::Value& offset) { |
| 1864 | NotImplemented(); | 1142 | NotImplemented(); |
| 1865 | } | 1143 | } |
| 1866 | 1144 | ||
| 1867 | void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1145 | void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1868 | std::string_view coords, std::string_view lod_lc, | 1146 | std::string_view coords, std::string_view lod_lc, |
| 1869 | const IR::Value& offset) { | 1147 | const IR::Value& offset) { |
| 1870 | NotImplemented(); | 1148 | NotImplemented(); |
| 1871 | } | 1149 | } |
| 1872 | 1150 | ||
| 1873 | void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1151 | void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1874 | std::string_view coords, std::string_view dref, | 1152 | std::string_view coords, std::string_view dref, |
| 1875 | std::string_view bias_lc, const IR::Value& offset) { | 1153 | std::string_view bias_lc, const IR::Value& offset) { |
| 1876 | NotImplemented(); | 1154 | NotImplemented(); |
| 1877 | } | 1155 | } |
| 1878 | 1156 | ||
| 1879 | void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1157 | void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1880 | std::string_view coords, std::string_view dref, | 1158 | std::string_view coords, std::string_view dref, |
| 1881 | std::string_view lod_lc, const IR::Value& offset) { | 1159 | std::string_view lod_lc, const IR::Value& offset) { |
| 1882 | NotImplemented(); | 1160 | NotImplemented(); |
| 1883 | } | 1161 | } |
| 1884 | 1162 | ||
| 1885 | void EmitImageGather(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1163 | void EmitImageGather(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1886 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2) { | 1164 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2) { |
| 1887 | NotImplemented(); | 1165 | NotImplemented(); |
| 1888 | } | 1166 | } |
| 1889 | 1167 | ||
| 1890 | void EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1168 | void EmitImageGatherDref(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1891 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2, | 1169 | std::string_view coords, const IR::Value& offset, const IR::Value& offset2, |
| 1892 | std::string_view dref) { | 1170 | std::string_view dref) { |
| 1893 | NotImplemented(); | 1171 | NotImplemented(); |
| 1894 | } | 1172 | } |
| 1895 | 1173 | ||
| 1896 | void EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1174 | void EmitImageFetch(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1897 | std::string_view coords, std::string_view offset, std::string_view lod, | 1175 | std::string_view coords, std::string_view offset, std::string_view lod, |
| 1898 | std::string_view ms) { | 1176 | std::string_view ms) { |
| 1899 | NotImplemented(); | 1177 | NotImplemented(); |
| 1900 | } | 1178 | } |
| 1901 | 1179 | ||
| 1902 | void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1180 | void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1903 | std::string_view lod) { | 1181 | std::string_view lod) { |
| 1904 | NotImplemented(); | 1182 | NotImplemented(); |
| 1905 | } | 1183 | } |
| 1906 | 1184 | ||
| 1907 | void EmitImageQueryLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1185 | void EmitImageQueryLod(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1908 | std::string_view coords) { | 1186 | std::string_view coords) { |
| 1909 | NotImplemented(); | 1187 | NotImplemented(); |
| 1910 | } | 1188 | } |
| 1911 | 1189 | ||
| 1912 | void EmitImageGradient(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1190 | void EmitImageGradient(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1913 | std::string_view coords, std::string_view derivates, std::string_view offset, | 1191 | std::string_view coords, std::string_view derivates, std::string_view offset, |
| 1914 | std::string_view lod_clamp) { | 1192 | std::string_view lod_clamp) { |
| 1915 | NotImplemented(); | 1193 | NotImplemented(); |
| 1916 | } | 1194 | } |
| 1917 | 1195 | ||
| 1918 | void EmitImageRead(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1196 | void EmitImageRead(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1919 | std::string_view coords) { | 1197 | std::string_view coords) { |
| 1920 | NotImplemented(); | 1198 | NotImplemented(); |
| 1921 | } | 1199 | } |
| 1922 | 1200 | ||
| 1923 | void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1201 | void EmitImageWrite(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 1924 | std::string_view coords, std::string_view color) { | 1202 | std::string_view coords, std::string_view color) { |
| 1925 | NotImplemented(); | 1203 | NotImplemented(); |
| 1926 | } | 1204 | } |
| @@ -2013,57 +1291,57 @@ void EmitBoundImageAtomicExchange32(EmitContext&) { | |||
| 2013 | NotImplemented(); | 1291 | NotImplemented(); |
| 2014 | } | 1292 | } |
| 2015 | 1293 | ||
| 2016 | void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1294 | void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2017 | std::string_view coords, std::string_view value) { | 1295 | std::string_view coords, std::string_view value) { |
| 2018 | NotImplemented(); | 1296 | NotImplemented(); |
| 2019 | } | 1297 | } |
| 2020 | 1298 | ||
| 2021 | void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1299 | void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2022 | std::string_view coords, std::string_view value) { | 1300 | std::string_view coords, std::string_view value) { |
| 2023 | NotImplemented(); | 1301 | NotImplemented(); |
| 2024 | } | 1302 | } |
| 2025 | 1303 | ||
| 2026 | void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1304 | void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2027 | std::string_view coords, std::string_view value) { | 1305 | std::string_view coords, std::string_view value) { |
| 2028 | NotImplemented(); | 1306 | NotImplemented(); |
| 2029 | } | 1307 | } |
| 2030 | 1308 | ||
| 2031 | void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1309 | void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2032 | std::string_view coords, std::string_view value) { | 1310 | std::string_view coords, std::string_view value) { |
| 2033 | NotImplemented(); | 1311 | NotImplemented(); |
| 2034 | } | 1312 | } |
| 2035 | 1313 | ||
| 2036 | void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1314 | void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2037 | std::string_view coords, std::string_view value) { | 1315 | std::string_view coords, std::string_view value) { |
| 2038 | NotImplemented(); | 1316 | NotImplemented(); |
| 2039 | } | 1317 | } |
| 2040 | 1318 | ||
| 2041 | void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1319 | void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2042 | std::string_view coords, std::string_view value) { | 1320 | std::string_view coords, std::string_view value) { |
| 2043 | NotImplemented(); | 1321 | NotImplemented(); |
| 2044 | } | 1322 | } |
| 2045 | 1323 | ||
| 2046 | void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1324 | void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2047 | std::string_view coords, std::string_view value) { | 1325 | std::string_view coords, std::string_view value) { |
| 2048 | NotImplemented(); | 1326 | NotImplemented(); |
| 2049 | } | 1327 | } |
| 2050 | 1328 | ||
| 2051 | void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1329 | void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2052 | std::string_view coords, std::string_view value) { | 1330 | std::string_view coords, std::string_view value) { |
| 2053 | NotImplemented(); | 1331 | NotImplemented(); |
| 2054 | } | 1332 | } |
| 2055 | 1333 | ||
| 2056 | void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1334 | void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2057 | std::string_view coords, std::string_view value) { | 1335 | std::string_view coords, std::string_view value) { |
| 2058 | NotImplemented(); | 1336 | NotImplemented(); |
| 2059 | } | 1337 | } |
| 2060 | 1338 | ||
| 2061 | void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1339 | void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2062 | std::string_view coords, std::string_view value) { | 1340 | std::string_view coords, std::string_view value) { |
| 2063 | NotImplemented(); | 1341 | NotImplemented(); |
| 2064 | } | 1342 | } |
| 2065 | 1343 | ||
| 2066 | void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, | 1344 | void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, |
| 2067 | std::string_view coords, std::string_view value) { | 1345 | std::string_view coords, std::string_view value) { |
| 2068 | NotImplemented(); | 1346 | NotImplemented(); |
| 2069 | } | 1347 | } |
| @@ -2108,24 +1386,24 @@ void EmitSubgroupGeMask(EmitContext& ctx) { | |||
| 2108 | NotImplemented(); | 1386 | NotImplemented(); |
| 2109 | } | 1387 | } |
| 2110 | 1388 | ||
| 2111 | void EmitShuffleIndex(EmitContext& ctx, IR::Inst* inst, std::string_view value, | 1389 | void EmitShuffleIndex(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 2112 | std::string_view index, std::string_view clamp, | 1390 | std::string_view index, std::string_view clamp, |
| 2113 | std::string_view segmentation_mask) { | 1391 | std::string_view segmentation_mask) { |
| 2114 | NotImplemented(); | 1392 | NotImplemented(); |
| 2115 | } | 1393 | } |
| 2116 | 1394 | ||
| 2117 | void EmitShuffleUp(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view index, | 1395 | void EmitShuffleUp(EmitContext& ctx, IR::Inst& inst, std::string_view value, std::string_view index, |
| 2118 | std::string_view clamp, std::string_view segmentation_mask) { | 1396 | std::string_view clamp, std::string_view segmentation_mask) { |
| 2119 | NotImplemented(); | 1397 | NotImplemented(); |
| 2120 | } | 1398 | } |
| 2121 | 1399 | ||
| 2122 | void EmitShuffleDown(EmitContext& ctx, IR::Inst* inst, std::string_view value, | 1400 | void EmitShuffleDown(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 2123 | std::string_view index, std::string_view clamp, | 1401 | std::string_view index, std::string_view clamp, |
| 2124 | std::string_view segmentation_mask) { | 1402 | std::string_view segmentation_mask) { |
| 2125 | NotImplemented(); | 1403 | NotImplemented(); |
| 2126 | } | 1404 | } |
| 2127 | 1405 | ||
| 2128 | void EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, std::string_view value, | 1406 | void EmitShuffleButterfly(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 2129 | std::string_view index, std::string_view clamp, | 1407 | std::string_view index, std::string_view clamp, |
| 2130 | std::string_view segmentation_mask) { | 1408 | std::string_view segmentation_mask) { |
| 2131 | NotImplemented(); | 1409 | NotImplemented(); |