glsl: Expose gl_PointSize if OES/EXT_tessellation_point_size is enabled.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 27 May 2016 18:12:45 +0000 (11:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Aug 2016 16:59:03 +0000 (09:59 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/builtin_variables.cpp

index 20d1d75..c9d8b1c 100644 (file)
@@ -1263,7 +1263,11 @@ builtin_variable_generator::generate_varyings()
       if (!state->es_shader ||
           state->stage == MESA_SHADER_VERTEX ||
           (state->stage == MESA_SHADER_GEOMETRY &&
-           state->OES_geometry_point_size_enable)) {
+           state->OES_geometry_point_size_enable) ||
+          ((state->stage == MESA_SHADER_TESS_CTRL ||
+            state->stage == MESA_SHADER_TESS_EVAL) &&
+           (state->OES_tessellation_point_size_enable ||
+            state->EXT_tessellation_point_size_enable))) {
          add_varying(VARYING_SLOT_PSIZ, float_t, "gl_PointSize");
       }
    }