summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-21 02:54:02 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:32 +0200
commit394b96a2fe0fb7c93052f043383889e46ff6202a (patch)
treed19c015f419e7723770d01768a054be32f18cbee /src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp
parentglasm: Fix tessellation input attributes (diff)
downloadyuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.tar
yuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.tar.gz
yuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.tar.bz2
yuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.tar.lz
yuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.tar.xz
yuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.tar.zst
yuzu-394b96a2fe0fb7c93052f043383889e46ff6202a.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp12
1 files changed, 12 insertions, 0 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 7a084508d..b64025420 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
@@ -121,6 +121,18 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, ScalarF32 value,
case IR::Attribute::PositionW:
ctx.Add("MOV.F result.position.{},{};", swizzle, value);
break;
+ case IR::Attribute::ClipDistance0:
+ case IR::Attribute::ClipDistance1:
+ case IR::Attribute::ClipDistance2:
+ case IR::Attribute::ClipDistance3:
+ case IR::Attribute::ClipDistance4:
+ case IR::Attribute::ClipDistance5:
+ case IR::Attribute::ClipDistance6:
+ case IR::Attribute::ClipDistance7: {
+ const u32 index{static_cast<u32>(attr) - static_cast<u32>(IR::Attribute::ClipDistance0)};
+ ctx.Add("MOV.F result.clip[{}].x,{};", index, value);
+ break;
+ }
case IR::Attribute::ViewportIndex:
if (ctx.stage == Stage::Geometry || ctx.profile.support_viewport_index_layer_non_geometry) {
ctx.Add("MOV.F result.viewport.x,{};", value);