diff options
| author | 2021-05-25 01:35:30 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | 11ba190462c7b69a47598b2d1572fac3bccc4adc (patch) | |
| tree | e24682860686eba5710716579a583312c1db2652 /src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp | |
| parent | glsl: implement phi nodes (diff) | |
| download | yuzu-11ba190462c7b69a47598b2d1572fac3bccc4adc.tar.gz yuzu-11ba190462c7b69a47598b2d1572fac3bccc4adc.tar.xz yuzu-11ba190462c7b69a47598b2d1572fac3bccc4adc.zip | |
glsl: Revert ssbo aliasing. Storage Atomics impl
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp | 141 |
1 files changed, 101 insertions, 40 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp index f3ef37873..0b29c213b 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp | |||
| @@ -13,132 +13,193 @@ | |||
| 13 | namespace Shader::Backend::GLSL { | 13 | namespace Shader::Backend::GLSL { |
| 14 | namespace { | 14 | namespace { |
| 15 | static constexpr std::string_view cas_loop{R"( | 15 | static constexpr std::string_view cas_loop{R"( |
| 16 | {} {}; | 16 | uint {}; |
| 17 | for (;;){{ | 17 | for (;;){{ |
| 18 | {} old_value={}; | 18 | uint old_value={}; |
| 19 | {} = atomicCompSwap({},old_value,{}({},{})); | 19 | {}=atomicCompSwap({},old_value,{}({},{})); |
| 20 | if ({}==old_value){{break;}} | 20 | if ({}==old_value){{break;}} |
| 21 | }})"}; | 21 | }})"}; |
| 22 | 22 | ||
| 23 | void CasFunction(EmitContext& ctx, IR::Inst& inst, std::string_view ssbo, std::string_view value, | 23 | void CasFunction(EmitContext& ctx, std::string_view ret, std::string_view ssbo, |
| 24 | std::string_view type, std::string_view function) { | 24 | std::string_view value, std::string_view function) { |
| 25 | ctx.Add(cas_loop.data(), ret, ssbo, ret, ssbo, function, ssbo, value, ret); | ||
| 26 | } | ||
| 27 | |||
| 28 | void CasFunctionInt32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 29 | const IR::Value& offset, std::string_view value, std::string_view function) { | ||
| 30 | const auto ret{ctx.reg_alloc.Define(inst)}; | ||
| 31 | const std::string ssbo{fmt::format("ssbo{}[{}]", binding.U32(), offset.U32())}; | ||
| 32 | CasFunction(ctx, ret, ssbo, value, function); | ||
| 33 | } | ||
| 34 | |||
| 35 | void CasFunctionF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 36 | const IR::Value& offset, std::string_view value, std::string_view function) { | ||
| 37 | const std::string ssbo{fmt::format("ssbo{}[{}]", binding.U32(), offset.U32())}; | ||
| 38 | const std::string u32_value{fmt::format("floatBitsToUint({})", value)}; | ||
| 39 | const auto ret{ctx.reg_alloc.Define(inst)}; | ||
| 40 | const auto ret_32{ret + "_u32"}; | ||
| 41 | CasFunction(ctx, ret_32, ssbo, u32_value, function); | ||
| 42 | ctx.Add("float {}=uintBitsToFloat({});", ret, ret_32); | ||
| 43 | } | ||
| 44 | |||
| 45 | void CasFunctionF32x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | ||
| 46 | const IR::Value& offset, std::string_view value, std::string_view function) { | ||
| 47 | const std::string ssbo{fmt::format("ssbo{}[{}]", binding.U32(), offset.U32())}; | ||
| 48 | const std::string u32_value{fmt::format("packHalf2x16({})", value)}; | ||
| 25 | const auto ret{ctx.reg_alloc.Define(inst)}; | 49 | const auto ret{ctx.reg_alloc.Define(inst)}; |
| 26 | ctx.Add(cas_loop.data(), type, ret, type, ssbo, ret, ssbo, function, ssbo, value, ret); | 50 | CasFunction(ctx, ret, ssbo, u32_value, function); |
| 27 | } | 51 | } |
| 28 | } // namespace | 52 | } // namespace |
| 29 | 53 | ||
| 30 | void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 54 | void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 31 | const IR::Value& offset, std::string_view value) { | 55 | const IR::Value& offset, std::string_view value) { |
| 32 | ctx.AddU32("{}=atomicAdd(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 56 | ctx.AddU32("{}=atomicAdd(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 33 | } | 57 | } |
| 34 | 58 | ||
| 35 | void EmitStorageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 59 | void EmitStorageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 36 | const IR::Value& offset, std::string_view value) { | 60 | const IR::Value& offset, std::string_view value) { |
| 37 | ctx.AddS32("{}=atomicMin(ssbo{}_s32[{}],int({}));", inst, binding.U32(), offset.U32(), value); | 61 | const std::string u32_value{fmt::format("uint({})", value)}; |
| 62 | CasFunctionInt32(ctx, inst, binding, offset, u32_value, "CasMinS32"); | ||
| 38 | } | 63 | } |
| 39 | 64 | ||
| 40 | void EmitStorageAtomicUMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 65 | void EmitStorageAtomicUMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 41 | const IR::Value& offset, std::string_view value) { | 66 | const IR::Value& offset, std::string_view value) { |
| 42 | ctx.AddU32("{}=atomicMin(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 67 | ctx.AddU32("{}=atomicMin(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 43 | } | 68 | } |
| 44 | 69 | ||
| 45 | void EmitStorageAtomicSMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 70 | void EmitStorageAtomicSMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 46 | const IR::Value& offset, std::string_view value) { | 71 | const IR::Value& offset, std::string_view value) { |
| 47 | ctx.AddS32("{}=atomicMax(ssbo{}_s32[{}],int({}));", inst, binding.U32(), offset.U32(), value); | 72 | const std::string u32_value{fmt::format("uint({})", value)}; |
| 73 | CasFunctionInt32(ctx, inst, binding, offset, u32_value, "CasMaxS32"); | ||
| 48 | } | 74 | } |
| 49 | 75 | ||
| 50 | void EmitStorageAtomicUMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 76 | void EmitStorageAtomicUMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 51 | const IR::Value& offset, std::string_view value) { | 77 | const IR::Value& offset, std::string_view value) { |
| 52 | ctx.AddU32("{}=atomicMax(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 78 | ctx.AddU32("{}=atomicMax(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 53 | } | 79 | } |
| 54 | 80 | ||
| 55 | void EmitStorageAtomicInc32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 81 | void EmitStorageAtomicInc32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 56 | [[maybe_unused]] const IR::Value& offset, std::string_view value) { | 82 | const IR::Value& offset, std::string_view value) { |
| 57 | // const auto ret{ctx.reg_alloc.Define(inst)}; | 83 | CasFunctionInt32(ctx, inst, binding, offset, value, "CasIncrement"); |
| 58 | // const auto type{"uint"}; | ||
| 59 | // ctx.Add(cas_loop.data(), type, ret, type, ssbo, ret, ssbo, "CasIncrement", ssbo, value, ret); | ||
| 60 | const std::string ssbo{fmt::format("ssbo{}_u32[{}]", binding.U32(), offset.U32())}; | ||
| 61 | CasFunction(ctx, inst, ssbo, value, "uint", "CasIncrement"); | ||
| 62 | } | 84 | } |
| 63 | 85 | ||
| 64 | void EmitStorageAtomicDec32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 86 | void EmitStorageAtomicDec32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 65 | const IR::Value& offset, std::string_view value) { | 87 | const IR::Value& offset, std::string_view value) { |
| 66 | const std::string ssbo{fmt::format("ssbo{}_u32[{}]", binding.U32(), offset.U32())}; | 88 | CasFunctionInt32(ctx, inst, binding, offset, value, "CasDecrement"); |
| 67 | CasFunction(ctx, inst, ssbo, value, "uint", "CasDecrement"); | ||
| 68 | } | 89 | } |
| 69 | 90 | ||
| 70 | void EmitStorageAtomicAnd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 91 | void EmitStorageAtomicAnd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 71 | const IR::Value& offset, std::string_view value) { | 92 | const IR::Value& offset, std::string_view value) { |
| 72 | ctx.AddU32("{}=atomicAnd(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 93 | ctx.AddU32("{}=atomicAnd(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 73 | } | 94 | } |
| 74 | 95 | ||
| 75 | void EmitStorageAtomicOr32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 96 | void EmitStorageAtomicOr32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 76 | const IR::Value& offset, std::string_view value) { | 97 | const IR::Value& offset, std::string_view value) { |
| 77 | ctx.AddU32("{}=atomicOr(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 98 | ctx.AddU32("{}=atomicOr(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 78 | } | 99 | } |
| 79 | 100 | ||
| 80 | void EmitStorageAtomicXor32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 101 | void EmitStorageAtomicXor32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 81 | const IR::Value& offset, std::string_view value) { | 102 | const IR::Value& offset, std::string_view value) { |
| 82 | ctx.AddU32("{}=atomicXor(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 103 | ctx.AddU32("{}=atomicXor(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 83 | } | 104 | } |
| 84 | 105 | ||
| 85 | void EmitStorageAtomicExchange32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 106 | void EmitStorageAtomicExchange32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 86 | const IR::Value& offset, std::string_view value) { | 107 | const IR::Value& offset, std::string_view value) { |
| 87 | ctx.AddU32("{}=atomicExchange(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 108 | ctx.AddU32("{}=atomicExchange(ssbo{}[{}],{});", inst, binding.U32(), offset.U32(), value); |
| 88 | } | 109 | } |
| 89 | 110 | ||
| 90 | void EmitStorageAtomicIAdd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 111 | void EmitStorageAtomicIAdd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 91 | const IR::Value& offset, std::string_view value) { | 112 | const IR::Value& offset, std::string_view value) { |
| 92 | // ctx.AddU64("{}=atomicAdd(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 113 | // LOG_WARNING(..., "Op falling to non-atomic"); |
| 93 | ctx.AddU64("{}=ssbo{}_u64[{}];", inst, binding.U32(), offset.U32()); | 114 | ctx.AddU64("{}=uint64_t(uvec2(ssbo{}[{}],ssbo{}[{}]));", inst, binding.U32(), offset.U32(), |
| 94 | ctx.Add("ssbo{}_u64[{}]+={};", binding.U32(), offset.U32(), value); | 115 | binding.U32(), offset.U32() + 1); |
| 116 | ctx.Add("ssbo{}[{}]+=unpackUint2x32({}).x;ssbo{}[{}]+=unpackUint2x32({}).y;", binding.U32(), | ||
| 117 | offset.U32(), value, binding.U32(), offset.U32() + 1, value); | ||
| 95 | } | 118 | } |
| 96 | 119 | ||
| 97 | void EmitStorageAtomicSMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 120 | void EmitStorageAtomicSMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 98 | const IR::Value& offset, std::string_view value) { | 121 | const IR::Value& offset, std::string_view value) { |
| 99 | ctx.AddS64("{}=atomicMin(int64_t(ssbo{}_u64[{}]),int64_t({}));", inst, binding.U32(), | 122 | // LOG_WARNING(..., "Op falling to non-atomic"); |
| 100 | offset.U32(), value); | 123 | ctx.AddS64("{}=int64_t(ivec2(ssbo{}[{}],ssbo{}[{}]));", inst, binding.U32(), offset.U32(), |
| 124 | binding.U32(), offset.U32() + 1); | ||
| 125 | ctx.Add(R"( | ||
| 126 | for(int i=0;i<2;++i){{ | ||
| 127 | ssbo{}[{}+i]=uint(min(int(ssbo{}[{}+i]),unpackInt2x32(int64_t({}))[i])); | ||
| 128 | }} | ||
| 129 | )", | ||
| 130 | binding.U32(), offset.U32(), binding.U32(), offset.U32(), value); | ||
| 101 | } | 131 | } |
| 102 | 132 | ||
| 103 | void EmitStorageAtomicUMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 133 | void EmitStorageAtomicUMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 104 | const IR::Value& offset, std::string_view value) { | 134 | const IR::Value& offset, std::string_view value) { |
| 105 | ctx.AddU64("{}=atomicMin(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 135 | // LOG_WARNING(..., "Op falling to non-atomic"); |
| 136 | ctx.AddU64("{}=uint64_t(uvec2(ssbo{}[{}],ssbo{}[{}]));", inst, binding.U32(), offset.U32(), | ||
| 137 | binding.U32(), offset.U32() + 1); | ||
| 138 | ctx.Add(R"( | ||
| 139 | for(int i=0;i<2;++i){{ | ||
| 140 | ssbo{}[{}+i]=min(ssbo{}[{}+i],unpackUint2x32(uint64_t({}))[i]); | ||
| 141 | }} | ||
| 142 | )", | ||
| 143 | binding.U32(), offset.U32(), binding.U32(), offset.U32(), value); | ||
| 106 | } | 144 | } |
| 107 | 145 | ||
| 108 | void EmitStorageAtomicSMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 146 | void EmitStorageAtomicSMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 109 | const IR::Value& offset, std::string_view value) { | 147 | const IR::Value& offset, std::string_view value) { |
| 110 | ctx.AddS64("{}=atomicMax(int64_t(ssbo{}_u64[{}]),int64_t({}));", inst, binding.U32(), | 148 | // LOG_WARNING(..., "Op falling to non-atomic"); |
| 111 | offset.U32(), value); | 149 | ctx.AddS64("{}=int64_t(ivec2(ssbo{}[{}],ssbo{}[{}]));", inst, binding.U32(), offset.U32(), |
| 150 | binding.U32(), offset.U32() + 1); | ||
| 151 | ctx.Add(R"( | ||
| 152 | for(int i=0;i<2;++i){{ | ||
| 153 | ssbo{}[{}+i]=uint(max(int(ssbo{}[{}+i]),unpackInt2x32(int64_t({}))[i])); | ||
| 154 | }} | ||
| 155 | )", | ||
| 156 | binding.U32(), offset.U32(), binding.U32(), offset.U32(), value); | ||
| 112 | } | 157 | } |
| 113 | 158 | ||
| 114 | void EmitStorageAtomicUMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 159 | void EmitStorageAtomicUMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 115 | const IR::Value& offset, std::string_view value) { | 160 | const IR::Value& offset, std::string_view value) { |
| 116 | ctx.AddU64("{}=atomicMax(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 161 | // LOG_WARNING(..., "Op falling to non-atomic"); |
| 162 | ctx.AddU64("{}=uint64_t(uvec2(ssbo{}[{}],ssbo{}[{}]));", inst, binding.U32(), offset.U32(), | ||
| 163 | binding.U32(), offset.U32() + 1); | ||
| 164 | ctx.Add(R"( | ||
| 165 | for(int i=0;i<2;++i){{ | ||
| 166 | ssbo{}[{}+i]=max(ssbo{}[{}+i],unpackUint2x32(uint64_t({}))[i]); | ||
| 167 | }} | ||
| 168 | )", | ||
| 169 | binding.U32(), offset.U32(), binding.U32(), offset.U32(), value); | ||
| 117 | } | 170 | } |
| 118 | 171 | ||
| 119 | void EmitStorageAtomicAnd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 172 | void EmitStorageAtomicAnd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 120 | const IR::Value& offset, std::string_view value) { | 173 | const IR::Value& offset, std::string_view value) { |
| 121 | ctx.AddU64("{}=atomicAnd(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 174 | ctx.AddU64("{}=uint64_t(uvec2(atomicAnd(ssbo{}[{}],unpackUint2x32({}).x),atomicAnd(ssbo{}[{}]," |
| 175 | "unpackUint2x32({}).y)));", | ||
| 176 | inst, binding.U32(), offset.U32(), value, binding.U32(), offset.U32() + 1, value); | ||
| 122 | } | 177 | } |
| 123 | 178 | ||
| 124 | void EmitStorageAtomicOr64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 179 | void EmitStorageAtomicOr64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 125 | const IR::Value& offset, std::string_view value) { | 180 | const IR::Value& offset, std::string_view value) { |
| 126 | ctx.AddU64("{}=atomicOr(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 181 | ctx.AddU64("{}=uint64_t(uvec2(atomicOr(ssbo{}[{}],unpackUint2x32({}).x),atomicOr(ssbo{}[{}]," |
| 182 | "unpackUint2x32({}).y)));", | ||
| 183 | inst, binding.U32(), offset.U32(), value, binding.U32(), offset.U32() + 1, value); | ||
| 127 | } | 184 | } |
| 128 | 185 | ||
| 129 | void EmitStorageAtomicXor64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 186 | void EmitStorageAtomicXor64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 130 | const IR::Value& offset, std::string_view value) { | 187 | const IR::Value& offset, std::string_view value) { |
| 131 | ctx.AddU64("{}=atomicXor(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 188 | ctx.AddU64("{}=uint64_t(uvec2(atomicXor(ssbo{}[{}],unpackUint2x32({}).x),atomicXor(ssbo{}[{}]," |
| 189 | "unpackUint2x32({}).y)));", | ||
| 190 | inst, binding.U32(), offset.U32(), value, binding.U32(), offset.U32() + 1, value); | ||
| 132 | } | 191 | } |
| 133 | 192 | ||
| 134 | void EmitStorageAtomicExchange64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 193 | void EmitStorageAtomicExchange64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 135 | const IR::Value& offset, std::string_view value) { | 194 | const IR::Value& offset, std::string_view value) { |
| 136 | ctx.AddU64("{}=atomicExchange(ssbo{}_u64[{}],{});", inst, binding.U32(), offset.U32(), value); | 195 | ctx.AddU64("{}=uint64_t(uvec2(atomicExchange(ssbo{}[{}],unpackUint2x32({}).x),atomicExchange(" |
| 196 | "ssbo{}[{}],unpackUint2x32({}).y)));", | ||
| 197 | inst, binding.U32(), offset.U32(), value, binding.U32(), offset.U32() + 1, value); | ||
| 137 | } | 198 | } |
| 138 | 199 | ||
| 139 | void EmitStorageAtomicAddF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 200 | void EmitStorageAtomicAddF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 140 | const IR::Value& offset, std::string_view value) { | 201 | const IR::Value& offset, std::string_view value) { |
| 141 | ctx.AddF32("{}=atomicAdd(ssbo{}_u32[{}],{});", inst, binding.U32(), offset.U32(), value); | 202 | CasFunctionF32(ctx, inst, binding, offset, value, "CasFloatAdd"); |
| 142 | } | 203 | } |
| 143 | 204 | ||
| 144 | void EmitStorageAtomicAddF16x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 205 | void EmitStorageAtomicAddF16x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |
| @@ -152,7 +213,7 @@ void EmitStorageAtomicAddF32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused | |||
| 152 | [[maybe_unused]] const IR::Value& binding, | 213 | [[maybe_unused]] const IR::Value& binding, |
| 153 | [[maybe_unused]] const IR::Value& offset, | 214 | [[maybe_unused]] const IR::Value& offset, |
| 154 | [[maybe_unused]] std::string_view value) { | 215 | [[maybe_unused]] std::string_view value) { |
| 155 | throw NotImplementedException("GLSL Instrucion"); | 216 | CasFunctionF32x2(ctx, inst, binding, offset, value, "CasFloatAdd32x2"); |
| 156 | } | 217 | } |
| 157 | 218 | ||
| 158 | void EmitStorageAtomicMinF16x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 219 | void EmitStorageAtomicMinF16x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |
| @@ -166,7 +227,7 @@ void EmitStorageAtomicMinF32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused | |||
| 166 | [[maybe_unused]] const IR::Value& binding, | 227 | [[maybe_unused]] const IR::Value& binding, |
| 167 | [[maybe_unused]] const IR::Value& offset, | 228 | [[maybe_unused]] const IR::Value& offset, |
| 168 | [[maybe_unused]] std::string_view value) { | 229 | [[maybe_unused]] std::string_view value) { |
| 169 | throw NotImplementedException("GLSL Instrucion"); | 230 | CasFunctionF32x2(ctx, inst, binding, offset, value, "CasFloatMin32x2"); |
| 170 | } | 231 | } |
| 171 | 232 | ||
| 172 | void EmitStorageAtomicMaxF16x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, | 233 | void EmitStorageAtomicMaxF16x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst, |
| @@ -180,7 +241,7 @@ void EmitStorageAtomicMaxF32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused | |||
| 180 | [[maybe_unused]] const IR::Value& binding, | 241 | [[maybe_unused]] const IR::Value& binding, |
| 181 | [[maybe_unused]] const IR::Value& offset, | 242 | [[maybe_unused]] const IR::Value& offset, |
| 182 | [[maybe_unused]] std::string_view value) { | 243 | [[maybe_unused]] std::string_view value) { |
| 183 | throw NotImplementedException("GLSL Instrucion"); | 244 | CasFunctionF32x2(ctx, inst, binding, offset, value, "CasFloatMax32x2"); |
| 184 | } | 245 | } |
| 185 | 246 | ||
| 186 | void EmitGlobalAtomicIAdd32(EmitContext&) { | 247 | void EmitGlobalAtomicIAdd32(EmitContext&) { |