summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-04-19 21:33:23 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commit7018e524f5e6217b3259333acc4ea09ad036d331 (patch)
tree58e750b08d48e018accc4de9a05cb483d825904c /src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
parentspirv: Fix ViewportMask (diff)
downloadyuzu-7018e524f5e6217b3259333acc4ea09ad036d331.tar
yuzu-7018e524f5e6217b3259333acc4ea09ad036d331.tar.gz
yuzu-7018e524f5e6217b3259333acc4ea09ad036d331.tar.bz2
yuzu-7018e524f5e6217b3259333acc4ea09ad036d331.tar.lz
yuzu-7018e524f5e6217b3259333acc4ea09ad036d331.tar.xz
yuzu-7018e524f5e6217b3259333acc4ea09ad036d331.tar.zst
yuzu-7018e524f5e6217b3259333acc4ea09ad036d331.zip
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
index 7bf828995..8849258e3 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp
@@ -64,16 +64,16 @@ void EmitLoadGlobalS16(EmitContext&) {
throw NotImplementedException("SPIR-V Instruction");
}
-void EmitLoadGlobal32(EmitContext&) {
- throw NotImplementedException("SPIR-V Instruction");
+Id EmitLoadGlobal32(EmitContext& ctx, Id address) {
+ return ctx.OpFunctionCall(ctx.U32[1], ctx.load_global_func_u32, address);
}
-void EmitLoadGlobal64(EmitContext&) {
- throw NotImplementedException("SPIR-V Instruction");
+Id EmitLoadGlobal64(EmitContext& ctx, Id address) {
+ return ctx.OpFunctionCall(ctx.U32[2], ctx.load_global_func_u32x2, address);
}
-void EmitLoadGlobal128(EmitContext&) {
- throw NotImplementedException("SPIR-V Instruction");
+Id EmitLoadGlobal128(EmitContext& ctx, Id address) {
+ return ctx.OpFunctionCall(ctx.U32[4], ctx.load_global_func_u32x4, address);
}
void EmitWriteGlobalU8(EmitContext&) {
@@ -92,16 +92,16 @@ void EmitWriteGlobalS16(EmitContext&) {
throw NotImplementedException("SPIR-V Instruction");
}
-void EmitWriteGlobal32(EmitContext&) {
- throw NotImplementedException("SPIR-V Instruction");
+void EmitWriteGlobal32(EmitContext& ctx, Id address, Id value) {
+ ctx.OpFunctionCall(ctx.void_id, ctx.write_global_func_u32, address, value);
}
-void EmitWriteGlobal64(EmitContext&) {
- throw NotImplementedException("SPIR-V Instruction");
+void EmitWriteGlobal64(EmitContext& ctx, Id address, Id value) {
+ ctx.OpFunctionCall(ctx.void_id, ctx.write_global_func_u32x2, address, value);
}
-void EmitWriteGlobal128(EmitContext&) {
- throw NotImplementedException("SPIR-V Instruction");
+void EmitWriteGlobal128(EmitContext& ctx, Id address, Id value) {
+ ctx.OpFunctionCall(ctx.void_id, ctx.write_global_func_u32x4, address, value);
}
Id EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {