summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-12-06 22:32:59 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-01-01 22:43:58 +0100
commit8d694701bcd97c3766692dff2a9b4ec2f3a64ebd (patch)
tree6fe6f656a60c830c1114e4da806359ca1b649009 /src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
parentVulkan: Add other additional pipeline specs (diff)
downloadyuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.tar
yuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.tar.gz
yuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.tar.bz2
yuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.tar.lz
yuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.tar.xz
yuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.tar.zst
yuzu-8d694701bcd97c3766692dff2a9b4ec2f3a64ebd.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 39579cf5d..25106da67 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
@@ -234,6 +234,12 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
case IR::Attribute::FrontFace:
ctx.AddF32("{}=itof(gl_FrontFacing?-1:0);", inst);
break;
+ case IR::Attribute::BaseInstance:
+ ctx.AddF32("{}=itof(gl_BaseInstance);", inst);
+ break;
+ case IR::Attribute::BaseVertex:
+ ctx.AddF32("{}=itof(gl_BaseVertex);", inst);
+ break;
default:
throw NotImplementedException("Get attribute {}", attr);
}
@@ -250,6 +256,12 @@ void EmitGetAttributeU32(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, s
case IR::Attribute::VertexId:
ctx.AddU32("{}=uint(gl_VertexID);", inst);
break;
+ case IR::Attribute::BaseInstance:
+ ctx.AddU32("{}=uint(gl_BaseInstance);", inst);
+ break;
+ case IR::Attribute::BaseVertex:
+ ctx.AddU32("{}=uint(gl_BaseVertex);", inst);
+ break;
default:
throw NotImplementedException("Get U32 attribute {}", attr);
}