diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 6 |
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, | |||
| 240 | case IR::Attribute::BaseVertex: | 240 | case IR::Attribute::BaseVertex: |
| 241 | ctx.AddF32("{}=itof(gl_BaseVertex);", inst); | 241 | ctx.AddF32("{}=itof(gl_BaseVertex);", inst); |
| 242 | break; | 242 | break; |
| 243 | case IR::Attribute::DrawID: | ||
| 244 | ctx.AddF32("{}=itof(gl_DrawID);", inst); | ||
| 245 | break; | ||
| 243 | default: | 246 | default: |
| 244 | throw NotImplementedException("Get attribute {}", attr); | 247 | throw NotImplementedException("Get attribute {}", attr); |
| 245 | } | 248 | } |
| @@ -262,6 +265,9 @@ void EmitGetAttributeU32(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, s | |||
| 262 | case IR::Attribute::BaseVertex: | 265 | case IR::Attribute::BaseVertex: |
| 263 | ctx.AddU32("{}=uint(gl_BaseVertex);", inst); | 266 | ctx.AddU32("{}=uint(gl_BaseVertex);", inst); |
| 264 | break; | 267 | break; |
| 268 | case IR::Attribute::DrawID: | ||
| 269 | ctx.AddU32("{}=uint(gl_DrawID);", inst); | ||
| 270 | break; | ||
| 265 | default: | 271 | default: |
| 266 | throw NotImplementedException("Get U32 attribute {}", attr); | 272 | throw NotImplementedException("Get U32 attribute {}", attr); |
| 267 | } | 273 | } |