Commit 8d63a7fc by Shahbaz Youssefi Committed by Commit Bot

Basic support for running deqp khr gles32 tests

Bug: angleproject:3647 Change-Id: Ia707ffcd41926662d1513f1a3bf49149b76f6b9c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2544920 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 8b76d37f
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// Version number for shader translation API. // Version number for shader translation API.
// It is incremented every time the API changes. // It is incremented every time the API changes.
#define ANGLE_SH_VERSION 242 #define ANGLE_SH_VERSION 243
enum ShShaderSpec enum ShShaderSpec
{ {
...@@ -39,6 +39,8 @@ enum ShShaderSpec ...@@ -39,6 +39,8 @@ enum ShShaderSpec
SH_GLES3_1_SPEC, SH_GLES3_1_SPEC,
SH_WEBGL3_SPEC, SH_WEBGL3_SPEC,
SH_GLES3_2_SPEC,
SH_GL_CORE_SPEC, SH_GL_CORE_SPEC,
SH_GL_COMPATIBILITY_SPEC, SH_GL_COMPATIBILITY_SPEC,
}; };
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
"src/compiler/translator/glslang.l": "src/compiler/translator/glslang.l":
"a04170178bdc8511bff69ec4ff144576", "a04170178bdc8511bff69ec4ff144576",
"src/compiler/translator/glslang.y": "src/compiler/translator/glslang.y":
"c1d34ba544f4d09ced2a4b322d2a8735", "d614cbc19923d104c98e3a5f8770b5be",
"src/compiler/translator/glslang_lex_autogen.cpp": "src/compiler/translator/glslang_lex_autogen.cpp":
"5d6469e58f9855f93987b5ddbd663920", "5d6469e58f9855f93987b5ddbd663920",
"src/compiler/translator/glslang_tab_autogen.cpp": "src/compiler/translator/glslang_tab_autogen.cpp":
"76e7733c73e84c3b5de389a146a70743", "a93ca4c95c635f4154e41586911d0182",
"src/compiler/translator/glslang_tab_autogen.h": "src/compiler/translator/glslang_tab_autogen.h":
"840c12db9f7824afd05b5306c8816d95", "840c12db9f7824afd05b5306c8816d95",
"tools/flex-bison/linux/bison.sha1": "tools/flex-bison/linux/bison.sha1":
......
...@@ -219,6 +219,8 @@ int GetMaxShaderVersionForSpec(ShShaderSpec spec) ...@@ -219,6 +219,8 @@ int GetMaxShaderVersionForSpec(ShShaderSpec spec)
case SH_GLES3_1_SPEC: case SH_GLES3_1_SPEC:
case SH_WEBGL3_SPEC: case SH_WEBGL3_SPEC:
return 310; return 310;
case SH_GLES3_2_SPEC:
return 320;
case SH_GL_CORE_SPEC: case SH_GL_CORE_SPEC:
case SH_GL_COMPATIBILITY_SPEC: case SH_GL_COMPATIBILITY_SPEC:
return 460; return 460;
...@@ -452,7 +454,7 @@ bool TCompiler::checkShaderVersion(TParseContext *parseContext) ...@@ -452,7 +454,7 @@ bool TCompiler::checkShaderVersion(TParseContext *parseContext)
} }
else else
{ {
ASSERT(mShaderVersion == 310); ASSERT(mShaderVersion == 310 || mShaderVersion == 320);
if (!parseContext->checkCanUseExtension(sh::TSourceLoc(), if (!parseContext->checkCanUseExtension(sh::TSourceLoc(),
TExtension::EXT_geometry_shader)) TExtension::EXT_geometry_shader))
{ {
......
...@@ -198,7 +198,8 @@ void TDirectiveHandler::handleVersion(const angle::pp::SourceLocation &loc, ...@@ -198,7 +198,8 @@ void TDirectiveHandler::handleVersion(const angle::pp::SourceLocation &loc,
int version, int version,
ShShaderSpec spec) ShShaderSpec spec)
{ {
if (((version == 100 || version == 300 || version == 310) && !IsDesktopGLSpec(spec)) || if (((version == 100 || version == 300 || version == 310 || version == 320) &&
!IsDesktopGLSpec(spec)) ||
IsDesktopGLSpec(spec)) IsDesktopGLSpec(spec))
{ {
mShaderVersion = version; mShaderVersion = version;
......
...@@ -151,9 +151,9 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons ...@@ -151,9 +151,9 @@ extern void yyerror(YYLTYPE* yylloc, TParseContext* context, void *scanner, cons
} \ } \
} while (0) } while (0)
#define ES3_1_ONLY(TOKEN, LINE, REASON) do { \ #define ES3_1_OR_NEWER(TOKEN, LINE, REASON) do { \
if (context->getShaderVersion() != 310) { \ if (context->getShaderVersion() < 310) { \
context->error(LINE, REASON " supported in GLSL ES 3.10 only", TOKEN); \ context->error(LINE, REASON " supported in GLSL ES 3.10 and above only", TOKEN); \
} \ } \
} while (0) } while (0)
%} %}
...@@ -868,14 +868,14 @@ storage_qualifier ...@@ -868,14 +868,14 @@ storage_qualifier
$$ = new TStorageQualifierWrapper(EvqCentroid, @1); $$ = new TStorageQualifierWrapper(EvqCentroid, @1);
} }
| PATCH { | PATCH {
ES3_1_ONLY("patch", @1, "storage qualifier"); ES3_1_OR_NEWER("patch", @1, "storage qualifier");
$$ = new TStorageQualifierWrapper(EvqPatch, @1); $$ = new TStorageQualifierWrapper(EvqPatch, @1);
} }
| UNIFORM { | UNIFORM {
$$ = context->parseGlobalStorageQualifier(EvqUniform, @1); $$ = context->parseGlobalStorageQualifier(EvqUniform, @1);
} }
| BUFFER { | BUFFER {
ES3_1_ONLY("buffer", @1, "storage qualifier"); ES3_1_OR_NEWER("buffer", @1, "storage qualifier");
$$ = context->parseGlobalStorageQualifier(EvqBuffer, @1); $$ = context->parseGlobalStorageQualifier(EvqBuffer, @1);
} }
| READONLY { | READONLY {
...@@ -977,12 +977,12 @@ array_specifier ...@@ -977,12 +977,12 @@ array_specifier
$$->push_back(size); $$->push_back(size);
} }
| array_specifier LEFT_BRACKET RIGHT_BRACKET { | array_specifier LEFT_BRACKET RIGHT_BRACKET {
ES3_1_ONLY("[]", @2, "arrays of arrays"); ES3_1_OR_NEWER("[]", @2, "arrays of arrays");
$$ = $1; $$ = $1;
$$->insert($$->begin(), 0u); $$->insert($$->begin(), 0u);
} }
| array_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET { | array_specifier LEFT_BRACKET constant_expression RIGHT_BRACKET {
ES3_1_ONLY("[]", @2, "arrays of arrays"); ES3_1_OR_NEWER("[]", @2, "arrays of arrays");
$$ = $1; $$ = $1;
unsigned int size = context->checkIsValidArraySize(@2, $3); unsigned int size = context->checkIsValidArraySize(@2, $3);
// Make the type an array even if size check failed. // Make the type an array even if size check failed.
......
...@@ -461,13 +461,13 @@ extern void yyerror(YYLTYPE *yylloc, TParseContext *context, void *scanner, cons ...@@ -461,13 +461,13 @@ extern void yyerror(YYLTYPE *yylloc, TParseContext *context, void *scanner, cons
} \ } \
} while (0) } while (0)
#define ES3_1_ONLY(TOKEN, LINE, REASON) \ #define ES3_1_OR_NEWER(TOKEN, LINE, REASON) \
do \ do \
{ \ { \
if (context->getShaderVersion() != 310) \ if (context->getShaderVersion() < 310) \
{ \ { \
context->error(LINE, REASON " supported in GLSL ES 3.10 only", TOKEN); \ context->error(LINE, REASON " supported in GLSL ES 3.10 and above only", TOKEN); \
} \ } \
} while (0) } while (0)
#ifdef short #ifdef short
...@@ -3670,7 +3670,7 @@ yyreduce: ...@@ -3670,7 +3670,7 @@ yyreduce:
case 142: case 142:
{ {
ES3_1_ONLY("patch", (yylsp[0]), "storage qualifier"); ES3_1_OR_NEWER("patch", (yylsp[0]), "storage qualifier");
(yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqPatch, (yylsp[0])); (yyval.interm.qualifierWrapper) = new TStorageQualifierWrapper(EvqPatch, (yylsp[0]));
} }
...@@ -3688,7 +3688,7 @@ yyreduce: ...@@ -3688,7 +3688,7 @@ yyreduce:
case 144: case 144:
{ {
ES3_1_ONLY("buffer", (yylsp[0]), "storage qualifier"); ES3_1_OR_NEWER("buffer", (yylsp[0]), "storage qualifier");
(yyval.interm.qualifierWrapper) = (yyval.interm.qualifierWrapper) =
context->parseGlobalStorageQualifier(EvqBuffer, (yylsp[0])); context->parseGlobalStorageQualifier(EvqBuffer, (yylsp[0]));
} }
...@@ -3898,7 +3898,7 @@ yyreduce: ...@@ -3898,7 +3898,7 @@ yyreduce:
case 167: case 167:
{ {
ES3_1_ONLY("[]", (yylsp[-1]), "arrays of arrays"); ES3_1_OR_NEWER("[]", (yylsp[-1]), "arrays of arrays");
(yyval.interm.arraySizes) = (yyvsp[-2].interm.arraySizes); (yyval.interm.arraySizes) = (yyvsp[-2].interm.arraySizes);
(yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), 0u); (yyval.interm.arraySizes)->insert((yyval.interm.arraySizes)->begin(), 0u);
} }
...@@ -3908,7 +3908,7 @@ yyreduce: ...@@ -3908,7 +3908,7 @@ yyreduce:
case 168: case 168:
{ {
ES3_1_ONLY("[]", (yylsp[-2]), "arrays of arrays"); ES3_1_OR_NEWER("[]", (yylsp[-2]), "arrays of arrays");
(yyval.interm.arraySizes) = (yyvsp[-3].interm.arraySizes); (yyval.interm.arraySizes) = (yyvsp[-3].interm.arraySizes);
unsigned int size = unsigned int size =
context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode)); context->checkIsValidArraySize((yylsp[-2]), (yyvsp[-1].interm.intermTypedNode));
......
...@@ -37,13 +37,17 @@ ShShaderSpec SelectShaderSpec(GLint majorVersion, ...@@ -37,13 +37,17 @@ ShShaderSpec SelectShaderSpec(GLint majorVersion,
if (majorVersion >= 3) if (majorVersion >= 3)
{ {
if (minorVersion == 1) switch (minorVersion)
{ {
return isWebGL ? SH_WEBGL3_SPEC : SH_GLES3_1_SPEC; case 2:
} ASSERT(!isWebGL);
else return SH_GLES3_2_SPEC;
{ case 1:
return isWebGL ? SH_WEBGL2_SPEC : SH_GLES3_SPEC; return isWebGL ? SH_WEBGL3_SPEC : SH_GLES3_1_SPEC;
case 0:
return isWebGL ? SH_WEBGL2_SPEC : SH_GLES3_SPEC;
default:
UNREACHABLE();
} }
} }
......
...@@ -1621,7 +1621,7 @@ std::string RendererVk::getRendererDescription() const ...@@ -1621,7 +1621,7 @@ std::string RendererVk::getRendererDescription() const
gl::Version RendererVk::getMaxSupportedESVersion() const gl::Version RendererVk::getMaxSupportedESVersion() const
{ {
// Current highest supported version // Current highest supported version
gl::Version maxVersion = gl::Version(3, 1); gl::Version maxVersion = gl::Version(3, 2);
// Early out without downgrading ES version if mock ICD enabled. // Early out without downgrading ES version if mock ICD enabled.
// Mock ICD doesn't expose sufficient capabilities yet. // Mock ICD doesn't expose sufficient capabilities yet.
...@@ -1637,6 +1637,8 @@ gl::Version RendererVk::getMaxSupportedESVersion() const ...@@ -1637,6 +1637,8 @@ gl::Version RendererVk::getMaxSupportedESVersion() const
maxVersion = LimitVersionTo(maxVersion, {3, 1}); maxVersion = LimitVersionTo(maxVersion, {3, 1});
} }
// TODO: more extension checks for 3.2. http://anglebug.com/5366
// Limit to ES3.0 if there are any blockers for 3.1. // Limit to ES3.0 if there are any blockers for 3.1.
// ES3.1 requires at least one atomic counter buffer and four storage buffers in compute. // ES3.1 requires at least one atomic counter buffer and four storage buffers in compute.
......
...@@ -1484,7 +1484,7 @@ Error ValidateCreateContext(Display *display, ...@@ -1484,7 +1484,7 @@ Error ValidateCreateContext(Display *display,
} }
break; break;
case 3: case 3:
if (clientMinorVersion != 0 && clientMinorVersion != 1) if (clientMinorVersion < 0 || clientMinorVersion > 2)
{ {
return EglBadAttribute(); return EglBadAttribute();
} }
......
...@@ -1338,6 +1338,11 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -1338,6 +1338,11 @@ if (build_angle_deqp_tests && !is_fuchsia) {
mustpass_name = "gles31-khr-master.txt" mustpass_name = "gles31-khr-master.txt"
} }
angle_deqp_khr_gtest("khr_gles32") {
defines = [ "ANGLE_DEQP_KHR_GLES32_TESTS" ]
mustpass_name = "gles32-khr-master.txt"
}
template("angle_deqp_rotate_gtest") { template("angle_deqp_rotate_gtest") {
split_target = string_split(target_name, "_") split_target = string_split(target_name, "_")
_api = split_target[0] _api = split_target[0]
......
...@@ -77,6 +77,7 @@ const char *gCaseListFiles[] = { ...@@ -77,6 +77,7 @@ const char *gCaseListFiles[] = {
OPENGL_CTS_DIR("khronos_mustpass/master/gles2-khr-master.txt"), OPENGL_CTS_DIR("khronos_mustpass/master/gles2-khr-master.txt"),
OPENGL_CTS_DIR("khronos_mustpass/master/gles3-khr-master.txt"), OPENGL_CTS_DIR("khronos_mustpass/master/gles3-khr-master.txt"),
OPENGL_CTS_DIR("khronos_mustpass/master/gles31-khr-master.txt"), OPENGL_CTS_DIR("khronos_mustpass/master/gles31-khr-master.txt"),
OPENGL_CTS_DIR("khronos_mustpass/master/gles32-khr-master.txt"),
OPENGL_CTS_DIR("aosp_mustpass/master/gles3-rotate-landscape.txt"), OPENGL_CTS_DIR("aosp_mustpass/master/gles3-rotate-landscape.txt"),
OPENGL_CTS_DIR("aosp_mustpass/master/gles3-rotate-reverse-portrait.txt"), OPENGL_CTS_DIR("aosp_mustpass/master/gles3-rotate-reverse-portrait.txt"),
OPENGL_CTS_DIR("aosp_mustpass/master/gles3-rotate-reverse-landscape.txt"), OPENGL_CTS_DIR("aosp_mustpass/master/gles3-rotate-reverse-landscape.txt"),
...@@ -91,10 +92,10 @@ const char *gTestExpectationsFiles[] = { ...@@ -91,10 +92,10 @@ const char *gTestExpectationsFiles[] = {
"deqp_gles2_test_expectations.txt", "deqp_gles3_test_expectations.txt", "deqp_gles2_test_expectations.txt", "deqp_gles3_test_expectations.txt",
"deqp_gles31_test_expectations.txt", "deqp_egl_test_expectations.txt", "deqp_gles31_test_expectations.txt", "deqp_egl_test_expectations.txt",
"deqp_khr_gles2_test_expectations.txt", "deqp_khr_gles3_test_expectations.txt", "deqp_khr_gles2_test_expectations.txt", "deqp_khr_gles3_test_expectations.txt",
"deqp_khr_gles31_test_expectations.txt", "deqp_gles3_rotate_test_expectations.txt", "deqp_khr_gles31_test_expectations.txt", "deqp_khr_gles32_test_expectations.txt",
"deqp_gles3_rotate_test_expectations.txt", "deqp_gles3_rotate_test_expectations.txt", "deqp_gles3_rotate_test_expectations.txt", "deqp_gles3_rotate_test_expectations.txt",
"deqp_gles3_rotate_test_expectations.txt", "deqp_gles31_rotate_test_expectations.txt",
"deqp_gles31_rotate_test_expectations.txt", "deqp_gles31_rotate_test_expectations.txt", "deqp_gles31_rotate_test_expectations.txt", "deqp_gles31_rotate_test_expectations.txt",
"deqp_gles31_rotate_test_expectations.txt",
}; };
using APIInfo = std::pair<const char *, GPUTestConfig::API>; using APIInfo = std::pair<const char *, GPUTestConfig::API>;
...@@ -617,28 +618,32 @@ ANGLE_INSTANTIATE_DEQP_TEST_CASE(KHR_GLES3, 5); ...@@ -617,28 +618,32 @@ ANGLE_INSTANTIATE_DEQP_TEST_CASE(KHR_GLES3, 5);
ANGLE_INSTANTIATE_DEQP_TEST_CASE(KHR_GLES31, 6); ANGLE_INSTANTIATE_DEQP_TEST_CASE(KHR_GLES31, 6);
#endif #endif
#ifdef ANGLE_DEQP_KHR_GLES32_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(KHR_GLES32, 7);
#endif
#ifdef ANGLE_DEQP_GLES3_ROTATE90_TESTS #ifdef ANGLE_DEQP_GLES3_ROTATE90_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES3_ROTATE90, 7); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES3_ROTATE90, 8);
#endif #endif
#ifdef ANGLE_DEQP_GLES3_ROTATE180_TESTS #ifdef ANGLE_DEQP_GLES3_ROTATE180_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES3_ROTATE180, 8); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES3_ROTATE180, 9);
#endif #endif
#ifdef ANGLE_DEQP_GLES3_ROTATE270_TESTS #ifdef ANGLE_DEQP_GLES3_ROTATE270_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES3_ROTATE270, 9); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES3_ROTATE270, 10);
#endif #endif
#ifdef ANGLE_DEQP_GLES31_ROTATE90_TESTS #ifdef ANGLE_DEQP_GLES31_ROTATE90_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES31_ROTATE90, 10); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES31_ROTATE90, 11);
#endif #endif
#ifdef ANGLE_DEQP_GLES31_ROTATE180_TESTS #ifdef ANGLE_DEQP_GLES31_ROTATE180_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES31_ROTATE180, 11); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES31_ROTATE180, 12);
#endif #endif
#ifdef ANGLE_DEQP_GLES31_ROTATE270_TESTS #ifdef ANGLE_DEQP_GLES31_ROTATE270_TESTS
ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES31_ROTATE270, 12); ANGLE_INSTANTIATE_DEQP_TEST_CASE(GLES31_ROTATE270, 13);
#endif #endif
void HandleDisplayType(const char *displayTypeString) void HandleDisplayType(const char *displayTypeString)
......
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// See README.md for format.
// For now we only log Vulkan test expectations. More back-ends can follow as we need them.
3523 VULKAN : * = SKIP
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment