aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2016-10-07 08:23:41 +0300
committerTapani Pälli <[email protected]>2016-10-10 07:29:31 +0300
commitd997d5c0c9e9c70a95f0c84255feec8e2963ef20 (patch)
tree2727b25d10b8eaa456be38ce466d4f8a8efdad2e /src
parentc64093e7d5da5d652017f57876036088c1ae1451 (diff)
glsl: prohibit lowp, mediump precision on atomic_uint
Fixes following dEQP tests: dEQP-GLES31.functional.debug.negative_coverage.callbacks.atomic_counter.atomic_precision dEQP-GLES31.functional.debug.negative_coverage.get_error.atomic_counter.atomic_precision dEQP-GLES31.functional.debug.negative_coverage.log.atomic_counter.atomic_precision Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98131 Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 8cdb9171515..c3c8cef3277 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -2585,6 +2585,20 @@ select_gles_precision(unsigned qual_precision,
type->name);
}
}
+
+
+ /* Section 4.1.7.3 (Atomic Counters) of the GLSL ES 3.10 spec says:
+ *
+ * "The default precision of all atomic types is highp. It is an error to
+ * declare an atomic type with a different precision or to specify the
+ * default precision for an atomic type to be lowp or mediump."
+ */
+ if (type->base_type == GLSL_TYPE_ATOMIC_UINT &&
+ precision != ast_precision_high) {
+ _mesa_glsl_error(loc, state,
+ "atomic_uint can only have highp precision qualifier");
+ }
+
return precision;
}