diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-07-26 03:04:53 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:28 +0100 |
commit | c15332c44fa50dc44e2ebd1a682048f1e30dc136 (patch) | |
tree | 9229d46e1274a541aa1b15b6b2f31512b49fb784 /src/shader_recompiler/backend/glasm | |
parent | texture_cache: Add image getters (diff) | |
download | yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.tar yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.tar.gz yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.tar.bz2 yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.tar.lz yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.tar.xz yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.tar.zst yuzu-c15332c44fa50dc44e2ebd1a682048f1e30dc136.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glasm')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_image.cpp | 8 | ||||
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_instructions.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp index 09e3a9b82..583ed3cf2 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_image.cpp @@ -608,6 +608,14 @@ void EmitImageWrite(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Re ctx.Add("STOREIM.{} {},{},{},{};", format, image, color, coord, type); } +void EmitIsTextureScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& index) { + if (!index.IsImmediate()) { + throw NotImplementedException("Non-constant texture rescaling"); + } + UNIMPLEMENTED(); + ctx.Add("MOV.S {}.x,-1;", inst); +} + void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Register coord, ScalarU32 value) { ImageAtomic(ctx, inst, index, coord, 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 4f8dd8e42..e2b7d601d 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h +++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h @@ -556,6 +556,7 @@ void EmitImageGradient(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, void EmitImageRead(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Register coord); void EmitImageWrite(EmitContext& ctx, IR::Inst& inst, const IR::Value& index, Register coord, Register color); +void EmitIsTextureScaled(EmitContext& ctx, IR::Inst& inst, const IR::Value& index); void EmitBindlessImageAtomicIAdd32(EmitContext&); void EmitBindlessImageAtomicSMin32(EmitContext&); void EmitBindlessImageAtomicUMin32(EmitContext&); |