diff options
Diffstat (limited to 'src')
5 files changed, 156 insertions, 109 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index 047b2f89c..056d8cbf8 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -193,6 +193,9 @@ void SetupOptions(std::string& header, Info info) { | |||
| 193 | if (info.uses_subgroup_shuffles) { | 193 | if (info.uses_subgroup_shuffles) { |
| 194 | header += "OPTION NV_shader_thread_shuffle;"; | 194 | header += "OPTION NV_shader_thread_shuffle;"; |
| 195 | } | 195 | } |
| 196 | // TODO: Track the shared atomic ops | ||
| 197 | header += | ||
| 198 | "OPTION NV_shader_storage_buffer;OPTION NV_gpu_program_fp64;OPTION NV_bindless_texture;"; | ||
| 196 | } | 199 | } |
| 197 | } // Anonymous namespace | 200 | } // Anonymous namespace |
| 198 | 201 | ||
| @@ -214,6 +217,10 @@ std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { | |||
| 214 | default: | 217 | default: |
| 215 | break; | 218 | break; |
| 216 | } | 219 | } |
| 220 | if (program.shared_memory_size > 0) { | ||
| 221 | header += fmt::format("SHARED_MEMORY {};", program.shared_memory_size); | ||
| 222 | header += fmt::format("SHARED shared_mem[]={{program.sharedmem}};"); | ||
| 223 | } | ||
| 217 | header += "TEMP "; | 224 | header += "TEMP "; |
| 218 | for (size_t index = 0; index < ctx.reg_alloc.NumUsedRegisters(); ++index) { | 225 | for (size_t index = 0; index < ctx.reg_alloc.NumUsedRegisters(); ++index) { |
| 219 | header += fmt::format("R{},", index); | 226 | header += fmt::format("R{},", index); |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp index fe44c3d15..e72b252a3 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp | |||
| @@ -35,6 +35,66 @@ void Atom(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, ScalarU32 | |||
| 35 | } | 35 | } |
| 36 | } // namespace | 36 | } // namespace |
| 37 | 37 | ||
| 38 | void EmitSharedAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 39 | ScalarU32 value) { | ||
| 40 | ctx.Add("ATOMS.ADD.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 41 | } | ||
| 42 | |||
| 43 | void EmitSharedAtomicSMin32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 44 | ScalarS32 value) { | ||
| 45 | ctx.Add("ATOMS.MIN.S32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 46 | } | ||
| 47 | |||
| 48 | void EmitSharedAtomicUMin32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 49 | ScalarU32 value) { | ||
| 50 | ctx.Add("ATOMS.MIN.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 51 | } | ||
| 52 | |||
| 53 | void EmitSharedAtomicSMax32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 54 | ScalarS32 value) { | ||
| 55 | ctx.Add("ATOMS.MAX.S32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 56 | } | ||
| 57 | |||
| 58 | void EmitSharedAtomicUMax32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 59 | ScalarU32 value) { | ||
| 60 | ctx.Add("ATOMS.MAX.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 61 | } | ||
| 62 | |||
| 63 | void EmitSharedAtomicInc32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 64 | ScalarU32 value) { | ||
| 65 | ctx.Add("ATOMS.IWRAP.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 66 | } | ||
| 67 | |||
| 68 | void EmitSharedAtomicDec32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 69 | ScalarU32 value) { | ||
| 70 | ctx.Add("ATOMS.DWRAP.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 71 | } | ||
| 72 | |||
| 73 | void EmitSharedAtomicAnd32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 74 | ScalarU32 value) { | ||
| 75 | ctx.Add("ATOMS.AND.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 76 | } | ||
| 77 | |||
| 78 | void EmitSharedAtomicOr32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 79 | ScalarU32 value) { | ||
| 80 | ctx.Add("ATOMS.OR.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 81 | } | ||
| 82 | |||
| 83 | void EmitSharedAtomicXor32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 84 | ScalarU32 value) { | ||
| 85 | ctx.Add("ATOMS.XOR.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 86 | } | ||
| 87 | |||
| 88 | void EmitSharedAtomicExchange32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 89 | ScalarU32 value) { | ||
| 90 | ctx.Add("ATOMS.EXCH.U32 {},{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 91 | } | ||
| 92 | |||
| 93 | void EmitSharedAtomicExchange64(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 94 | Register value) { | ||
| 95 | ctx.LongAdd("ATOMS.EXCH.U64 {}.x,{},shared_mem[{}];", inst, value, pointer_offset); | ||
| 96 | } | ||
| 97 | |||
| 38 | void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 98 | void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 39 | ScalarU32 offset, ScalarU32 value) { | 99 | ScalarU32 offset, ScalarU32 value) { |
| 40 | Atom(ctx, inst, binding, offset, value, "ADD", "U32"); | 100 | Atom(ctx, inst, binding, offset, value, "ADD", "U32"); |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h index 75613571f..8202354fe 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h +++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | |||
| @@ -129,7 +129,7 @@ void EmitLoadSharedS8(EmitContext& ctx, ScalarU32 offset); | |||
| 129 | void EmitLoadSharedU16(EmitContext& ctx, ScalarU32 offset); | 129 | void EmitLoadSharedU16(EmitContext& ctx, ScalarU32 offset); |
| 130 | void EmitLoadSharedS16(EmitContext& ctx, ScalarU32 offset); | 130 | void EmitLoadSharedS16(EmitContext& ctx, ScalarU32 offset); |
| 131 | void EmitLoadSharedU32(EmitContext& ctx, ScalarU32 offset); | 131 | void EmitLoadSharedU32(EmitContext& ctx, ScalarU32 offset); |
| 132 | void EmitLoadSharedU64(EmitContext& ctx, ScalarU32 offset); | 132 | void EmitLoadSharedU64(EmitContext& ctx, IR::Inst& inst, ScalarU32 offset); |
| 133 | void EmitLoadSharedU128(EmitContext& ctx, ScalarU32 offset); | 133 | void EmitLoadSharedU128(EmitContext& ctx, ScalarU32 offset); |
| 134 | void EmitWriteSharedU8(EmitContext& ctx, ScalarU32 offset, ScalarU32 value); | 134 | void EmitWriteSharedU8(EmitContext& ctx, ScalarU32 offset, ScalarU32 value); |
| 135 | void EmitWriteSharedU16(EmitContext& ctx, ScalarU32 offset, ScalarU32 value); | 135 | void EmitWriteSharedU16(EmitContext& ctx, ScalarU32 offset, ScalarU32 value); |
| @@ -345,18 +345,30 @@ void EmitUGreaterThan(EmitContext& ctx, IR::Inst& inst, ScalarU32 lhs, ScalarU32 | |||
| 345 | void EmitINotEqual(EmitContext& ctx, IR::Inst& inst, ScalarS32 lhs, ScalarS32 rhs); | 345 | void EmitINotEqual(EmitContext& ctx, IR::Inst& inst, ScalarS32 lhs, ScalarS32 rhs); |
| 346 | void EmitSGreaterThanEqual(EmitContext& ctx, IR::Inst& inst, ScalarS32 lhs, ScalarS32 rhs); | 346 | void EmitSGreaterThanEqual(EmitContext& ctx, IR::Inst& inst, ScalarS32 lhs, ScalarS32 rhs); |
| 347 | void EmitUGreaterThanEqual(EmitContext& ctx, IR::Inst& inst, ScalarU32 lhs, ScalarU32 rhs); | 347 | void EmitUGreaterThanEqual(EmitContext& ctx, IR::Inst& inst, ScalarU32 lhs, ScalarU32 rhs); |
| 348 | void EmitSharedAtomicIAdd32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 348 | void EmitSharedAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, |
| 349 | void EmitSharedAtomicSMin32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarS32 value); | 349 | ScalarU32 value); |
| 350 | void EmitSharedAtomicUMin32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 350 | void EmitSharedAtomicSMin32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, |
| 351 | void EmitSharedAtomicSMax32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarS32 value); | 351 | ScalarS32 value); |
| 352 | void EmitSharedAtomicUMax32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 352 | void EmitSharedAtomicUMin32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, |
| 353 | void EmitSharedAtomicInc32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 353 | ScalarU32 value); |
| 354 | void EmitSharedAtomicDec32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 354 | void EmitSharedAtomicSMax32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, |
| 355 | void EmitSharedAtomicAnd32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 355 | ScalarS32 value); |
| 356 | void EmitSharedAtomicOr32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 356 | void EmitSharedAtomicUMax32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, |
| 357 | void EmitSharedAtomicXor32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 357 | ScalarU32 value); |
| 358 | void EmitSharedAtomicExchange32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); | 358 | void EmitSharedAtomicInc32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, |
| 359 | void EmitSharedAtomicExchange64(EmitContext& ctx, ScalarU32 pointer_offset, Register value); | 359 | ScalarU32 value); |
| 360 | void EmitSharedAtomicDec32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 361 | ScalarU32 value); | ||
| 362 | void EmitSharedAtomicAnd32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 363 | ScalarU32 value); | ||
| 364 | void EmitSharedAtomicOr32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 365 | ScalarU32 value); | ||
| 366 | void EmitSharedAtomicXor32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 367 | ScalarU32 value); | ||
| 368 | void EmitSharedAtomicExchange32(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 369 | ScalarU32 value); | ||
| 370 | void EmitSharedAtomicExchange64(EmitContext& ctx, IR::Inst& inst, ScalarU32 pointer_offset, | ||
| 371 | Register value); | ||
| 360 | void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 372 | void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
| 361 | ScalarU32 offset, ScalarU32 value); | 373 | ScalarU32 offset, ScalarU32 value); |
| 362 | void EmitStorageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, | 374 | void EmitStorageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp index 3c0a74e3c..b40d09f8c 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp | |||
| @@ -199,54 +199,6 @@ void EmitUndefU64(EmitContext& ctx) { | |||
| 199 | NotImplemented(); | 199 | NotImplemented(); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | void EmitLoadSharedU8(EmitContext& ctx, ScalarU32 offset) { | ||
| 203 | NotImplemented(); | ||
| 204 | } | ||
| 205 | |||
| 206 | void EmitLoadSharedS8(EmitContext& ctx, ScalarU32 offset) { | ||
| 207 | NotImplemented(); | ||
| 208 | } | ||
| 209 | |||
| 210 | void EmitLoadSharedU16(EmitContext& ctx, ScalarU32 offset) { | ||
| 211 | NotImplemented(); | ||
| 212 | } | ||
| 213 | |||
| 214 | void EmitLoadSharedS16(EmitContext& ctx, ScalarU32 offset) { | ||
| 215 | NotImplemented(); | ||
| 216 | } | ||
| 217 | |||
| 218 | void EmitLoadSharedU32(EmitContext& ctx, ScalarU32 offset) { | ||
| 219 | NotImplemented(); | ||
| 220 | } | ||
| 221 | |||
| 222 | void EmitLoadSharedU64(EmitContext& ctx, ScalarU32 offset) { | ||
| 223 | NotImplemented(); | ||
| 224 | } | ||
| 225 | |||
| 226 | void EmitLoadSharedU128(EmitContext& ctx, ScalarU32 offset) { | ||
| 227 | NotImplemented(); | ||
| 228 | } | ||
| 229 | |||
| 230 | void EmitWriteSharedU8(EmitContext& ctx, ScalarU32 offset, ScalarU32 value) { | ||
| 231 | NotImplemented(); | ||
| 232 | } | ||
| 233 | |||
| 234 | void EmitWriteSharedU16(EmitContext& ctx, ScalarU32 offset, ScalarU32 value) { | ||
| 235 | NotImplemented(); | ||
| 236 | } | ||
| 237 | |||
| 238 | void EmitWriteSharedU32(EmitContext& ctx, ScalarU32 offset, ScalarU32 value) { | ||
| 239 | NotImplemented(); | ||
| 240 | } | ||
| 241 | |||
| 242 | void EmitWriteSharedU64(EmitContext& ctx, ScalarU32 offset, Register value) { | ||
| 243 | NotImplemented(); | ||
| 244 | } | ||
| 245 | |||
| 246 | void EmitWriteSharedU128(EmitContext& ctx, ScalarU32 offset, Register value) { | ||
| 247 | NotImplemented(); | ||
| 248 | } | ||
| 249 | |||
| 250 | void EmitGetZeroFromOp(EmitContext& ctx) { | 202 | void EmitGetZeroFromOp(EmitContext& ctx) { |
| 251 | NotImplemented(); | 203 | NotImplemented(); |
| 252 | } | 204 | } |
| @@ -271,54 +223,6 @@ void EmitGetInBoundsFromOp(EmitContext& ctx) { | |||
| 271 | NotImplemented(); | 223 | NotImplemented(); |
| 272 | } | 224 | } |
| 273 | 225 | ||
| 274 | void EmitSharedAtomicIAdd32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 275 | NotImplemented(); | ||
| 276 | } | ||
| 277 | |||
| 278 | void EmitSharedAtomicSMin32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarS32 value) { | ||
| 279 | NotImplemented(); | ||
| 280 | } | ||
| 281 | |||
| 282 | void EmitSharedAtomicUMin32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 283 | NotImplemented(); | ||
| 284 | } | ||
| 285 | |||
| 286 | void EmitSharedAtomicSMax32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarS32 value) { | ||
| 287 | NotImplemented(); | ||
| 288 | } | ||
| 289 | |||
| 290 | void EmitSharedAtomicUMax32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 291 | NotImplemented(); | ||
| 292 | } | ||
| 293 | |||
| 294 | void EmitSharedAtomicInc32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 295 | NotImplemented(); | ||
| 296 | } | ||
| 297 | |||
| 298 | void EmitSharedAtomicDec32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 299 | NotImplemented(); | ||
| 300 | } | ||
| 301 | |||
| 302 | void EmitSharedAtomicAnd32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 303 | NotImplemented(); | ||
| 304 | } | ||
| 305 | |||
| 306 | void EmitSharedAtomicOr32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 307 | NotImplemented(); | ||
| 308 | } | ||
| 309 | |||
| 310 | void EmitSharedAtomicXor32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 311 | NotImplemented(); | ||
| 312 | } | ||
| 313 | |||
| 314 | void EmitSharedAtomicExchange32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value) { | ||
| 315 | NotImplemented(); | ||
| 316 | } | ||
| 317 | |||
| 318 | void EmitSharedAtomicExchange64(EmitContext& ctx, ScalarU32 pointer_offset, Register value) { | ||
| 319 | NotImplemented(); | ||
| 320 | } | ||
| 321 | |||
| 322 | void EmitLogicalOr(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { | 226 | void EmitLogicalOr(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { |
| 323 | ctx.Add("OR.S {},{},{};", inst, a, b); | 227 | ctx.Add("OR.S {},{},{};", inst, a, b); |
| 324 | } | 228 | } |
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp index e69de29bb..32cc5d92c 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_shared_memory.cpp | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | |||
| 2 | // Copyright 2021 yuzu Emulator Project | ||
| 3 | // Licensed under GPLv2 or any later version | ||
| 4 | // Refer to the license.txt file included. | ||
| 5 | |||
| 6 | #include "shader_recompiler/backend/glasm/emit_context.h" | ||
| 7 | #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h" | ||
| 8 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 9 | |||
| 10 | namespace Shader::Backend::GLASM { | ||
| 11 | void EmitLoadSharedU8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset) { | ||
| 12 | throw NotImplementedException("GLASM instruction"); | ||
| 13 | } | ||
| 14 | |||
| 15 | void EmitLoadSharedS8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset) { | ||
| 16 | throw NotImplementedException("GLASM instruction"); | ||
| 17 | } | ||
| 18 | |||
| 19 | void EmitLoadSharedU16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset) { | ||
| 20 | throw NotImplementedException("GLASM instruction"); | ||
| 21 | } | ||
| 22 | |||
| 23 | void EmitLoadSharedS16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset) { | ||
| 24 | throw NotImplementedException("GLASM instruction"); | ||
| 25 | } | ||
| 26 | |||
| 27 | void EmitLoadSharedU32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset) { | ||
| 28 | throw NotImplementedException("GLASM instruction"); | ||
| 29 | } | ||
| 30 | |||
| 31 | void EmitLoadSharedU64([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | ||
| 32 | [[maybe_unused]] ScalarU32 offset) { | ||
| 33 | ctx.LongAdd("LDS.U64 {},shared_mem[{}];", inst, offset); | ||
| 34 | } | ||
| 35 | |||
| 36 | void EmitLoadSharedU128([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset) { | ||
| 37 | throw NotImplementedException("GLASM instruction"); | ||
| 38 | } | ||
| 39 | |||
| 40 | void EmitWriteSharedU8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset, | ||
| 41 | [[maybe_unused]] ScalarU32 value) { | ||
| 42 | throw NotImplementedException("GLASM instruction"); | ||
| 43 | } | ||
| 44 | |||
| 45 | void EmitWriteSharedU16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset, | ||
| 46 | [[maybe_unused]] ScalarU32 value) { | ||
| 47 | throw NotImplementedException("GLASM instruction"); | ||
| 48 | } | ||
| 49 | |||
| 50 | void EmitWriteSharedU32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset, | ||
| 51 | [[maybe_unused]] ScalarU32 value) { | ||
| 52 | ctx.Add("STS.U32 {},shared_mem[{}];", value, offset); | ||
| 53 | } | ||
| 54 | |||
| 55 | void EmitWriteSharedU64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset, | ||
| 56 | [[maybe_unused]] Register value) { | ||
| 57 | ctx.Add("STS.U64 {},shared_mem[{}];", value, offset); | ||
| 58 | } | ||
| 59 | |||
| 60 | void EmitWriteSharedU128([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarU32 offset, | ||
| 61 | [[maybe_unused]] Register value) { | ||
| 62 | throw NotImplementedException("GLASM instruction"); | ||
| 63 | } | ||
| 64 | } // namespace Shader::Backend::GLASM | ||