From a0c697124ced080f58866825e2e323e8682bbd7f Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 3 Jan 2023 10:01:25 -0500 Subject: Video_core: Address feedback --- src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/shader_recompiler/backend/glsl') 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); } -- cgit v1.2.3