summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-15 23:15:50 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commit1f3446b47e2945d2a7a18082e21bc417156c91d3 (patch)
treed0e4ddd98779ef1479dd43f81dfa6427fc76eaa7 /src/shader_recompiler/backend
parentglasm: Add Void type to GLASM values (diff)
downloadyuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.tar
yuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.tar.gz
yuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.tar.bz2
yuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.tar.lz
yuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.tar.xz
yuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.tar.zst
yuzu-1f3446b47e2945d2a7a18082e21bc417156c91d3.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp9
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
index de0be7aed..2de7fb9cc 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
@@ -54,7 +54,7 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
if (IR::IsGeneric(attr)) {
const u32 index{IR::GenericAttributeIndex(attr)};
const u32 element{IR::GenericAttributeElement(attr)};
- ctx.Add("MOV.F {}.x,in_attr{}.{};", inst, index, "xyzw"[element]);
+ ctx.Add("MOV.F {}.x,in_attr{}[0].{};", inst, index, "xyzw"[element]);
return;
}
throw NotImplementedException("Get attribute {}", attr);
@@ -66,7 +66,7 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, ScalarF32 value,
const char swizzle{"xyzw"[element]};
if (IR::IsGeneric(attr)) {
const u32 index{IR::GenericAttributeIndex(attr)};
- ctx.Add("MOV.F out_attr{}.{},{};", index, swizzle, value);
+ ctx.Add("MOV.F out_attr{}[0].{},{};", index, swizzle, value);
return;
}
switch (attr) {
@@ -100,9 +100,8 @@ void EmitSetPatch([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Patch
throw NotImplementedException("GLASM instruction");
}
-void EmitSetFragColor([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] u32 index,
- [[maybe_unused]] u32 component, [[maybe_unused]] ScalarF32 value) {
- throw NotImplementedException("GLASM instruction");
+void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, ScalarF32 value) {
+ ctx.Add("MOV.F frag_color{}.{},{};", index, "xyzw"[component], value);
}
void EmitSetSampleMask([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) {
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 ae1735c8f..388b7eb02 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
@@ -49,7 +49,7 @@ void EmitJoin(EmitContext& ctx) {
}
void EmitDemoteToHelperInvocation(EmitContext& ctx) {
- NotImplemented();
+ ctx.Add("KIL TR.x;");
}
void EmitBarrier(EmitContext& ctx) {