summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-01-03 16:01:25 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-01-04 20:39:42 +0100
commita0c697124ced080f58866825e2e323e8682bbd7f (patch)
tree73830fc46134be10d7feffc3da11aa9f0ea58ffb /src/shader_recompiler/backend/glsl
parentTexture Cache: Implement async texture downloads. (diff)
downloadyuzu-a0c697124ced080f58866825e2e323e8682bbd7f.tar
yuzu-a0c697124ced080f58866825e2e323e8682bbd7f.tar.gz
yuzu-a0c697124ced080f58866825e2e323e8682bbd7f.tar.bz2
yuzu-a0c697124ced080f58866825e2e323e8682bbd7f.tar.lz
yuzu-a0c697124ced080f58866825e2e323e8682bbd7f.tar.xz
yuzu-a0c697124ced080f58866825e2e323e8682bbd7f.tar.zst
yuzu-a0c697124ced080f58866825e2e323e8682bbd7f.zip
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp6
1 files changed, 6 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 25106da67..2e369ed72 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
@@ -240,6 +240,9 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
case IR::Attribute::BaseVertex:
ctx.AddF32("{}=itof(gl_BaseVertex);", inst);
break;
+ case IR::Attribute::DrawID:
+ ctx.AddF32("{}=itof(gl_DrawID);", inst);
+ break;
default:
throw NotImplementedException("Get attribute {}", attr);
}
@@ -262,6 +265,9 @@ void EmitGetAttributeU32(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, s
case IR::Attribute::BaseVertex:
ctx.AddU32("{}=uint(gl_BaseVertex);", inst);
break;
+ case IR::Attribute::DrawID:
+ ctx.AddU32("{}=uint(gl_DrawID);", inst);
+ break;
default:
throw NotImplementedException("Get U32 attribute {}", attr);
}