summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-20 07:40:58 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:32 +0200
commit8fdb00a2b5fccb2378497dc7229639851c60f02b (patch)
tree49d3f45bfd14989d50cd7d3ed0d0cb336674b0f5 /src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
parentglasm: Implement ImageRead (diff)
downloadyuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.tar
yuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.tar.gz
yuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.tar.bz2
yuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.tar.lz
yuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.tar.xz
yuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.tar.zst
yuzu-8fdb00a2b5fccb2378497dc7229639851c60f02b.zip
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_image.cpp')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_image.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
index beee9cf06..ed0b65e16 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp
@@ -572,10 +572,13 @@ void EmitImageRead(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Reg
StoreSparse(ctx, sparse_inst);
}
-void EmitImageWrite([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
- [[maybe_unused]] const IR::Value& index, [[maybe_unused]] Register coord,
- [[maybe_unused]] Register color) {
- throw NotImplementedException("GLASM instruction");
+void EmitImageWrite(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Register coord,
+ Register color) {
+ const auto info{inst.Flags<IR::TextureInstInfo>()};
+ const std::string_view format{FormatStorage(info.image_format)};
+ const std::string_view type{TextureType(info)};
+ const std::string image{Image(ctx, info, index)};
+ ctx.Add("STOREIM.{} {},{},{},{};", format, image, color, coord, type);
}
void EmitBindlessImageSampleImplicitLod(EmitContext&) {