From c8db4f437a5e7ae74f0236c47fbe485f4659c653 Mon Sep 17 00:00:00 2001 From: ZhiqianXia Date: Sun, 7 Feb 2021 17:20:14 +0800 Subject: [PATCH 1/3] Cannot specify atomic counter with location. Signed-off-by: ZhiqianXia --- glslang/MachineIndependent/ParseHelper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 8927b823..f8a663c5 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -5767,6 +5767,8 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb error(loc, "can only specify on a uniform block", "push_constant", ""); if (qualifier.isShaderRecord()) error(loc, "can only specify on a buffer block", "shaderRecordNV", ""); + if (qualifier.hasLocation() && type.isAtomic()) + error(loc, "cannot specify atomic counter with location","atomic",""); } break; default: From 29b2a08133e7ca753881028a53c5281599ea0db0 Mon Sep 17 00:00:00 2001 From: ZhiqianXia Date: Tue, 9 Feb 2021 09:39:40 +0800 Subject: [PATCH 2/3] Cannot specify atomic counter with location. Signed-off-by: ZhiqianXia --- glslang/MachineIndependent/ParseHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index f8a663c5..9ffa298e 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -5767,8 +5767,8 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb error(loc, "can only specify on a uniform block", "push_constant", ""); if (qualifier.isShaderRecord()) error(loc, "can only specify on a buffer block", "shaderRecordNV", ""); - if (qualifier.hasLocation() && type.isAtomic()) - error(loc, "cannot specify atomic counter with location","atomic",""); + if (qualifier.hasLocation() && type.isAtomic()) + error(loc, "cannot specify on atomic counter", "atomic_uint", ""); } break; default: From 5100efdfa9e0ad8ee71eb41238a16746dd3dd76c Mon Sep 17 00:00:00 2001 From: ZhiqianXia Date: Tue, 9 Feb 2021 09:42:48 +0800 Subject: [PATCH 3/3] Cannot specify atomic counter with location. Signed-off-by: ZhiqianXia --- glslang/MachineIndependent/ParseHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 9ffa298e..581ef9f2 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -5768,7 +5768,7 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb if (qualifier.isShaderRecord()) error(loc, "can only specify on a buffer block", "shaderRecordNV", ""); if (qualifier.hasLocation() && type.isAtomic()) - error(loc, "cannot specify on atomic counter", "atomic_uint", ""); + error(loc, "cannot specify on atomic counter", "location", ""); } break; default: