summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-09-14 16:13:43 -0400
committerIlia Mirkin <[email protected]>2015-11-12 17:58:23 -0500
commit20748318c5b870fc27f699637041e67a67321f5f (patch)
tree7711d20c03dc207c9224c8ddc49f0753ed0f0eb0 /src/glsl
parentb52cb9ec6ab3b74f754ccf8472b9db2b6d8c3333 (diff)
glsl: add gl_HelperInvocation system value
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/builtin_variables.cpp3
-rw-r--r--src/glsl/nir/shader_enums.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index c30fb9226e5..b06c1bc5c12 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -1059,6 +1059,9 @@ builtin_variable_generator::generate_fs_special_vars()
var = add_input(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex");
var->data.interpolation = INTERP_QUALIFIER_FLAT;
}
+
+ if (state->is_version(450, 310)/* || state->ARB_ES3_1_compatibility_enable*/)
+ add_system_value(SYSTEM_VALUE_HELPER_INVOCATION, bool_t, "gl_HelperInvocation");
}
diff --git a/src/glsl/nir/shader_enums.h b/src/glsl/nir/shader_enums.h
index d1cf7ca04cc..dd0e0bad806 100644
--- a/src/glsl/nir/shader_enums.h
+++ b/src/glsl/nir/shader_enums.h
@@ -396,6 +396,7 @@ typedef enum
SYSTEM_VALUE_SAMPLE_ID,
SYSTEM_VALUE_SAMPLE_POS,
SYSTEM_VALUE_SAMPLE_MASK_IN,
+ SYSTEM_VALUE_HELPER_INVOCATION,
/*@}*/
/**