summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-31 01:21:30 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:37 +0200
commit8ec0028e687f0ace26e0a4abf8ffbe1abb19653d (patch)
tree6d28ebc2067f811814eeb9e18836ab1915cf8e28 /src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
parentglsl: Rework var alloc to not assign unused results (diff)
downloadyuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.tar
yuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.tar.gz
yuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.tar.bz2
yuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.tar.lz
yuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.tar.xz
yuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.tar.zst
yuzu-8ec0028e687f0ace26e0a4abf8ffbe1abb19653d.zip
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
index 8688686e8..8f5f94752 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
@@ -186,6 +186,18 @@ void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view val
case IR::Attribute::PositionW:
ctx.Add("gl_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("gl_ClipDistance[{}]={};", index, value);
+ break;
+ }
default:
fmt::print("Set attribute {}", attr);
throw NotImplementedException("Set attribute {}", attr);