diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | 9 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp | 2 |
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, | |||
| 54 | if (IR::IsGeneric(attr)) { | 54 | if (IR::IsGeneric(attr)) { |
| 55 | const u32 index{IR::GenericAttributeIndex(attr)}; | 55 | const u32 index{IR::GenericAttributeIndex(attr)}; |
| 56 | const u32 element{IR::GenericAttributeElement(attr)}; | 56 | const u32 element{IR::GenericAttributeElement(attr)}; |
| 57 | ctx.Add("MOV.F {}.x,in_attr{}.{};", inst, index, "xyzw"[element]); | 57 | ctx.Add("MOV.F {}.x,in_attr{}[0].{};", inst, index, "xyzw"[element]); |
| 58 | return; | 58 | return; |
| 59 | } | 59 | } |
| 60 | throw NotImplementedException("Get attribute {}", attr); | 60 | throw NotImplementedException("Get attribute {}", attr); |
| @@ -66,7 +66,7 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, ScalarF32 value, | |||
| 66 | const char swizzle{"xyzw"[element]}; | 66 | const char swizzle{"xyzw"[element]}; |
| 67 | if (IR::IsGeneric(attr)) { | 67 | if (IR::IsGeneric(attr)) { |
| 68 | const u32 index{IR::GenericAttributeIndex(attr)}; | 68 | const u32 index{IR::GenericAttributeIndex(attr)}; |
| 69 | ctx.Add("MOV.F out_attr{}.{},{};", index, swizzle, value); | 69 | ctx.Add("MOV.F out_attr{}[0].{},{};", index, swizzle, value); |
| 70 | return; | 70 | return; |
| 71 | } | 71 | } |
| 72 | switch (attr) { | 72 | switch (attr) { |
| @@ -100,9 +100,8 @@ void EmitSetPatch([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Patch | |||
| 100 | throw NotImplementedException("GLASM instruction"); | 100 | throw NotImplementedException("GLASM instruction"); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | void EmitSetFragColor([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] u32 index, | 103 | void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, ScalarF32 value) { |
| 104 | [[maybe_unused]] u32 component, [[maybe_unused]] ScalarF32 value) { | 104 | ctx.Add("MOV.F frag_color{}.{},{};", index, "xyzw"[component], value); |
| 105 | throw NotImplementedException("GLASM instruction"); | ||
| 106 | } | 105 | } |
| 107 | 106 | ||
| 108 | void EmitSetSampleMask([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] ScalarF32 value) { | 107 | 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) { | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void EmitDemoteToHelperInvocation(EmitContext& ctx) { | 51 | void EmitDemoteToHelperInvocation(EmitContext& ctx) { |
| 52 | NotImplemented(); | 52 | ctx.Add("KIL TR.x;"); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | void EmitBarrier(EmitContext& ctx) { | 55 | void EmitBarrier(EmitContext& ctx) { |