diff options
author | Ilia Mirkin <[email protected]> | 2016-01-22 13:07:10 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-01-26 12:36:15 -0500 |
commit | 38c63abf09eaab9e2023d86b918784cd25cc0bc5 (patch) | |
tree | 6cfa57b0f34704f13e5ad4bf5fd68bd15b47e193 /src/compiler/glsl/builtin_variables.cpp | |
parent | eb63640c1d38a200a7b1540405051d3ff79d0d8a (diff) |
glsl: add GL_OES_geometry_point_size and conditionalize gl_PointSize
For now this will be enabled in tandem with GL_OES_geometry_shader.
Should a driver come along that wants to separate them out, another
enable can be added.
Also adds the missed GL_OES_geometry_shader define in glcpp.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marta Lofstedt <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_variables.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index ccc04c00cea..25d92cc691b 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1201,7 +1201,12 @@ builtin_variable_generator::generate_varyings() /* gl_Position and gl_PointSize are not visible from fragment shaders. */ if (state->stage != MESA_SHADER_FRAGMENT) { add_varying(VARYING_SLOT_POS, vec4_t, "gl_Position"); - add_varying(VARYING_SLOT_PSIZ, float_t, "gl_PointSize"); + if (!state->es_shader || + state->stage == MESA_SHADER_VERTEX || + (state->stage == MESA_SHADER_GEOMETRY && + state->OES_geometry_point_size_enable)) { + add_varying(VARYING_SLOT_PSIZ, float_t, "gl_PointSize"); + } } if (state->is_version(130, 0)) { |