Module: Mesa
Branch: master
Commit: 493237d4eed9d4e89af6a3262c6481f7794142a1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=493237d4eed9d4e89af6a3262c6481f7794142a1

Author: Kenneth Graunke <kenn...@whitecape.org>
Date:   Wed Oct  5 16:09:54 2016 -0700

glsl: Drop the ES requirement that VS outputs must be flat qualified.

Several conformance tests violate this requirement:

ES31-CTS.core.tessellation_shader.max_patch_vertices
ES31-CTS.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through

I submitted a merge request to fix the conformance tests, but Khronos
opted to drop this GLSL ES specific requirement in favor of making flat
qualification of VS outputs optional, matching modern desktop GL.

Note that there were 7 Piglit tests which enforce this rule:
tests/spec/glsl-es-3.00/compiler/interpolation/qualifiers/*nonflat*
but these were deleted in Piglit commit acc0a2fabbd714bc704c16f1675e7c0.

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15465#c7
Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arc...@collabora.com>

---

 src/compiler/glsl/ast_to_hir.cpp | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index c3c8cef..6e2f253 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -2986,14 +2986,10 @@ validate_interpolation_qualifier(struct 
_mesa_glsl_parse_state *state,
    if (state->is_version(130, 300)
        && var_type->contains_integer()
        && interpolation != INTERP_MODE_FLAT
-       && ((state->stage == MESA_SHADER_FRAGMENT && mode == ir_var_shader_in)
-           || (state->stage == MESA_SHADER_VERTEX && mode == ir_var_shader_out
-               && state->es_shader))) {
-      const char *shader_var_type = (state->stage == MESA_SHADER_VERTEX) ?
-         "vertex output" : "fragment input";
-      _mesa_glsl_error(loc, state, "if a %s is (or contains) "
-                       "an integer, then it must be qualified with 'flat'",
-                       shader_var_type);
+       && state->stage == MESA_SHADER_FRAGMENT
+       && mode == ir_var_shader_in) {
+      _mesa_glsl_error(loc, state, "if a fragment input is (or contains) "
+                       "an integer, then it must be qualified with 'flat'");
    }
 
    /* Double fragment inputs must be qualified with 'flat'.

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to