summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-27 06:55:37 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:24 +0200
commitf0031babeb3ed04aef2468840aa37f4da13b2524 (patch)
treea92a4009b4405325d78731fd31abb9ca626ba5ef /src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
parentshader: Fix structured control flow on KIL instructions (diff)
downloadyuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.tar
yuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.tar.gz
yuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.tar.bz2
yuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.tar.lz
yuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.tar.xz
yuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.tar.zst
yuzu-f0031babeb3ed04aef2468840aa37f4da13b2524.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
index 8fc040f8b..6fa16eb80 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
@@ -156,6 +156,10 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr) {
return ctx.OpISub(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.vertex_index),
ctx.OpLoad(ctx.U32[1], ctx.base_vertex));
}
+ case IR::Attribute::FrontFace:
+ return ctx.OpSelect(ctx.U32[1], ctx.OpLoad(ctx.U1, ctx.front_face),
+ ctx.Constant(ctx.U32[1], std::numeric_limits<u32>::max()),
+ ctx.u32_zero_value);
default:
throw NotImplementedException("Read attribute {}", attr);
}