diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
12 files changed, 1011 insertions, 765 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.h b/src/shader_recompiler/backend/glsl/emit_context.h index f8cf8fdbc..9472f71b9 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.h +++ b/src/shader_recompiler/backend/glsl/emit_context.h | |||
| @@ -66,11 +66,21 @@ public: | |||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | template <typename... Args> | 68 | template <typename... Args> |
| 69 | void AddS64(const char* format_str, IR::Inst& inst, Args&&... args) { | ||
| 70 | Add<Type::S64>(format_str, inst, args...); | ||
| 71 | } | ||
| 72 | |||
| 73 | template <typename... Args> | ||
| 69 | void AddU64(const char* format_str, IR::Inst& inst, Args&&... args) { | 74 | void AddU64(const char* format_str, IR::Inst& inst, Args&&... args) { |
| 70 | Add<Type::U64>(format_str, inst, args...); | 75 | Add<Type::U64>(format_str, inst, args...); |
| 71 | } | 76 | } |
| 72 | 77 | ||
| 73 | template <typename... Args> | 78 | template <typename... Args> |
| 79 | void AddF64(const char* format_str, IR::Inst& inst, Args&&... args) { | ||
| 80 | Add<Type::F64>(format_str, inst, args...); | ||
| 81 | } | ||
| 82 | |||
| 83 | template <typename... Args> | ||
| 74 | void AddU32x2(const char* format_str, IR::Inst& inst, Args&&... args) { | 84 | void AddU32x2(const char* format_str, IR::Inst& inst, Args&&... args) { |
| 75 | Add<Type::U32x2>(format_str, inst, args...); | 85 | Add<Type::U32x2>(format_str, inst, args...); |
| 76 | } | 86 | } |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp index 73cb66674..a1e97b4cb 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp | |||
| @@ -30,6 +30,30 @@ void EmitConditionRef(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) | |||
| 30 | ctx.AddU1("{}={};", inst, ctx.reg_alloc.Consume(value)); | 30 | ctx.AddU1("{}={};", inst, ctx.reg_alloc.Consume(value)); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | void EmitBitCastU16F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst) { | ||
| 34 | throw NotImplementedException("GLSL Instruction"); | ||
| 35 | } | ||
| 36 | |||
| 37 | void EmitBitCastU32F32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 38 | ctx.AddU32("{}=floatBitsToUint({});", inst, value); | ||
| 39 | } | ||
| 40 | |||
| 41 | void EmitBitCastU64F64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 42 | ctx.AddU64("{}=doubleBitsToUint64({});", inst, value); | ||
| 43 | } | ||
| 44 | |||
| 45 | void EmitBitCastF16U16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst) { | ||
| 46 | throw NotImplementedException("GLSL Instruction"); | ||
| 47 | } | ||
| 48 | |||
| 49 | void EmitBitCastF32U32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 50 | ctx.AddF32("{}=uintBitsToFloat({});", inst, value); | ||
| 51 | } | ||
| 52 | |||
| 53 | void EmitBitCastF64U64(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 54 | ctx.AddF64("{}=uint64BitsToDouble({});", inst, value); | ||
| 55 | } | ||
| 56 | |||
| 33 | void EmitPackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | 57 | void EmitPackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { |
| 34 | ctx.AddU64("{}=packUint2x32({});", inst, value); | 58 | ctx.AddU64("{}=packUint2x32({});", inst, value); |
| 35 | } | 59 | } |
| @@ -38,4 +62,29 @@ void EmitUnpackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value | |||
| 38 | ctx.AddU32x2("{}=unpackUint2x32({});", inst, value); | 62 | ctx.AddU32x2("{}=unpackUint2x32({});", inst, value); |
| 39 | } | 63 | } |
| 40 | 64 | ||
| 65 | void EmitPackFloat2x16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view value) { | ||
| 66 | throw NotImplementedException("GLSL Instruction"); | ||
| 67 | } | ||
| 68 | |||
| 69 | void EmitUnpackFloat2x16([[maybe_unused]] EmitContext& ctx, | ||
| 70 | [[maybe_unused]] std::string_view value) { | ||
| 71 | throw NotImplementedException("GLSL Instruction"); | ||
| 72 | } | ||
| 73 | |||
| 74 | void EmitPackHalf2x16(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 75 | ctx.AddU32("{}=packHalf2x16({});", inst, value); | ||
| 76 | } | ||
| 77 | |||
| 78 | void EmitUnpackHalf2x16(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 79 | ctx.AddF32x2("{}=unpackHalf2x16({});", inst, value); | ||
| 80 | } | ||
| 81 | |||
| 82 | void EmitPackDouble2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 83 | ctx.AddF64("{}=packDouble2x32({});", inst, value); | ||
| 84 | } | ||
| 85 | |||
| 86 | void EmitUnpackDouble2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value) { | ||
| 87 | ctx.AddU32x2("{}=unpackDouble2x32({});", inst, value); | ||
| 88 | } | ||
| 89 | |||
| 41 | } // namespace Shader::Backend::GLSL | 90 | } // namespace Shader::Backend::GLSL |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp index 2a7d207a7..40b9ca08e 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | |||
| @@ -10,9 +10,8 @@ | |||
| 10 | #include "shader_recompiler/profile.h" | 10 | #include "shader_recompiler/profile.h" |
| 11 | 11 | ||
| 12 | namespace Shader::Backend::GLSL { | 12 | namespace Shader::Backend::GLSL { |
| 13 | void EmitCompositeConstructU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | 13 | void EmitCompositeConstructU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 14 | [[maybe_unused]] std::string_view e1, | 14 | std::string_view e2) { |
| 15 | [[maybe_unused]] std::string_view e2) { | ||
| 16 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); | 15 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); |
| 17 | } | 16 | } |
| 18 | 17 | ||
| @@ -31,9 +30,8 @@ void EmitCompositeConstructU32x4([[maybe_unused]] EmitContext& ctx, | |||
| 31 | throw NotImplementedException("GLSL Instruction"); | 30 | throw NotImplementedException("GLSL Instruction"); |
| 32 | } | 31 | } |
| 33 | 32 | ||
| 34 | void EmitCompositeExtractU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | 33 | void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 35 | [[maybe_unused]] std::string_view composite, | 34 | u32 index) { |
| 36 | [[maybe_unused]] u32 index) { | ||
| 37 | ctx.AddU32("{}={}[{}];", inst, composite, index); | 35 | ctx.AddU32("{}={}[{}];", inst, composite, index); |
| 38 | } | 36 | } |
| 39 | 37 | ||
| @@ -130,10 +128,9 @@ void EmitCompositeInsertF16x4([[maybe_unused]] EmitContext& ctx, | |||
| 130 | throw NotImplementedException("GLSL Instruction"); | 128 | throw NotImplementedException("GLSL Instruction"); |
| 131 | } | 129 | } |
| 132 | 130 | ||
| 133 | void EmitCompositeConstructF32x2([[maybe_unused]] EmitContext& ctx, | 131 | void EmitCompositeConstructF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 134 | [[maybe_unused]] std::string_view e1, | 132 | std::string_view e2) { |
| 135 | [[maybe_unused]] std::string_view e2) { | 133 | ctx.AddF32x2("{}=uvec2({},{});", inst, e1, e2); |
| 136 | throw NotImplementedException("GLSL Instruction"); | ||
| 137 | } | 134 | } |
| 138 | 135 | ||
| 139 | void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, | 136 | void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, |
| @@ -151,10 +148,9 @@ void EmitCompositeConstructF32x4([[maybe_unused]] EmitContext& ctx, | |||
| 151 | throw NotImplementedException("GLSL Instruction"); | 148 | throw NotImplementedException("GLSL Instruction"); |
| 152 | } | 149 | } |
| 153 | 150 | ||
| 154 | void EmitCompositeExtractF32x2([[maybe_unused]] EmitContext& ctx, | 151 | void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 155 | [[maybe_unused]] std::string_view composite, | 152 | u32 index) { |
| 156 | [[maybe_unused]] u32 index) { | 153 | ctx.AddF32("{}={}[{}];", inst, composite, index); |
| 157 | throw NotImplementedException("GLSL Instruction"); | ||
| 158 | } | 154 | } |
| 159 | 155 | ||
| 160 | void EmitCompositeExtractF32x3([[maybe_unused]] EmitContext& ctx, | 156 | void EmitCompositeExtractF32x3([[maybe_unused]] EmitContext& ctx, |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 2f4ecd6a1..d3d55562c 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | |||
| @@ -37,9 +37,10 @@ void EmitGetCbufU32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | |||
| 37 | (u32_offset / 4) % 4); | 37 | (u32_offset / 4) % 4); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | void EmitGetCbufF32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding, | 40 | void EmitGetCbufF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 41 | [[maybe_unused]] const IR::Value& offset) { | 41 | const IR::Value& offset) { |
| 42 | throw NotImplementedException("GLSL"); | 42 | const auto u32_offset{offset.U32()}; |
| 43 | ctx.AddF32("{}=cbuf{}[{}][{}];", inst, binding.U32(), u32_offset / 16, (u32_offset / 4) % 4); | ||
| 43 | } | 44 | } |
| 44 | 45 | ||
| 45 | void EmitGetCbufU32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding, | 46 | void EmitGetCbufU32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding, |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp index e69de29bb..7ddc24c71 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp | |||
| @@ -0,0 +1,253 @@ | |||
| 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/glsl/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glsl/emit_glsl_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | #include "shader_recompiler/profile.h" | ||
| 11 | |||
| 12 | namespace Shader::Backend::GLSL { | ||
| 13 | void EmitConvertS16F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 14 | [[maybe_unused]] std::string_view value) { | ||
| 15 | throw NotImplementedException("GLSL Instruction"); | ||
| 16 | } | ||
| 17 | |||
| 18 | void EmitConvertS16F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 19 | [[maybe_unused]] std::string_view value) { | ||
| 20 | throw NotImplementedException("GLSL Instruction"); | ||
| 21 | } | ||
| 22 | |||
| 23 | void EmitConvertS16F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 24 | [[maybe_unused]] std::string_view value) { | ||
| 25 | throw NotImplementedException("GLSL Instruction"); | ||
| 26 | } | ||
| 27 | |||
| 28 | void EmitConvertS32F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 29 | [[maybe_unused]] std::string_view value) { | ||
| 30 | throw NotImplementedException("GLSL Instruction"); | ||
| 31 | } | ||
| 32 | |||
| 33 | void EmitConvertS32F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 34 | [[maybe_unused]] std::string_view value) { | ||
| 35 | ctx.AddS32("{}=int({});", inst, value); | ||
| 36 | } | ||
| 37 | |||
| 38 | void EmitConvertS32F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 39 | [[maybe_unused]] std::string_view value) { | ||
| 40 | ctx.AddS32("{}=int({});", inst, value); | ||
| 41 | } | ||
| 42 | |||
| 43 | void EmitConvertS64F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 44 | [[maybe_unused]] std::string_view value) { | ||
| 45 | throw NotImplementedException("GLSL Instruction"); | ||
| 46 | } | ||
| 47 | |||
| 48 | void EmitConvertS64F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 49 | [[maybe_unused]] std::string_view value) { | ||
| 50 | ctx.AddS64("{}=int64_t({});", inst, value); | ||
| 51 | } | ||
| 52 | |||
| 53 | void EmitConvertS64F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 54 | [[maybe_unused]] std::string_view value) { | ||
| 55 | ctx.AddS64("{}=int64_t({});", inst, value); | ||
| 56 | } | ||
| 57 | |||
| 58 | void EmitConvertU16F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 59 | [[maybe_unused]] std::string_view value) { | ||
| 60 | throw NotImplementedException("GLSL Instruction"); | ||
| 61 | } | ||
| 62 | |||
| 63 | void EmitConvertU16F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 64 | [[maybe_unused]] std::string_view value) { | ||
| 65 | throw NotImplementedException("GLSL Instruction"); | ||
| 66 | } | ||
| 67 | |||
| 68 | void EmitConvertU16F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 69 | [[maybe_unused]] std::string_view value) { | ||
| 70 | throw NotImplementedException("GLSL Instruction"); | ||
| 71 | } | ||
| 72 | |||
| 73 | void EmitConvertU32F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 74 | [[maybe_unused]] std::string_view value) { | ||
| 75 | throw NotImplementedException("GLSL Instruction"); | ||
| 76 | } | ||
| 77 | |||
| 78 | void EmitConvertU32F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 79 | [[maybe_unused]] std::string_view value) { | ||
| 80 | ctx.AddU32("{}=uint({});", inst, value); | ||
| 81 | } | ||
| 82 | |||
| 83 | void EmitConvertU32F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 84 | [[maybe_unused]] std::string_view value) { | ||
| 85 | ctx.AddU32("{}=uint({});", inst, value); | ||
| 86 | } | ||
| 87 | |||
| 88 | void EmitConvertU64F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 89 | [[maybe_unused]] std::string_view value) { | ||
| 90 | throw NotImplementedException("GLSL Instruction"); | ||
| 91 | } | ||
| 92 | |||
| 93 | void EmitConvertU64F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 94 | [[maybe_unused]] std::string_view value) { | ||
| 95 | ctx.AddU64("{}=uint64_t({});", inst, value); | ||
| 96 | } | ||
| 97 | |||
| 98 | void EmitConvertU64F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 99 | [[maybe_unused]] std::string_view value) { | ||
| 100 | ctx.AddU64("{}=uint64_t({});", inst, value); | ||
| 101 | } | ||
| 102 | |||
| 103 | void EmitConvertU64U32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 104 | [[maybe_unused]] std::string_view value) { | ||
| 105 | ctx.AddU64("{}=uint64_t({});", inst, value); | ||
| 106 | } | ||
| 107 | |||
| 108 | void EmitConvertU32U64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 109 | [[maybe_unused]] std::string_view value) { | ||
| 110 | ctx.AddU32("{}=uint({});", inst, value); | ||
| 111 | } | ||
| 112 | |||
| 113 | void EmitConvertF16F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 114 | [[maybe_unused]] std::string_view value) { | ||
| 115 | throw NotImplementedException("GLSL Instruction"); | ||
| 116 | } | ||
| 117 | |||
| 118 | void EmitConvertF32F16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 119 | [[maybe_unused]] std::string_view value) { | ||
| 120 | throw NotImplementedException("GLSL Instruction"); | ||
| 121 | } | ||
| 122 | |||
| 123 | void EmitConvertF32F64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 124 | [[maybe_unused]] std::string_view value) { | ||
| 125 | ctx.AddF32("{}=float({});", inst, value); | ||
| 126 | } | ||
| 127 | |||
| 128 | void EmitConvertF64F32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 129 | [[maybe_unused]] std::string_view value) { | ||
| 130 | ctx.AddF64("{}=double({});", inst, value); | ||
| 131 | } | ||
| 132 | |||
| 133 | void EmitConvertF16S8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 134 | [[maybe_unused]] std::string_view value) { | ||
| 135 | throw NotImplementedException("GLSL Instruction"); | ||
| 136 | } | ||
| 137 | |||
| 138 | void EmitConvertF16S16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 139 | [[maybe_unused]] std::string_view value) { | ||
| 140 | throw NotImplementedException("GLSL Instruction"); | ||
| 141 | } | ||
| 142 | |||
| 143 | void EmitConvertF16S32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 144 | [[maybe_unused]] std::string_view value) { | ||
| 145 | throw NotImplementedException("GLSL Instruction"); | ||
| 146 | } | ||
| 147 | |||
| 148 | void EmitConvertF16S64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 149 | [[maybe_unused]] std::string_view value) { | ||
| 150 | throw NotImplementedException("GLSL Instruction"); | ||
| 151 | } | ||
| 152 | |||
| 153 | void EmitConvertF16U8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 154 | [[maybe_unused]] std::string_view value) { | ||
| 155 | throw NotImplementedException("GLSL Instruction"); | ||
| 156 | } | ||
| 157 | |||
| 158 | void EmitConvertF16U16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 159 | [[maybe_unused]] std::string_view value) { | ||
| 160 | throw NotImplementedException("GLSL Instruction"); | ||
| 161 | } | ||
| 162 | |||
| 163 | void EmitConvertF16U32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 164 | [[maybe_unused]] std::string_view value) { | ||
| 165 | throw NotImplementedException("GLSL Instruction"); | ||
| 166 | } | ||
| 167 | |||
| 168 | void EmitConvertF16U64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 169 | [[maybe_unused]] std::string_view value) { | ||
| 170 | throw NotImplementedException("GLSL Instruction"); | ||
| 171 | } | ||
| 172 | |||
| 173 | void EmitConvertF32S8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 174 | [[maybe_unused]] std::string_view value) { | ||
| 175 | throw NotImplementedException("GLSL Instruction"); | ||
| 176 | } | ||
| 177 | |||
| 178 | void EmitConvertF32S16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 179 | [[maybe_unused]] std::string_view value) { | ||
| 180 | throw NotImplementedException("GLSL Instruction"); | ||
| 181 | } | ||
| 182 | |||
| 183 | void EmitConvertF32S32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 184 | [[maybe_unused]] std::string_view value) { | ||
| 185 | ctx.AddF32("{}=float({});", inst, value); | ||
| 186 | } | ||
| 187 | |||
| 188 | void EmitConvertF32S64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 189 | [[maybe_unused]] std::string_view value) { | ||
| 190 | ctx.AddF32("{}=float({});", inst, value); | ||
| 191 | } | ||
| 192 | |||
| 193 | void EmitConvertF32U8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 194 | [[maybe_unused]] std::string_view value) { | ||
| 195 | throw NotImplementedException("GLSL Instruction"); | ||
| 196 | } | ||
| 197 | |||
| 198 | void EmitConvertF32U16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 199 | [[maybe_unused]] std::string_view value) { | ||
| 200 | throw NotImplementedException("GLSL Instruction"); | ||
| 201 | } | ||
| 202 | |||
| 203 | void EmitConvertF32U32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 204 | [[maybe_unused]] std::string_view value) { | ||
| 205 | ctx.AddF32("{}=float({});", inst, value); | ||
| 206 | } | ||
| 207 | |||
| 208 | void EmitConvertF32U64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 209 | [[maybe_unused]] std::string_view value) { | ||
| 210 | ctx.AddF32("{}=float({});", inst, value); | ||
| 211 | } | ||
| 212 | |||
| 213 | void EmitConvertF64S8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 214 | [[maybe_unused]] std::string_view value) { | ||
| 215 | throw NotImplementedException("GLSL Instruction"); | ||
| 216 | } | ||
| 217 | |||
| 218 | void EmitConvertF64S16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 219 | [[maybe_unused]] std::string_view value) { | ||
| 220 | throw NotImplementedException("GLSL Instruction"); | ||
| 221 | } | ||
| 222 | |||
| 223 | void EmitConvertF64S32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 224 | [[maybe_unused]] std::string_view value) { | ||
| 225 | ctx.AddF64("{}=double({});", inst, value); | ||
| 226 | } | ||
| 227 | |||
| 228 | void EmitConvertF64S64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 229 | [[maybe_unused]] std::string_view value) { | ||
| 230 | ctx.AddF64("{}=double({});", inst, value); | ||
| 231 | } | ||
| 232 | |||
| 233 | void EmitConvertF64U8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 234 | [[maybe_unused]] std::string_view value) { | ||
| 235 | throw NotImplementedException("GLSL Instruction"); | ||
| 236 | } | ||
| 237 | |||
| 238 | void EmitConvertF64U16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 239 | [[maybe_unused]] std::string_view value) { | ||
| 240 | throw NotImplementedException("GLSL Instruction"); | ||
| 241 | } | ||
| 242 | |||
| 243 | void EmitConvertF64U32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 244 | [[maybe_unused]] std::string_view value) { | ||
| 245 | ctx.AddF64("{}=double({});", inst, value); | ||
| 246 | } | ||
| 247 | |||
| 248 | void EmitConvertF64U64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 249 | [[maybe_unused]] std::string_view value) { | ||
| 250 | ctx.AddF64("{}=double({});", inst, value); | ||
| 251 | } | ||
| 252 | |||
| 253 | } // namespace Shader::Backend::GLSL | ||
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp index e69de29bb..bea7600af 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp | |||
| @@ -0,0 +1,487 @@ | |||
| 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/glsl/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glsl/emit_glsl_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | #include "shader_recompiler/profile.h" | ||
| 11 | |||
| 12 | namespace Shader::Backend::GLSL { | ||
| 13 | |||
| 14 | void EmitFPAbs16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 15 | [[maybe_unused]] std::string_view value) { | ||
| 16 | throw NotImplementedException("GLSL"); | ||
| 17 | } | ||
| 18 | |||
| 19 | void EmitFPAbs32([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | ||
| 20 | [[maybe_unused]] std::string_view value) { | ||
| 21 | ctx.AddF32("{}=abs({});", inst, value); | ||
| 22 | } | ||
| 23 | |||
| 24 | void EmitFPAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 25 | [[maybe_unused]] std::string_view value) { | ||
| 26 | throw NotImplementedException("GLSL"); | ||
| 27 | } | ||
| 28 | |||
| 29 | void EmitFPAdd16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 30 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 31 | throw NotImplementedException("GLSL"); | ||
| 32 | } | ||
| 33 | |||
| 34 | void EmitFPAdd32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 35 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 36 | ctx.AddF32("{}={}+{};", inst, a, b); | ||
| 37 | } | ||
| 38 | |||
| 39 | void EmitFPAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 40 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 41 | ctx.AddF64("{}={}+{};", inst, a, b); | ||
| 42 | } | ||
| 43 | |||
| 44 | void EmitFPFma16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 45 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b, | ||
| 46 | [[maybe_unused]] std::string_view c) { | ||
| 47 | throw NotImplementedException("GLSL"); | ||
| 48 | } | ||
| 49 | |||
| 50 | void EmitFPFma32([[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 | ctx.AddF32("{}=fma({},{},{});", inst, a, b, c); | ||
| 54 | } | ||
| 55 | |||
| 56 | void EmitFPFma64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 57 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b, | ||
| 58 | [[maybe_unused]] std::string_view c) { | ||
| 59 | ctx.AddF64("{}=fma({},{},{});", inst, a, b, c); | ||
| 60 | } | ||
| 61 | |||
| 62 | void EmitFPMax32([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | ||
| 63 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 64 | ctx.AddF32("{}=max({},{});", inst, a, b); | ||
| 65 | } | ||
| 66 | |||
| 67 | void EmitFPMax64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 68 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 69 | ctx.AddF64("{}=max({},{});", inst, a, b); | ||
| 70 | } | ||
| 71 | |||
| 72 | void EmitFPMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 73 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 74 | ctx.AddF32("{}=min({},{});", inst, a, b); | ||
| 75 | } | ||
| 76 | |||
| 77 | void EmitFPMin64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 78 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 79 | ctx.AddF64("{}=min({},{});", inst, a, b); | ||
| 80 | } | ||
| 81 | |||
| 82 | void EmitFPMul16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 83 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 84 | throw NotImplementedException("GLSL"); | ||
| 85 | } | ||
| 86 | |||
| 87 | void EmitFPMul32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 88 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 89 | ctx.AddF32("{}={}*{};", inst, a, b); | ||
| 90 | } | ||
| 91 | |||
| 92 | void EmitFPMul64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 93 | [[maybe_unused]] std::string_view a, [[maybe_unused]] std::string_view b) { | ||
| 94 | ctx.AddF64("{}={}*{};", inst, a, b); | ||
| 95 | } | ||
| 96 | |||
| 97 | void EmitFPNeg16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 98 | [[maybe_unused]] std::string_view value) { | ||
| 99 | throw NotImplementedException("GLSL"); | ||
| 100 | } | ||
| 101 | |||
| 102 | void EmitFPNeg32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 103 | [[maybe_unused]] std::string_view value) { | ||
| 104 | ctx.AddF32("{}=-{};", inst, value); | ||
| 105 | } | ||
| 106 | |||
| 107 | void EmitFPNeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 108 | [[maybe_unused]] std::string_view value) { | ||
| 109 | ctx.AddF64("{}=-{};", inst, value); | ||
| 110 | } | ||
| 111 | |||
| 112 | void EmitFPSin([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 113 | [[maybe_unused]] std::string_view value) { | ||
| 114 | ctx.AddF32("{}=sin({});", inst, value); | ||
| 115 | } | ||
| 116 | |||
| 117 | void EmitFPCos([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 118 | [[maybe_unused]] std::string_view value) { | ||
| 119 | ctx.AddF32("{}=cos({});", inst, value); | ||
| 120 | } | ||
| 121 | |||
| 122 | void EmitFPExp2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 123 | [[maybe_unused]] std::string_view value) { | ||
| 124 | ctx.AddF32("{}=exp2({});", inst, value); | ||
| 125 | } | ||
| 126 | |||
| 127 | void EmitFPLog2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 128 | [[maybe_unused]] std::string_view value) { | ||
| 129 | ctx.AddF32("{}=log2({});", inst, value); | ||
| 130 | } | ||
| 131 | |||
| 132 | void EmitFPRecip32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 133 | [[maybe_unused]] std::string_view value) { | ||
| 134 | ctx.AddF32("{}=1/{};", inst, value); | ||
| 135 | } | ||
| 136 | |||
| 137 | void EmitFPRecip64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 138 | [[maybe_unused]] std::string_view value) { | ||
| 139 | ctx.AddF64("{}=1/{};", inst, value); | ||
| 140 | } | ||
| 141 | |||
| 142 | void EmitFPRecipSqrt32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 143 | [[maybe_unused]] std::string_view value) { | ||
| 144 | throw NotImplementedException("GLSL"); | ||
| 145 | } | ||
| 146 | |||
| 147 | void EmitFPRecipSqrt64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 148 | [[maybe_unused]] std::string_view value) { | ||
| 149 | throw NotImplementedException("GLSL"); | ||
| 150 | } | ||
| 151 | |||
| 152 | void EmitFPSqrt([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 153 | [[maybe_unused]] std::string_view value) { | ||
| 154 | ctx.AddF32("{}=sqrt({});", inst, value); | ||
| 155 | } | ||
| 156 | |||
| 157 | void EmitFPSaturate16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 158 | [[maybe_unused]] std::string_view value) { | ||
| 159 | ctx.AddF64("{}=sqrt({});", inst, value); | ||
| 160 | } | ||
| 161 | |||
| 162 | void EmitFPSaturate32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 163 | [[maybe_unused]] std::string_view value) { | ||
| 164 | ctx.AddF32("{}=clamp({},0.0f,1.0f);", inst, value); | ||
| 165 | } | ||
| 166 | |||
| 167 | void EmitFPSaturate64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 168 | [[maybe_unused]] std::string_view value) { | ||
| 169 | ctx.AddF64("{}=clamp({},0.0,1.0);", inst, value); | ||
| 170 | } | ||
| 171 | |||
| 172 | void EmitFPClamp16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 173 | [[maybe_unused]] std::string_view value, | ||
| 174 | [[maybe_unused]] std::string_view min_value, | ||
| 175 | [[maybe_unused]] std::string_view max_value) { | ||
| 176 | throw NotImplementedException("GLSL"); | ||
| 177 | } | ||
| 178 | |||
| 179 | void EmitFPClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 180 | [[maybe_unused]] std::string_view value, | ||
| 181 | [[maybe_unused]] std::string_view min_value, | ||
| 182 | [[maybe_unused]] std::string_view max_value) { | ||
| 183 | ctx.AddF32("{}=clamp({},{},{});", inst, value, min_value, max_value); | ||
| 184 | } | ||
| 185 | |||
| 186 | void EmitFPClamp64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 187 | [[maybe_unused]] std::string_view value, | ||
| 188 | [[maybe_unused]] std::string_view min_value, | ||
| 189 | [[maybe_unused]] std::string_view max_value) { | ||
| 190 | ctx.AddF64("{}=clamp({},{},{});", inst, value, min_value, max_value); | ||
| 191 | } | ||
| 192 | |||
| 193 | void EmitFPRoundEven16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 194 | [[maybe_unused]] std::string_view value) { | ||
| 195 | throw NotImplementedException("GLSL"); | ||
| 196 | } | ||
| 197 | |||
| 198 | void EmitFPRoundEven32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 199 | [[maybe_unused]] std::string_view value) { | ||
| 200 | ctx.AddF32("{}=round({});", inst, value); | ||
| 201 | } | ||
| 202 | |||
| 203 | void EmitFPRoundEven64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 204 | [[maybe_unused]] std::string_view value) { | ||
| 205 | ctx.AddF64("{}=round({});", inst, value); | ||
| 206 | } | ||
| 207 | |||
| 208 | void EmitFPFloor16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 209 | [[maybe_unused]] std::string_view value) { | ||
| 210 | throw NotImplementedException("GLSL"); | ||
| 211 | } | ||
| 212 | |||
| 213 | void EmitFPFloor32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 214 | [[maybe_unused]] std::string_view value) { | ||
| 215 | ctx.AddF32("{}=floor({});", inst, value); | ||
| 216 | } | ||
| 217 | |||
| 218 | void EmitFPFloor64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 219 | [[maybe_unused]] std::string_view value) { | ||
| 220 | ctx.AddF64("{}=floor({});", inst, value); | ||
| 221 | } | ||
| 222 | |||
| 223 | void EmitFPCeil16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 224 | [[maybe_unused]] std::string_view value) { | ||
| 225 | throw NotImplementedException("GLSL"); | ||
| 226 | } | ||
| 227 | |||
| 228 | void EmitFPCeil32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 229 | [[maybe_unused]] std::string_view value) { | ||
| 230 | ctx.AddF32("{}=ceil({});", inst, value); | ||
| 231 | } | ||
| 232 | |||
| 233 | void EmitFPCeil64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 234 | [[maybe_unused]] std::string_view value) { | ||
| 235 | ctx.AddF64("{}=ceil({});", inst, value); | ||
| 236 | } | ||
| 237 | |||
| 238 | void EmitFPTrunc16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 239 | [[maybe_unused]] std::string_view value) { | ||
| 240 | throw NotImplementedException("GLSL"); | ||
| 241 | } | ||
| 242 | |||
| 243 | void EmitFPTrunc32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 244 | [[maybe_unused]] std::string_view value) { | ||
| 245 | ctx.AddF32("{}=trunc({});", inst, value); | ||
| 246 | } | ||
| 247 | |||
| 248 | void EmitFPTrunc64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 249 | [[maybe_unused]] std::string_view value) { | ||
| 250 | ctx.AddF64("{}=trunc({});", inst, value); | ||
| 251 | } | ||
| 252 | |||
| 253 | void EmitFPOrdEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 254 | [[maybe_unused]] std::string_view lhs, | ||
| 255 | [[maybe_unused]] std::string_view rhs) { | ||
| 256 | throw NotImplementedException("GLSL"); | ||
| 257 | } | ||
| 258 | |||
| 259 | void EmitFPOrdEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 260 | [[maybe_unused]] std::string_view lhs, | ||
| 261 | [[maybe_unused]] std::string_view rhs) { | ||
| 262 | throw NotImplementedException("GLSL"); | ||
| 263 | } | ||
| 264 | |||
| 265 | void EmitFPOrdEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 266 | [[maybe_unused]] std::string_view lhs, | ||
| 267 | [[maybe_unused]] std::string_view rhs) { | ||
| 268 | throw NotImplementedException("GLSL"); | ||
| 269 | } | ||
| 270 | |||
| 271 | void EmitFPUnordEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 272 | [[maybe_unused]] std::string_view lhs, | ||
| 273 | [[maybe_unused]] std::string_view rhs) { | ||
| 274 | throw NotImplementedException("GLSL"); | ||
| 275 | } | ||
| 276 | |||
| 277 | void EmitFPUnordEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 278 | [[maybe_unused]] std::string_view lhs, | ||
| 279 | [[maybe_unused]] std::string_view rhs) { | ||
| 280 | throw NotImplementedException("GLSL"); | ||
| 281 | } | ||
| 282 | |||
| 283 | void EmitFPUnordEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 284 | [[maybe_unused]] std::string_view lhs, | ||
| 285 | [[maybe_unused]] std::string_view rhs) { | ||
| 286 | throw NotImplementedException("GLSL"); | ||
| 287 | } | ||
| 288 | |||
| 289 | void EmitFPOrdNotEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 290 | [[maybe_unused]] std::string_view lhs, | ||
| 291 | [[maybe_unused]] std::string_view rhs) { | ||
| 292 | throw NotImplementedException("GLSL"); | ||
| 293 | } | ||
| 294 | |||
| 295 | void EmitFPOrdNotEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 296 | [[maybe_unused]] std::string_view lhs, | ||
| 297 | [[maybe_unused]] std::string_view rhs) { | ||
| 298 | throw NotImplementedException("GLSL"); | ||
| 299 | } | ||
| 300 | |||
| 301 | void EmitFPOrdNotEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 302 | [[maybe_unused]] std::string_view lhs, | ||
| 303 | [[maybe_unused]] std::string_view rhs) { | ||
| 304 | throw NotImplementedException("GLSL"); | ||
| 305 | } | ||
| 306 | |||
| 307 | void EmitFPUnordNotEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 308 | [[maybe_unused]] std::string_view lhs, | ||
| 309 | [[maybe_unused]] std::string_view rhs) { | ||
| 310 | throw NotImplementedException("GLSL"); | ||
| 311 | } | ||
| 312 | |||
| 313 | void EmitFPUnordNotEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 314 | [[maybe_unused]] std::string_view lhs, | ||
| 315 | [[maybe_unused]] std::string_view rhs) { | ||
| 316 | throw NotImplementedException("GLSL"); | ||
| 317 | } | ||
| 318 | |||
| 319 | void EmitFPUnordNotEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 320 | [[maybe_unused]] std::string_view lhs, | ||
| 321 | [[maybe_unused]] std::string_view rhs) { | ||
| 322 | throw NotImplementedException("GLSL"); | ||
| 323 | } | ||
| 324 | |||
| 325 | void EmitFPOrdLessThan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 326 | [[maybe_unused]] std::string_view lhs, | ||
| 327 | [[maybe_unused]] std::string_view rhs) { | ||
| 328 | throw NotImplementedException("GLSL"); | ||
| 329 | } | ||
| 330 | |||
| 331 | void EmitFPOrdLessThan32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 332 | [[maybe_unused]] std::string_view lhs, | ||
| 333 | [[maybe_unused]] std::string_view rhs) { | ||
| 334 | throw NotImplementedException("GLSL"); | ||
| 335 | } | ||
| 336 | |||
| 337 | void EmitFPOrdLessThan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 338 | [[maybe_unused]] std::string_view lhs, | ||
| 339 | [[maybe_unused]] std::string_view rhs) { | ||
| 340 | throw NotImplementedException("GLSL"); | ||
| 341 | } | ||
| 342 | |||
| 343 | void EmitFPUnordLessThan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 344 | [[maybe_unused]] std::string_view lhs, | ||
| 345 | [[maybe_unused]] std::string_view rhs) { | ||
| 346 | throw NotImplementedException("GLSL"); | ||
| 347 | } | ||
| 348 | |||
| 349 | void EmitFPUnordLessThan32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 350 | [[maybe_unused]] std::string_view lhs, | ||
| 351 | [[maybe_unused]] std::string_view rhs) { | ||
| 352 | throw NotImplementedException("GLSL"); | ||
| 353 | } | ||
| 354 | |||
| 355 | void EmitFPUnordLessThan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 356 | [[maybe_unused]] std::string_view lhs, | ||
| 357 | [[maybe_unused]] std::string_view rhs) { | ||
| 358 | throw NotImplementedException("GLSL"); | ||
| 359 | } | ||
| 360 | |||
| 361 | void EmitFPOrdGreaterThan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 362 | [[maybe_unused]] std::string_view lhs, | ||
| 363 | [[maybe_unused]] std::string_view rhs) { | ||
| 364 | throw NotImplementedException("GLSL"); | ||
| 365 | } | ||
| 366 | |||
| 367 | void EmitFPOrdGreaterThan32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 368 | [[maybe_unused]] std::string_view lhs, | ||
| 369 | [[maybe_unused]] std::string_view rhs) { | ||
| 370 | throw NotImplementedException("GLSL"); | ||
| 371 | } | ||
| 372 | |||
| 373 | void EmitFPOrdGreaterThan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 374 | [[maybe_unused]] std::string_view lhs, | ||
| 375 | [[maybe_unused]] std::string_view rhs) { | ||
| 376 | throw NotImplementedException("GLSL"); | ||
| 377 | } | ||
| 378 | |||
| 379 | void EmitFPUnordGreaterThan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 380 | [[maybe_unused]] std::string_view lhs, | ||
| 381 | [[maybe_unused]] std::string_view rhs) { | ||
| 382 | throw NotImplementedException("GLSL"); | ||
| 383 | } | ||
| 384 | |||
| 385 | void EmitFPUnordGreaterThan32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 386 | [[maybe_unused]] std::string_view lhs, | ||
| 387 | [[maybe_unused]] std::string_view rhs) { | ||
| 388 | throw NotImplementedException("GLSL"); | ||
| 389 | } | ||
| 390 | |||
| 391 | void EmitFPUnordGreaterThan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 392 | [[maybe_unused]] std::string_view lhs, | ||
| 393 | [[maybe_unused]] std::string_view rhs) { | ||
| 394 | throw NotImplementedException("GLSL"); | ||
| 395 | } | ||
| 396 | |||
| 397 | void EmitFPOrdLessThanEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 398 | [[maybe_unused]] std::string_view lhs, | ||
| 399 | [[maybe_unused]] std::string_view rhs) { | ||
| 400 | throw NotImplementedException("GLSL"); | ||
| 401 | } | ||
| 402 | |||
| 403 | void EmitFPOrdLessThanEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 404 | [[maybe_unused]] std::string_view lhs, | ||
| 405 | [[maybe_unused]] std::string_view rhs) { | ||
| 406 | throw NotImplementedException("GLSL"); | ||
| 407 | } | ||
| 408 | |||
| 409 | void EmitFPOrdLessThanEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 410 | [[maybe_unused]] std::string_view lhs, | ||
| 411 | [[maybe_unused]] std::string_view rhs) { | ||
| 412 | throw NotImplementedException("GLSL"); | ||
| 413 | } | ||
| 414 | |||
| 415 | void EmitFPUnordLessThanEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 416 | [[maybe_unused]] std::string_view lhs, | ||
| 417 | [[maybe_unused]] std::string_view rhs) { | ||
| 418 | throw NotImplementedException("GLSL"); | ||
| 419 | } | ||
| 420 | |||
| 421 | void EmitFPUnordLessThanEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 422 | [[maybe_unused]] std::string_view lhs, | ||
| 423 | [[maybe_unused]] std::string_view rhs) { | ||
| 424 | throw NotImplementedException("GLSL"); | ||
| 425 | } | ||
| 426 | |||
| 427 | void EmitFPUnordLessThanEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 428 | [[maybe_unused]] std::string_view lhs, | ||
| 429 | [[maybe_unused]] std::string_view rhs) { | ||
| 430 | throw NotImplementedException("GLSL"); | ||
| 431 | } | ||
| 432 | |||
| 433 | void EmitFPOrdGreaterThanEqual16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 434 | [[maybe_unused]] std::string_view lhs, | ||
| 435 | [[maybe_unused]] std::string_view rhs) { | ||
| 436 | throw NotImplementedException("GLSL"); | ||
| 437 | } | ||
| 438 | |||
| 439 | void EmitFPOrdGreaterThanEqual32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 440 | [[maybe_unused]] std::string_view lhs, | ||
| 441 | [[maybe_unused]] std::string_view rhs) { | ||
| 442 | throw NotImplementedException("GLSL"); | ||
| 443 | } | ||
| 444 | |||
| 445 | void EmitFPOrdGreaterThanEqual64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 446 | [[maybe_unused]] std::string_view lhs, | ||
| 447 | [[maybe_unused]] std::string_view rhs) { | ||
| 448 | throw NotImplementedException("GLSL"); | ||
| 449 | } | ||
| 450 | |||
| 451 | void EmitFPUnordGreaterThanEqual16([[maybe_unused]] EmitContext& ctx, | ||
| 452 | [[maybe_unused]] IR::Inst& inst, | ||
| 453 | [[maybe_unused]] std::string_view lhs, | ||
| 454 | [[maybe_unused]] std::string_view rhs) { | ||
| 455 | throw NotImplementedException("GLSL"); | ||
| 456 | } | ||
| 457 | |||
| 458 | void EmitFPUnordGreaterThanEqual32([[maybe_unused]] EmitContext& ctx, | ||
| 459 | [[maybe_unused]] IR::Inst& inst, | ||
| 460 | [[maybe_unused]] std::string_view lhs, | ||
| 461 | [[maybe_unused]] std::string_view rhs) { | ||
| 462 | throw NotImplementedException("GLSL"); | ||
| 463 | } | ||
| 464 | |||
| 465 | void EmitFPUnordGreaterThanEqual64([[maybe_unused]] EmitContext& ctx, | ||
| 466 | [[maybe_unused]] IR::Inst& inst, | ||
| 467 | [[maybe_unused]] std::string_view lhs, | ||
| 468 | [[maybe_unused]] std::string_view rhs) { | ||
| 469 | throw NotImplementedException("GLSL"); | ||
| 470 | } | ||
| 471 | |||
| 472 | void EmitFPIsNan16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 473 | [[maybe_unused]] std::string_view value) { | ||
| 474 | ctx.AddU1("{}=isnan({});", inst, value); | ||
| 475 | } | ||
| 476 | |||
| 477 | void EmitFPIsNan32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 478 | [[maybe_unused]] std::string_view value) { | ||
| 479 | ctx.AddU1("{}=isnan({});", inst, value); | ||
| 480 | } | ||
| 481 | |||
| 482 | void EmitFPIsNan64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | ||
| 483 | [[maybe_unused]] std::string_view value) { | ||
| 484 | ctx.AddU1("{}=isnan({});", inst, value); | ||
| 485 | } | ||
| 486 | |||
| 487 | } // namespace Shader::Backend::GLSL | ||
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h index 39c0ba859..49993dc5c 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h +++ b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h | |||
| @@ -61,7 +61,8 @@ void EmitGetCbufU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& | |||
| 61 | void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 61 | void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); |
| 62 | void EmitGetCbufU32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 62 | void EmitGetCbufU32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 63 | const IR::Value& offset); | 63 | const IR::Value& offset); |
| 64 | void EmitGetCbufF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 64 | void EmitGetCbufF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 65 | const IR::Value& offset); | ||
| 65 | void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); | 66 | void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset); |
| 66 | void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex); | 67 | void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex); |
| 67 | void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value, | 68 | void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value, |
| @@ -172,12 +173,14 @@ void EmitCompositeInsertF16x3(EmitContext& ctx, std::string_view composite, std: | |||
| 172 | u32 index); | 173 | u32 index); |
| 173 | void EmitCompositeInsertF16x4(EmitContext& ctx, std::string_view composite, std::string_view object, | 174 | void EmitCompositeInsertF16x4(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 174 | u32 index); | 175 | u32 index); |
| 175 | void EmitCompositeConstructF32x2(EmitContext& ctx, std::string_view e1, std::string_view e2); | 176 | void EmitCompositeConstructF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 177 | std::string_view e2); | ||
| 176 | void EmitCompositeConstructF32x3(EmitContext& ctx, std::string_view e1, std::string_view e2, | 178 | void EmitCompositeConstructF32x3(EmitContext& ctx, std::string_view e1, std::string_view e2, |
| 177 | std::string_view e3); | 179 | std::string_view e3); |
| 178 | void EmitCompositeConstructF32x4(EmitContext& ctx, std::string_view e1, std::string_view e2, | 180 | void EmitCompositeConstructF32x4(EmitContext& ctx, std::string_view e1, std::string_view e2, |
| 179 | std::string_view e3, std::string_view e4); | 181 | std::string_view e3, std::string_view e4); |
| 180 | void EmitCompositeExtractF32x2(EmitContext& ctx, std::string_view composite, u32 index); | 182 | void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 183 | u32 index); | ||
| 181 | void EmitCompositeExtractF32x3(EmitContext& ctx, std::string_view composite, u32 index); | 184 | void EmitCompositeExtractF32x3(EmitContext& ctx, std::string_view composite, u32 index); |
| 182 | void EmitCompositeExtractF32x4(EmitContext& ctx, std::string_view composite, u32 index); | 185 | void EmitCompositeExtractF32x4(EmitContext& ctx, std::string_view composite, u32 index); |
| 183 | void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object, | 186 | void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object, |
| @@ -206,37 +209,37 @@ void EmitSelectU16(EmitContext& ctx, std::string_view cond, std::string_view tru | |||
| 206 | std::string_view false_value); | 209 | std::string_view false_value); |
| 207 | void EmitSelectU32(EmitContext& ctx, IR::Inst& inst, std::string_view cond, | 210 | void EmitSelectU32(EmitContext& ctx, IR::Inst& inst, std::string_view cond, |
| 208 | std::string_view true_value, std::string_view false_value); | 211 | std::string_view true_value, std::string_view false_value); |
| 209 | void EmitSelectU64(EmitContext& ctx, std::string_view cond, std::string_view true_value, | 212 | void EmitSelectU64(EmitContext& ctx, IR::Inst& inst, std::string_view cond, |
| 210 | std::string_view false_value); | 213 | std::string_view true_value, std::string_view false_value); |
| 211 | void EmitSelectF16(EmitContext& ctx, std::string_view cond, std::string_view true_value, | 214 | void EmitSelectF16(EmitContext& ctx, std::string_view cond, std::string_view true_value, |
| 212 | std::string_view false_value); | 215 | std::string_view false_value); |
| 213 | void EmitSelectF32(EmitContext& ctx, IR::Inst& inst, std::string_view cond, | 216 | void EmitSelectF32(EmitContext& ctx, IR::Inst& inst, std::string_view cond, |
| 214 | std::string_view true_value, std::string_view false_value); | 217 | std::string_view true_value, std::string_view false_value); |
| 215 | void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value, | 218 | void EmitSelectF64(EmitContext& ctx, IR::Inst& inst, std::string_view cond, |
| 216 | std::string_view false_value); | 219 | std::string_view true_value, std::string_view false_value); |
| 217 | void EmitBitCastU16F16(EmitContext& ctx); | 220 | void EmitBitCastU16F16(EmitContext& ctx, IR::Inst& inst); |
| 218 | void EmitBitCastU32F32(EmitContext& ctx, std::string_view value); | 221 | void EmitBitCastU32F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 219 | void EmitBitCastU64F64(EmitContext& ctx); | 222 | void EmitBitCastU64F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 220 | void EmitBitCastF16U16(EmitContext& ctx); | 223 | void EmitBitCastF16U16(EmitContext& ctx, IR::Inst& inst); |
| 221 | void EmitBitCastF32U32(EmitContext& ctx, std::string_view value); | 224 | void EmitBitCastF32U32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 222 | void EmitBitCastF64U64(EmitContext& ctx); | 225 | void EmitBitCastF64U64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 223 | void EmitPackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value); | 226 | void EmitPackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 224 | void EmitUnpackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value); | 227 | void EmitUnpackUint2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 225 | void EmitPackFloat2x16(EmitContext& ctx, std::string_view value); | 228 | void EmitPackFloat2x16(EmitContext& ctx, std::string_view value); |
| 226 | void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value); | 229 | void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value); |
| 227 | void EmitPackHalf2x16(EmitContext& ctx, std::string_view value); | 230 | void EmitPackHalf2x16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 228 | void EmitUnpackHalf2x16(EmitContext& ctx, std::string_view value); | 231 | void EmitUnpackHalf2x16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 229 | void EmitPackDouble2x32(EmitContext& ctx, std::string_view value); | 232 | void EmitPackDouble2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 230 | void EmitUnpackDouble2x32(EmitContext& ctx, std::string_view value); | 233 | void EmitUnpackDouble2x32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 231 | void EmitGetZeroFromOp(EmitContext& ctx); | 234 | void EmitGetZeroFromOp(EmitContext& ctx); |
| 232 | void EmitGetSignFromOp(EmitContext& ctx); | 235 | void EmitGetSignFromOp(EmitContext& ctx); |
| 233 | void EmitGetCarryFromOp(EmitContext& ctx); | 236 | void EmitGetCarryFromOp(EmitContext& ctx); |
| 234 | void EmitGetOverflowFromOp(EmitContext& ctx); | 237 | void EmitGetOverflowFromOp(EmitContext& ctx); |
| 235 | void EmitGetSparseFromOp(EmitContext& ctx); | 238 | void EmitGetSparseFromOp(EmitContext& ctx); |
| 236 | void EmitGetInBoundsFromOp(EmitContext& ctx); | 239 | void EmitGetInBoundsFromOp(EmitContext& ctx); |
| 237 | void EmitFPAbs16(EmitContext& ctx, std::string_view value); | 240 | void EmitFPAbs16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 238 | void EmitFPAbs32(EmitContext& ctx, std::string_view value); | 241 | void EmitFPAbs32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 239 | void EmitFPAbs64(EmitContext& ctx, std::string_view value); | 242 | void EmitFPAbs64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 240 | void EmitFPAdd16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 243 | void EmitFPAdd16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 241 | void EmitFPAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 244 | void EmitFPAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 242 | void EmitFPAdd64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 245 | void EmitFPAdd64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| @@ -246,85 +249,118 @@ void EmitFPFma32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::stri | |||
| 246 | std::string_view c); | 249 | std::string_view c); |
| 247 | void EmitFPFma64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, | 250 | void EmitFPFma64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, |
| 248 | std::string_view c); | 251 | std::string_view c); |
| 249 | void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b); | 252 | void EmitFPMax32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 250 | void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b); | 253 | void EmitFPMax64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 251 | void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b); | 254 | void EmitFPMin32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 252 | void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b); | 255 | void EmitFPMin64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 253 | void EmitFPMul16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 256 | void EmitFPMul16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 254 | void EmitFPMul32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 257 | void EmitFPMul32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 255 | void EmitFPMul64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 258 | void EmitFPMul64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 256 | void EmitFPNeg16(EmitContext& ctx, std::string_view value); | 259 | void EmitFPNeg16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 257 | void EmitFPNeg32(EmitContext& ctx, std::string_view value); | 260 | void EmitFPNeg32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 258 | void EmitFPNeg64(EmitContext& ctx, std::string_view value); | 261 | void EmitFPNeg64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 259 | void EmitFPSin(EmitContext& ctx, std::string_view value); | 262 | void EmitFPSin(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 260 | void EmitFPCos(EmitContext& ctx, std::string_view value); | 263 | void EmitFPCos(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 261 | void EmitFPExp2(EmitContext& ctx, std::string_view value); | 264 | void EmitFPExp2(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 262 | void EmitFPLog2(EmitContext& ctx, std::string_view value); | 265 | void EmitFPLog2(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 263 | void EmitFPRecip32(EmitContext& ctx, std::string_view value); | 266 | void EmitFPRecip32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 264 | void EmitFPRecip64(EmitContext& ctx, std::string_view value); | 267 | void EmitFPRecip64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 265 | void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value); | 268 | void EmitFPRecipSqrt32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 266 | void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value); | 269 | void EmitFPRecipSqrt64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 267 | void EmitFPSqrt(EmitContext& ctx, std::string_view value); | 270 | void EmitFPSqrt(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 268 | void EmitFPSaturate16(EmitContext& ctx, std::string_view value); | 271 | void EmitFPSaturate16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 269 | void EmitFPSaturate32(EmitContext& ctx, std::string_view value); | 272 | void EmitFPSaturate32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 270 | void EmitFPSaturate64(EmitContext& ctx, std::string_view value); | 273 | void EmitFPSaturate64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 271 | void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value, | 274 | void EmitFPClamp16(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 272 | std::string_view max_value); | 275 | std::string_view min_value, std::string_view max_value); |
| 273 | void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value, | 276 | void EmitFPClamp32(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 274 | std::string_view max_value); | 277 | std::string_view min_value, std::string_view max_value); |
| 275 | void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value, | 278 | void EmitFPClamp64(EmitContext& ctx, IR::Inst& inst, std::string_view value, |
| 276 | std::string_view max_value); | 279 | std::string_view min_value, std::string_view max_value); |
| 277 | void EmitFPRoundEven16(EmitContext& ctx, std::string_view value); | 280 | void EmitFPRoundEven16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 278 | void EmitFPRoundEven32(EmitContext& ctx, std::string_view value); | 281 | void EmitFPRoundEven32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 279 | void EmitFPRoundEven64(EmitContext& ctx, std::string_view value); | 282 | void EmitFPRoundEven64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 280 | void EmitFPFloor16(EmitContext& ctx, std::string_view value); | 283 | void EmitFPFloor16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 281 | void EmitFPFloor32(EmitContext& ctx, std::string_view value); | 284 | void EmitFPFloor32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 282 | void EmitFPFloor64(EmitContext& ctx, std::string_view value); | 285 | void EmitFPFloor64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 283 | void EmitFPCeil16(EmitContext& ctx, std::string_view value); | 286 | void EmitFPCeil16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 284 | void EmitFPCeil32(EmitContext& ctx, std::string_view value); | 287 | void EmitFPCeil32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 285 | void EmitFPCeil64(EmitContext& ctx, std::string_view value); | 288 | void EmitFPCeil64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 286 | void EmitFPTrunc16(EmitContext& ctx, std::string_view value); | 289 | void EmitFPTrunc16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 287 | void EmitFPTrunc32(EmitContext& ctx, std::string_view value); | 290 | void EmitFPTrunc32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 288 | void EmitFPTrunc64(EmitContext& ctx, std::string_view value); | 291 | void EmitFPTrunc64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 289 | void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 292 | void EmitFPOrdEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, std::string_view rhs); |
| 290 | void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 293 | void EmitFPOrdEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, std::string_view rhs); |
| 291 | void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 294 | void EmitFPOrdEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, std::string_view rhs); |
| 292 | void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 295 | void EmitFPUnordEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 293 | void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 296 | std::string_view rhs); |
| 294 | void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 297 | void EmitFPUnordEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 295 | void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 298 | std::string_view rhs); |
| 296 | void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 299 | void EmitFPUnordEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 297 | void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 300 | std::string_view rhs); |
| 298 | void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 301 | void EmitFPOrdNotEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 299 | void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 302 | std::string_view rhs); |
| 300 | void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 303 | void EmitFPOrdNotEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 301 | void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 304 | std::string_view rhs); |
| 302 | void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 305 | void EmitFPOrdNotEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 303 | void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 306 | std::string_view rhs); |
| 304 | void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 307 | void EmitFPUnordNotEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 305 | void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 308 | std::string_view rhs); |
| 306 | void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 309 | void EmitFPUnordNotEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 307 | void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 310 | std::string_view rhs); |
| 308 | void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 311 | void EmitFPUnordNotEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 309 | void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 312 | std::string_view rhs); |
| 310 | void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 313 | void EmitFPOrdLessThan16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 311 | void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 314 | std::string_view rhs); |
| 312 | void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 315 | void EmitFPOrdLessThan32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 313 | void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 316 | std::string_view rhs); |
| 314 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 317 | void EmitFPOrdLessThan64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 315 | void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 318 | std::string_view rhs); |
| 316 | void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 319 | void EmitFPUnordLessThan16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 317 | void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 320 | std::string_view rhs); |
| 318 | void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 321 | void EmitFPUnordLessThan32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 319 | void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 322 | std::string_view rhs); |
| 320 | void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 323 | void EmitFPUnordLessThan64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 321 | void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 324 | std::string_view rhs); |
| 322 | void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 325 | void EmitFPOrdGreaterThan16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 323 | void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 326 | std::string_view rhs); |
| 324 | void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs); | 327 | void EmitFPOrdGreaterThan32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 325 | void EmitFPIsNan16(EmitContext& ctx, std::string_view value); | 328 | std::string_view rhs); |
| 326 | void EmitFPIsNan32(EmitContext& ctx, std::string_view value); | 329 | void EmitFPOrdGreaterThan64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, |
| 327 | void EmitFPIsNan64(EmitContext& ctx, std::string_view value); | 330 | std::string_view rhs); |
| 331 | void EmitFPUnordGreaterThan16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 332 | std::string_view rhs); | ||
| 333 | void EmitFPUnordGreaterThan32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 334 | std::string_view rhs); | ||
| 335 | void EmitFPUnordGreaterThan64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 336 | std::string_view rhs); | ||
| 337 | void EmitFPOrdLessThanEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 338 | std::string_view rhs); | ||
| 339 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 340 | std::string_view rhs); | ||
| 341 | void EmitFPOrdLessThanEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 342 | std::string_view rhs); | ||
| 343 | void EmitFPUnordLessThanEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 344 | std::string_view rhs); | ||
| 345 | void EmitFPUnordLessThanEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 346 | std::string_view rhs); | ||
| 347 | void EmitFPUnordLessThanEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 348 | std::string_view rhs); | ||
| 349 | void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 350 | std::string_view rhs); | ||
| 351 | void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 352 | std::string_view rhs); | ||
| 353 | void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 354 | std::string_view rhs); | ||
| 355 | void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 356 | std::string_view rhs); | ||
| 357 | void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 358 | std::string_view rhs); | ||
| 359 | void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, IR::Inst& inst, std::string_view lhs, | ||
| 360 | std::string_view rhs); | ||
| 361 | void EmitFPIsNan16(EmitContext& ctx, IR::Inst& inst, std::string_view value); | ||
| 362 | void EmitFPIsNan32(EmitContext& ctx, IR::Inst& inst, std::string_view value); | ||
| 363 | void EmitFPIsNan64(EmitContext& ctx, IR::Inst& inst, std::string_view value); | ||
| 328 | void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 364 | void EmitIAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 329 | void EmitIAdd64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 365 | void EmitIAdd64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| 330 | void EmitISub32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); | 366 | void EmitISub32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b); |
| @@ -493,54 +529,54 @@ void EmitLogicalOr(EmitContext& ctx, std::string_view a, std::string_view b); | |||
| 493 | void EmitLogicalAnd(EmitContext& ctx, std::string_view a, std::string_view b); | 529 | void EmitLogicalAnd(EmitContext& ctx, std::string_view a, std::string_view b); |
| 494 | void EmitLogicalXor(EmitContext& ctx, std::string_view a, std::string_view b); | 530 | void EmitLogicalXor(EmitContext& ctx, std::string_view a, std::string_view b); |
| 495 | void EmitLogicalNot(EmitContext& ctx, std::string_view value); | 531 | void EmitLogicalNot(EmitContext& ctx, std::string_view value); |
| 496 | void EmitConvertS16F16(EmitContext& ctx, std::string_view value); | 532 | void EmitConvertS16F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 497 | void EmitConvertS16F32(EmitContext& ctx, std::string_view value); | 533 | void EmitConvertS16F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 498 | void EmitConvertS16F64(EmitContext& ctx, std::string_view value); | 534 | void EmitConvertS16F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 499 | void EmitConvertS32F16(EmitContext& ctx, std::string_view value); | 535 | void EmitConvertS32F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 500 | void EmitConvertS32F32(EmitContext& ctx, std::string_view value); | 536 | void EmitConvertS32F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 501 | void EmitConvertS32F64(EmitContext& ctx, std::string_view value); | 537 | void EmitConvertS32F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 502 | void EmitConvertS64F16(EmitContext& ctx, std::string_view value); | 538 | void EmitConvertS64F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 503 | void EmitConvertS64F32(EmitContext& ctx, std::string_view value); | 539 | void EmitConvertS64F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 504 | void EmitConvertS64F64(EmitContext& ctx, std::string_view value); | 540 | void EmitConvertS64F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 505 | void EmitConvertU16F16(EmitContext& ctx, std::string_view value); | 541 | void EmitConvertU16F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 506 | void EmitConvertU16F32(EmitContext& ctx, std::string_view value); | 542 | void EmitConvertU16F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 507 | void EmitConvertU16F64(EmitContext& ctx, std::string_view value); | 543 | void EmitConvertU16F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 508 | void EmitConvertU32F16(EmitContext& ctx, std::string_view value); | 544 | void EmitConvertU32F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 509 | void EmitConvertU32F32(EmitContext& ctx, std::string_view value); | 545 | void EmitConvertU32F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 510 | void EmitConvertU32F64(EmitContext& ctx, std::string_view value); | 546 | void EmitConvertU32F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 511 | void EmitConvertU64F16(EmitContext& ctx, std::string_view value); | 547 | void EmitConvertU64F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 512 | void EmitConvertU64F32(EmitContext& ctx, std::string_view value); | 548 | void EmitConvertU64F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 513 | void EmitConvertU64F64(EmitContext& ctx, std::string_view value); | 549 | void EmitConvertU64F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 514 | void EmitConvertU64U32(EmitContext& ctx, std::string_view value); | 550 | void EmitConvertU64U32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 515 | void EmitConvertU32U64(EmitContext& ctx, std::string_view value); | 551 | void EmitConvertU32U64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 516 | void EmitConvertF16F32(EmitContext& ctx, std::string_view value); | 552 | void EmitConvertF16F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 517 | void EmitConvertF32F16(EmitContext& ctx, std::string_view value); | 553 | void EmitConvertF32F16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 518 | void EmitConvertF32F64(EmitContext& ctx, std::string_view value); | 554 | void EmitConvertF32F64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 519 | void EmitConvertF64F32(EmitContext& ctx, std::string_view value); | 555 | void EmitConvertF64F32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 520 | void EmitConvertF16S8(EmitContext& ctx, std::string_view value); | 556 | void EmitConvertF16S8(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 521 | void EmitConvertF16S16(EmitContext& ctx, std::string_view value); | 557 | void EmitConvertF16S16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 522 | void EmitConvertF16S32(EmitContext& ctx, std::string_view value); | 558 | void EmitConvertF16S32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 523 | void EmitConvertF16S64(EmitContext& ctx, std::string_view value); | 559 | void EmitConvertF16S64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 524 | void EmitConvertF16U8(EmitContext& ctx, std::string_view value); | 560 | void EmitConvertF16U8(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 525 | void EmitConvertF16U16(EmitContext& ctx, std::string_view value); | 561 | void EmitConvertF16U16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 526 | void EmitConvertF16U32(EmitContext& ctx, std::string_view value); | 562 | void EmitConvertF16U32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 527 | void EmitConvertF16U64(EmitContext& ctx, std::string_view value); | 563 | void EmitConvertF16U64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 528 | void EmitConvertF32S8(EmitContext& ctx, std::string_view value); | 564 | void EmitConvertF32S8(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 529 | void EmitConvertF32S16(EmitContext& ctx, std::string_view value); | 565 | void EmitConvertF32S16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 530 | void EmitConvertF32S32(EmitContext& ctx, std::string_view value); | 566 | void EmitConvertF32S32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 531 | void EmitConvertF32S64(EmitContext& ctx, std::string_view value); | 567 | void EmitConvertF32S64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 532 | void EmitConvertF32U8(EmitContext& ctx, std::string_view value); | 568 | void EmitConvertF32U8(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 533 | void EmitConvertF32U16(EmitContext& ctx, std::string_view value); | 569 | void EmitConvertF32U16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 534 | void EmitConvertF32U32(EmitContext& ctx, std::string_view value); | 570 | void EmitConvertF32U32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 535 | void EmitConvertF32U64(EmitContext& ctx, std::string_view value); | 571 | void EmitConvertF32U64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 536 | void EmitConvertF64S8(EmitContext& ctx, std::string_view value); | 572 | void EmitConvertF64S8(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 537 | void EmitConvertF64S16(EmitContext& ctx, std::string_view value); | 573 | void EmitConvertF64S16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 538 | void EmitConvertF64S32(EmitContext& ctx, std::string_view value); | 574 | void EmitConvertF64S32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 539 | void EmitConvertF64S64(EmitContext& ctx, std::string_view value); | 575 | void EmitConvertF64S64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 540 | void EmitConvertF64U8(EmitContext& ctx, std::string_view value); | 576 | void EmitConvertF64U8(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 541 | void EmitConvertF64U16(EmitContext& ctx, std::string_view value); | 577 | void EmitConvertF64U16(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 542 | void EmitConvertF64U32(EmitContext& ctx, std::string_view value); | 578 | void EmitConvertF64U32(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 543 | void EmitConvertF64U64(EmitContext& ctx, std::string_view value); | 579 | void EmitConvertF64U64(EmitContext& ctx, IR::Inst& inst, std::string_view value); |
| 544 | void EmitBindlessImageSampleImplicitLod(EmitContext&); | 580 | void EmitBindlessImageSampleImplicitLod(EmitContext&); |
| 545 | void EmitBindlessImageSampleExplicitLod(EmitContext&); | 581 | void EmitBindlessImageSampleExplicitLod(EmitContext&); |
| 546 | void EmitBindlessImageSampleDrefImplicitLod(EmitContext&); | 582 | void EmitBindlessImageSampleDrefImplicitLod(EmitContext&); |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp index 2344fd2a9..7c8c23050 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp | |||
| @@ -76,18 +76,15 @@ void EmitWriteStorageS16([[maybe_unused]] EmitContext& ctx, | |||
| 76 | throw NotImplementedException("GLSL Instrucion"); | 76 | throw NotImplementedException("GLSL Instrucion"); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | void EmitWriteStorage32([[maybe_unused]] EmitContext& ctx, | 79 | void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, |
| 80 | [[maybe_unused]] const IR::Value& binding, | 80 | std::string_view value) { |
| 81 | [[maybe_unused]] const IR::Value& offset, | ||
| 82 | [[maybe_unused]] std::string_view value) { | ||
| 83 | ctx.Add("buff{}[{}]={};", binding.U32(), offset.U32(), value); | 81 | ctx.Add("buff{}[{}]={};", binding.U32(), offset.U32(), value); |
| 84 | } | 82 | } |
| 85 | 83 | ||
| 86 | void EmitWriteStorage64([[maybe_unused]] EmitContext& ctx, | 84 | void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, |
| 87 | [[maybe_unused]] const IR::Value& binding, | 85 | std::string_view value) { |
| 88 | [[maybe_unused]] const IR::Value& offset, | 86 | ctx.Add("buff{}[{}]={}.x;", binding.U32(), offset.U32(), value); |
| 89 | [[maybe_unused]] std::string_view value) { | 87 | ctx.Add("buff{}[{}]={}.y;", binding.U32(), offset.U32() + 1, value); |
| 90 | throw NotImplementedException("GLSL Instrucion"); | ||
| 91 | } | 88 | } |
| 92 | 89 | ||
| 93 | void EmitWriteStorage128([[maybe_unused]] EmitContext& ctx, | 90 | void EmitWriteStorage128([[maybe_unused]] EmitContext& ctx, |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp index de350b154..23f8730ca 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp | |||
| @@ -355,54 +355,6 @@ void EmitWriteSharedU128(EmitContext& ctx, std::string_view offset, std::string_ | |||
| 355 | NotImplemented(); | 355 | NotImplemented(); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | void EmitBitCastU16F16(EmitContext& ctx) { | ||
| 359 | NotImplemented(); | ||
| 360 | } | ||
| 361 | |||
| 362 | void EmitBitCastU32F32(EmitContext& ctx, std::string_view value) { | ||
| 363 | NotImplemented(); | ||
| 364 | } | ||
| 365 | |||
| 366 | void EmitBitCastU64F64(EmitContext& ctx) { | ||
| 367 | NotImplemented(); | ||
| 368 | } | ||
| 369 | |||
| 370 | void EmitBitCastF16U16(EmitContext& ctx) { | ||
| 371 | NotImplemented(); | ||
| 372 | } | ||
| 373 | |||
| 374 | void EmitBitCastF32U32(EmitContext& ctx, std::string_view value) { | ||
| 375 | NotImplemented(); | ||
| 376 | } | ||
| 377 | |||
| 378 | void EmitBitCastF64U64(EmitContext& ctx) { | ||
| 379 | NotImplemented(); | ||
| 380 | } | ||
| 381 | |||
| 382 | void EmitPackFloat2x16(EmitContext& ctx, std::string_view value) { | ||
| 383 | NotImplemented(); | ||
| 384 | } | ||
| 385 | |||
| 386 | void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value) { | ||
| 387 | NotImplemented(); | ||
| 388 | } | ||
| 389 | |||
| 390 | void EmitPackHalf2x16(EmitContext& ctx, std::string_view value) { | ||
| 391 | NotImplemented(); | ||
| 392 | } | ||
| 393 | |||
| 394 | void EmitUnpackHalf2x16(EmitContext& ctx, std::string_view value) { | ||
| 395 | NotImplemented(); | ||
| 396 | } | ||
| 397 | |||
| 398 | void EmitPackDouble2x32(EmitContext& ctx, std::string_view value) { | ||
| 399 | NotImplemented(); | ||
| 400 | } | ||
| 401 | |||
| 402 | void EmitUnpackDouble2x32(EmitContext& ctx, std::string_view value) { | ||
| 403 | NotImplemented(); | ||
| 404 | } | ||
| 405 | |||
| 406 | void EmitGetZeroFromOp(EmitContext& ctx) { | 358 | void EmitGetZeroFromOp(EmitContext& ctx) { |
| 407 | NotImplemented(); | 359 | NotImplemented(); |
| 408 | } | 360 | } |
| @@ -427,352 +379,6 @@ void EmitGetInBoundsFromOp(EmitContext& ctx) { | |||
| 427 | NotImplemented(); | 379 | NotImplemented(); |
| 428 | } | 380 | } |
| 429 | 381 | ||
| 430 | void EmitFPAbs16(EmitContext& ctx, std::string_view value) { | ||
| 431 | NotImplemented(); | ||
| 432 | } | ||
| 433 | |||
| 434 | void EmitFPAbs32(EmitContext& ctx, std::string_view value) { | ||
| 435 | NotImplemented(); | ||
| 436 | } | ||
| 437 | |||
| 438 | void EmitFPAbs64(EmitContext& ctx, std::string_view value) { | ||
| 439 | NotImplemented(); | ||
| 440 | } | ||
| 441 | |||
| 442 | void EmitFPAdd16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 443 | NotImplemented(); | ||
| 444 | } | ||
| 445 | |||
| 446 | void EmitFPAdd32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 447 | NotImplemented(); | ||
| 448 | } | ||
| 449 | |||
| 450 | void EmitFPAdd64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 451 | NotImplemented(); | ||
| 452 | } | ||
| 453 | |||
| 454 | void EmitFPFma16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, | ||
| 455 | std::string_view c) { | ||
| 456 | NotImplemented(); | ||
| 457 | } | ||
| 458 | |||
| 459 | void EmitFPFma32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, | ||
| 460 | std::string_view c) { | ||
| 461 | NotImplemented(); | ||
| 462 | } | ||
| 463 | |||
| 464 | void EmitFPFma64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b, | ||
| 465 | std::string_view c) { | ||
| 466 | NotImplemented(); | ||
| 467 | } | ||
| 468 | |||
| 469 | void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 470 | NotImplemented(); | ||
| 471 | } | ||
| 472 | |||
| 473 | void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 474 | NotImplemented(); | ||
| 475 | } | ||
| 476 | |||
| 477 | void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 478 | NotImplemented(); | ||
| 479 | } | ||
| 480 | |||
| 481 | void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b) { | ||
| 482 | NotImplemented(); | ||
| 483 | } | ||
| 484 | |||
| 485 | void EmitFPMul16(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 486 | NotImplemented(); | ||
| 487 | } | ||
| 488 | |||
| 489 | void EmitFPMul32(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 490 | NotImplemented(); | ||
| 491 | } | ||
| 492 | |||
| 493 | void EmitFPMul64(EmitContext& ctx, IR::Inst& inst, std::string_view a, std::string_view b) { | ||
| 494 | NotImplemented(); | ||
| 495 | } | ||
| 496 | |||
| 497 | void EmitFPNeg16(EmitContext& ctx, std::string_view value) { | ||
| 498 | NotImplemented(); | ||
| 499 | } | ||
| 500 | |||
| 501 | void EmitFPNeg32(EmitContext& ctx, std::string_view value) { | ||
| 502 | NotImplemented(); | ||
| 503 | } | ||
| 504 | |||
| 505 | void EmitFPNeg64(EmitContext& ctx, std::string_view value) { | ||
| 506 | NotImplemented(); | ||
| 507 | } | ||
| 508 | |||
| 509 | void EmitFPSin(EmitContext& ctx, std::string_view value) { | ||
| 510 | NotImplemented(); | ||
| 511 | } | ||
| 512 | |||
| 513 | void EmitFPCos(EmitContext& ctx, std::string_view value) { | ||
| 514 | NotImplemented(); | ||
| 515 | } | ||
| 516 | |||
| 517 | void EmitFPExp2(EmitContext& ctx, std::string_view value) { | ||
| 518 | NotImplemented(); | ||
| 519 | } | ||
| 520 | |||
| 521 | void EmitFPLog2(EmitContext& ctx, std::string_view value) { | ||
| 522 | NotImplemented(); | ||
| 523 | } | ||
| 524 | |||
| 525 | void EmitFPRecip32(EmitContext& ctx, std::string_view value) { | ||
| 526 | NotImplemented(); | ||
| 527 | } | ||
| 528 | |||
| 529 | void EmitFPRecip64(EmitContext& ctx, std::string_view value) { | ||
| 530 | NotImplemented(); | ||
| 531 | } | ||
| 532 | |||
| 533 | void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value) { | ||
| 534 | NotImplemented(); | ||
| 535 | } | ||
| 536 | |||
| 537 | void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value) { | ||
| 538 | NotImplemented(); | ||
| 539 | } | ||
| 540 | |||
| 541 | void EmitFPSqrt(EmitContext& ctx, std::string_view value) { | ||
| 542 | NotImplemented(); | ||
| 543 | } | ||
| 544 | |||
| 545 | void EmitFPSaturate16(EmitContext& ctx, std::string_view value) { | ||
| 546 | NotImplemented(); | ||
| 547 | } | ||
| 548 | |||
| 549 | void EmitFPSaturate32(EmitContext& ctx, std::string_view value) { | ||
| 550 | NotImplemented(); | ||
| 551 | } | ||
| 552 | |||
| 553 | void EmitFPSaturate64(EmitContext& ctx, std::string_view value) { | ||
| 554 | NotImplemented(); | ||
| 555 | } | ||
| 556 | |||
| 557 | void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value, | ||
| 558 | std::string_view max_value) { | ||
| 559 | NotImplemented(); | ||
| 560 | } | ||
| 561 | |||
| 562 | void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value, | ||
| 563 | std::string_view max_value) { | ||
| 564 | NotImplemented(); | ||
| 565 | } | ||
| 566 | |||
| 567 | void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value, | ||
| 568 | std::string_view max_value) { | ||
| 569 | NotImplemented(); | ||
| 570 | } | ||
| 571 | |||
| 572 | void EmitFPRoundEven16(EmitContext& ctx, std::string_view value) { | ||
| 573 | NotImplemented(); | ||
| 574 | } | ||
| 575 | |||
| 576 | void EmitFPRoundEven32(EmitContext& ctx, std::string_view value) { | ||
| 577 | NotImplemented(); | ||
| 578 | } | ||
| 579 | |||
| 580 | void EmitFPRoundEven64(EmitContext& ctx, std::string_view value) { | ||
| 581 | NotImplemented(); | ||
| 582 | } | ||
| 583 | |||
| 584 | void EmitFPFloor16(EmitContext& ctx, std::string_view value) { | ||
| 585 | NotImplemented(); | ||
| 586 | } | ||
| 587 | |||
| 588 | void EmitFPFloor32(EmitContext& ctx, std::string_view value) { | ||
| 589 | NotImplemented(); | ||
| 590 | } | ||
| 591 | |||
| 592 | void EmitFPFloor64(EmitContext& ctx, std::string_view value) { | ||
| 593 | NotImplemented(); | ||
| 594 | } | ||
| 595 | |||
| 596 | void EmitFPCeil16(EmitContext& ctx, std::string_view value) { | ||
| 597 | NotImplemented(); | ||
| 598 | } | ||
| 599 | |||
| 600 | void EmitFPCeil32(EmitContext& ctx, std::string_view value) { | ||
| 601 | NotImplemented(); | ||
| 602 | } | ||
| 603 | |||
| 604 | void EmitFPCeil64(EmitContext& ctx, std::string_view value) { | ||
| 605 | NotImplemented(); | ||
| 606 | } | ||
| 607 | |||
| 608 | void EmitFPTrunc16(EmitContext& ctx, std::string_view value) { | ||
| 609 | NotImplemented(); | ||
| 610 | } | ||
| 611 | |||
| 612 | void EmitFPTrunc32(EmitContext& ctx, std::string_view value) { | ||
| 613 | NotImplemented(); | ||
| 614 | } | ||
| 615 | |||
| 616 | void EmitFPTrunc64(EmitContext& ctx, std::string_view value) { | ||
| 617 | NotImplemented(); | ||
| 618 | } | ||
| 619 | |||
| 620 | void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 621 | NotImplemented(); | ||
| 622 | } | ||
| 623 | |||
| 624 | void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 625 | NotImplemented(); | ||
| 626 | } | ||
| 627 | |||
| 628 | void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 629 | NotImplemented(); | ||
| 630 | } | ||
| 631 | |||
| 632 | void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 633 | NotImplemented(); | ||
| 634 | } | ||
| 635 | |||
| 636 | void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 637 | NotImplemented(); | ||
| 638 | } | ||
| 639 | |||
| 640 | void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 641 | NotImplemented(); | ||
| 642 | } | ||
| 643 | |||
| 644 | void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 645 | NotImplemented(); | ||
| 646 | } | ||
| 647 | |||
| 648 | void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 649 | NotImplemented(); | ||
| 650 | } | ||
| 651 | |||
| 652 | void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 653 | NotImplemented(); | ||
| 654 | } | ||
| 655 | |||
| 656 | void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 657 | NotImplemented(); | ||
| 658 | } | ||
| 659 | |||
| 660 | void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 661 | NotImplemented(); | ||
| 662 | } | ||
| 663 | |||
| 664 | void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 665 | NotImplemented(); | ||
| 666 | } | ||
| 667 | |||
| 668 | void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 669 | NotImplemented(); | ||
| 670 | } | ||
| 671 | |||
| 672 | void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 673 | NotImplemented(); | ||
| 674 | } | ||
| 675 | |||
| 676 | void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 677 | NotImplemented(); | ||
| 678 | } | ||
| 679 | |||
| 680 | void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 681 | NotImplemented(); | ||
| 682 | } | ||
| 683 | |||
| 684 | void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 685 | NotImplemented(); | ||
| 686 | } | ||
| 687 | |||
| 688 | void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 689 | NotImplemented(); | ||
| 690 | } | ||
| 691 | |||
| 692 | void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 693 | NotImplemented(); | ||
| 694 | } | ||
| 695 | |||
| 696 | void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 697 | NotImplemented(); | ||
| 698 | } | ||
| 699 | |||
| 700 | void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 701 | NotImplemented(); | ||
| 702 | } | ||
| 703 | |||
| 704 | void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 705 | NotImplemented(); | ||
| 706 | } | ||
| 707 | |||
| 708 | void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 709 | NotImplemented(); | ||
| 710 | } | ||
| 711 | |||
| 712 | void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 713 | NotImplemented(); | ||
| 714 | } | ||
| 715 | |||
| 716 | void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 717 | NotImplemented(); | ||
| 718 | } | ||
| 719 | |||
| 720 | void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 721 | NotImplemented(); | ||
| 722 | } | ||
| 723 | |||
| 724 | void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 725 | NotImplemented(); | ||
| 726 | } | ||
| 727 | |||
| 728 | void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 729 | NotImplemented(); | ||
| 730 | } | ||
| 731 | |||
| 732 | void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 733 | NotImplemented(); | ||
| 734 | } | ||
| 735 | |||
| 736 | void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 737 | NotImplemented(); | ||
| 738 | } | ||
| 739 | |||
| 740 | void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 741 | NotImplemented(); | ||
| 742 | } | ||
| 743 | |||
| 744 | void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 745 | NotImplemented(); | ||
| 746 | } | ||
| 747 | |||
| 748 | void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 749 | NotImplemented(); | ||
| 750 | } | ||
| 751 | |||
| 752 | void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 753 | NotImplemented(); | ||
| 754 | } | ||
| 755 | |||
| 756 | void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 757 | NotImplemented(); | ||
| 758 | } | ||
| 759 | |||
| 760 | void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) { | ||
| 761 | NotImplemented(); | ||
| 762 | } | ||
| 763 | |||
| 764 | void EmitFPIsNan16(EmitContext& ctx, std::string_view value) { | ||
| 765 | NotImplemented(); | ||
| 766 | } | ||
| 767 | |||
| 768 | void EmitFPIsNan32(EmitContext& ctx, std::string_view value) { | ||
| 769 | NotImplemented(); | ||
| 770 | } | ||
| 771 | |||
| 772 | void EmitFPIsNan64(EmitContext& ctx, std::string_view value) { | ||
| 773 | NotImplemented(); | ||
| 774 | } | ||
| 775 | |||
| 776 | void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset, | 382 | void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset, |
| 777 | std::string_view value) { | 383 | std::string_view value) { |
| 778 | NotImplemented(); | 384 | NotImplemented(); |
| @@ -1100,198 +706,6 @@ void EmitLogicalNot(EmitContext& ctx, std::string_view value) { | |||
| 1100 | NotImplemented(); | 706 | NotImplemented(); |
| 1101 | } | 707 | } |
| 1102 | 708 | ||
| 1103 | void EmitConvertS16F16(EmitContext& ctx, std::string_view value) { | ||
| 1104 | NotImplemented(); | ||
| 1105 | } | ||
| 1106 | |||
| 1107 | void EmitConvertS16F32(EmitContext& ctx, std::string_view value) { | ||
| 1108 | NotImplemented(); | ||
| 1109 | } | ||
| 1110 | |||
| 1111 | void EmitConvertS16F64(EmitContext& ctx, std::string_view value) { | ||
| 1112 | NotImplemented(); | ||
| 1113 | } | ||
| 1114 | |||
| 1115 | void EmitConvertS32F16(EmitContext& ctx, std::string_view value) { | ||
| 1116 | NotImplemented(); | ||
| 1117 | } | ||
| 1118 | |||
| 1119 | void EmitConvertS32F32(EmitContext& ctx, std::string_view value) { | ||
| 1120 | NotImplemented(); | ||
| 1121 | } | ||
| 1122 | |||
| 1123 | void EmitConvertS32F64(EmitContext& ctx, std::string_view value) { | ||
| 1124 | NotImplemented(); | ||
| 1125 | } | ||
| 1126 | |||
| 1127 | void EmitConvertS64F16(EmitContext& ctx, std::string_view value) { | ||
| 1128 | NotImplemented(); | ||
| 1129 | } | ||
| 1130 | |||
| 1131 | void EmitConvertS64F32(EmitContext& ctx, std::string_view value) { | ||
| 1132 | NotImplemented(); | ||
| 1133 | } | ||
| 1134 | |||
| 1135 | void EmitConvertS64F64(EmitContext& ctx, std::string_view value) { | ||
| 1136 | NotImplemented(); | ||
| 1137 | } | ||
| 1138 | |||
| 1139 | void EmitConvertU16F16(EmitContext& ctx, std::string_view value) { | ||
| 1140 | NotImplemented(); | ||
| 1141 | } | ||
| 1142 | |||
| 1143 | void EmitConvertU16F32(EmitContext& ctx, std::string_view value) { | ||
| 1144 | NotImplemented(); | ||
| 1145 | } | ||
| 1146 | |||
| 1147 | void EmitConvertU16F64(EmitContext& ctx, std::string_view value) { | ||
| 1148 | NotImplemented(); | ||
| 1149 | } | ||
| 1150 | |||
| 1151 | void EmitConvertU32F16(EmitContext& ctx, std::string_view value) { | ||
| 1152 | NotImplemented(); | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | void EmitConvertU32F32(EmitContext& ctx, std::string_view value) { | ||
| 1156 | NotImplemented(); | ||
| 1157 | } | ||
| 1158 | |||
| 1159 | void EmitConvertU32F64(EmitContext& ctx, std::string_view value) { | ||
| 1160 | NotImplemented(); | ||
| 1161 | } | ||
| 1162 | |||
| 1163 | void EmitConvertU64F16(EmitContext& ctx, std::string_view value) { | ||
| 1164 | NotImplemented(); | ||
| 1165 | } | ||
| 1166 | |||
| 1167 | void EmitConvertU64F32(EmitContext& ctx, std::string_view value) { | ||
| 1168 | NotImplemented(); | ||
| 1169 | } | ||
| 1170 | |||
| 1171 | void EmitConvertU64F64(EmitContext& ctx, std::string_view value) { | ||
| 1172 | NotImplemented(); | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | void EmitConvertU64U32(EmitContext& ctx, std::string_view value) { | ||
| 1176 | NotImplemented(); | ||
| 1177 | } | ||
| 1178 | |||
| 1179 | void EmitConvertU32U64(EmitContext& ctx, std::string_view value) { | ||
| 1180 | NotImplemented(); | ||
| 1181 | } | ||
| 1182 | |||
| 1183 | void EmitConvertF16F32(EmitContext& ctx, std::string_view value) { | ||
| 1184 | NotImplemented(); | ||
| 1185 | } | ||
| 1186 | |||
| 1187 | void EmitConvertF32F16(EmitContext& ctx, std::string_view value) { | ||
| 1188 | NotImplemented(); | ||
| 1189 | } | ||
| 1190 | |||
| 1191 | void EmitConvertF32F64(EmitContext& ctx, std::string_view value) { | ||
| 1192 | NotImplemented(); | ||
| 1193 | } | ||
| 1194 | |||
| 1195 | void EmitConvertF64F32(EmitContext& ctx, std::string_view value) { | ||
| 1196 | NotImplemented(); | ||
| 1197 | } | ||
| 1198 | |||
| 1199 | void EmitConvertF16S8(EmitContext& ctx, std::string_view value) { | ||
| 1200 | NotImplemented(); | ||
| 1201 | } | ||
| 1202 | |||
| 1203 | void EmitConvertF16S16(EmitContext& ctx, std::string_view value) { | ||
| 1204 | NotImplemented(); | ||
| 1205 | } | ||
| 1206 | |||
| 1207 | void EmitConvertF16S32(EmitContext& ctx, std::string_view value) { | ||
| 1208 | NotImplemented(); | ||
| 1209 | } | ||
| 1210 | |||
| 1211 | void EmitConvertF16S64(EmitContext& ctx, std::string_view value) { | ||
| 1212 | NotImplemented(); | ||
| 1213 | } | ||
| 1214 | |||
| 1215 | void EmitConvertF16U8(EmitContext& ctx, std::string_view value) { | ||
| 1216 | NotImplemented(); | ||
| 1217 | } | ||
| 1218 | |||
| 1219 | void EmitConvertF16U16(EmitContext& ctx, std::string_view value) { | ||
| 1220 | NotImplemented(); | ||
| 1221 | } | ||
| 1222 | |||
| 1223 | void EmitConvertF16U32(EmitContext& ctx, std::string_view value) { | ||
| 1224 | NotImplemented(); | ||
| 1225 | } | ||
| 1226 | |||
| 1227 | void EmitConvertF16U64(EmitContext& ctx, std::string_view value) { | ||
| 1228 | NotImplemented(); | ||
| 1229 | } | ||
| 1230 | |||
| 1231 | void EmitConvertF32S8(EmitContext& ctx, std::string_view value) { | ||
| 1232 | NotImplemented(); | ||
| 1233 | } | ||
| 1234 | |||
| 1235 | void EmitConvertF32S16(EmitContext& ctx, std::string_view value) { | ||
| 1236 | NotImplemented(); | ||
| 1237 | } | ||
| 1238 | |||
| 1239 | void EmitConvertF32S32(EmitContext& ctx, std::string_view value) { | ||
| 1240 | NotImplemented(); | ||
| 1241 | } | ||
| 1242 | |||
| 1243 | void EmitConvertF32S64(EmitContext& ctx, std::string_view value) { | ||
| 1244 | NotImplemented(); | ||
| 1245 | } | ||
| 1246 | |||
| 1247 | void EmitConvertF32U8(EmitContext& ctx, std::string_view value) { | ||
| 1248 | NotImplemented(); | ||
| 1249 | } | ||
| 1250 | |||
| 1251 | void EmitConvertF32U16(EmitContext& ctx, std::string_view value) { | ||
| 1252 | NotImplemented(); | ||
| 1253 | } | ||
| 1254 | |||
| 1255 | void EmitConvertF32U32(EmitContext& ctx, std::string_view value) { | ||
| 1256 | NotImplemented(); | ||
| 1257 | } | ||
| 1258 | |||
| 1259 | void EmitConvertF32U64(EmitContext& ctx, std::string_view value) { | ||
| 1260 | NotImplemented(); | ||
| 1261 | } | ||
| 1262 | |||
| 1263 | void EmitConvertF64S8(EmitContext& ctx, std::string_view value) { | ||
| 1264 | NotImplemented(); | ||
| 1265 | } | ||
| 1266 | |||
| 1267 | void EmitConvertF64S16(EmitContext& ctx, std::string_view value) { | ||
| 1268 | NotImplemented(); | ||
| 1269 | } | ||
| 1270 | |||
| 1271 | void EmitConvertF64S32(EmitContext& ctx, std::string_view value) { | ||
| 1272 | NotImplemented(); | ||
| 1273 | } | ||
| 1274 | |||
| 1275 | void EmitConvertF64S64(EmitContext& ctx, std::string_view value) { | ||
| 1276 | NotImplemented(); | ||
| 1277 | } | ||
| 1278 | |||
| 1279 | void EmitConvertF64U8(EmitContext& ctx, std::string_view value) { | ||
| 1280 | NotImplemented(); | ||
| 1281 | } | ||
| 1282 | |||
| 1283 | void EmitConvertF64U16(EmitContext& ctx, std::string_view value) { | ||
| 1284 | NotImplemented(); | ||
| 1285 | } | ||
| 1286 | |||
| 1287 | void EmitConvertF64U32(EmitContext& ctx, std::string_view value) { | ||
| 1288 | NotImplemented(); | ||
| 1289 | } | ||
| 1290 | |||
| 1291 | void EmitConvertF64U64(EmitContext& ctx, std::string_view value) { | ||
| 1292 | NotImplemented(); | ||
| 1293 | } | ||
| 1294 | |||
| 1295 | void EmitBindlessImageSampleImplicitLod(EmitContext&) { | 709 | void EmitBindlessImageSampleImplicitLod(EmitContext&) { |
| 1296 | NotImplemented(); | 710 | NotImplemented(); |
| 1297 | } | 711 | } |
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp index a6bf18fb1..a049e3dc9 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp | |||
| @@ -33,10 +33,9 @@ void EmitSelectU32(EmitContext& ctx, IR::Inst& inst, std::string_view cond, | |||
| 33 | ctx.AddU32("{}={}?{}:{};", inst, cond, true_value, false_value); | 33 | ctx.AddU32("{}={}?{}:{};", inst, cond, true_value, false_value); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | void EmitSelectU64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, | 36 | void EmitSelectU64(EmitContext& ctx, IR::Inst& inst, std::string_view cond, |
| 37 | [[maybe_unused]] std::string_view true_value, | 37 | std::string_view true_value, std::string_view false_value) { |
| 38 | [[maybe_unused]] std::string_view false_value) { | 38 | ctx.AddU64("{}={}?{}:{};", inst, cond, true_value, false_value); |
| 39 | throw NotImplementedException("GLSL Instruction"); | ||
| 40 | } | 39 | } |
| 41 | 40 | ||
| 42 | void EmitSelectF16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, | 41 | void EmitSelectF16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
| @@ -50,10 +49,9 @@ void EmitSelectF32(EmitContext& ctx, IR::Inst& inst, std::string_view cond, | |||
| 50 | ctx.AddF32("{}={}?{}:{};", inst, cond, true_value, false_value); | 49 | ctx.AddF32("{}={}?{}:{};", inst, cond, true_value, false_value); |
| 51 | } | 50 | } |
| 52 | 51 | ||
| 53 | void EmitSelectF64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, | 52 | void EmitSelectF64(EmitContext& ctx, IR::Inst& inst, std::string_view cond, |
| 54 | [[maybe_unused]] std::string_view true_value, | 53 | std::string_view true_value, std::string_view false_value) { |
| 55 | [[maybe_unused]] std::string_view false_value) { | 54 | ctx.AddF64("{}={}?{}:{};", inst, cond, true_value, false_value); |
| 56 | throw NotImplementedException("GLSL Instruction"); | ||
| 57 | } | 55 | } |
| 58 | 56 | ||
| 59 | } // namespace Shader::Backend::GLSL | 57 | } // namespace Shader::Backend::GLSL |
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.cpp b/src/shader_recompiler/backend/glsl/reg_alloc.cpp index 3cfa16fea..039236689 100644 --- a/src/shader_recompiler/backend/glsl/reg_alloc.cpp +++ b/src/shader_recompiler/backend/glsl/reg_alloc.cpp | |||
| @@ -78,8 +78,12 @@ std::string RegAlloc::GetType(Type type, u32 index) { | |||
| 78 | return "int "; | 78 | return "int "; |
| 79 | case Type::F32: | 79 | case Type::F32: |
| 80 | return "float "; | 80 | return "float "; |
| 81 | case Type::S64: | ||
| 82 | return "int64_t "; | ||
| 81 | case Type::U64: | 83 | case Type::U64: |
| 82 | return "uint64_t "; | 84 | return "uint64_t "; |
| 85 | case Type::F64: | ||
| 86 | return "double "; | ||
| 83 | case Type::U32x2: | 87 | case Type::U32x2: |
| 84 | return "uvec2 "; | 88 | return "uvec2 "; |
| 85 | case Type::F32x2: | 89 | case Type::F32x2: |
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.h b/src/shader_recompiler/backend/glsl/reg_alloc.h index 84ef7e822..63c940d3a 100644 --- a/src/shader_recompiler/backend/glsl/reg_alloc.h +++ b/src/shader_recompiler/backend/glsl/reg_alloc.h | |||
| @@ -17,9 +17,10 @@ class Value; | |||
| 17 | namespace Shader::Backend::GLSL { | 17 | namespace Shader::Backend::GLSL { |
| 18 | enum class Type : u32 { | 18 | enum class Type : u32 { |
| 19 | U1, | 19 | U1, |
| 20 | U32, | ||
| 21 | S32, | 20 | S32, |
| 21 | U32, | ||
| 22 | F32, | 22 | F32, |
| 23 | S64, | ||
| 23 | U64, | 24 | U64, |
| 24 | F64, | 25 | F64, |
| 25 | U32x2, | 26 | U32x2, |