Commit 9041ca0c by Shahbaz Youssefi Committed by Commit Bot

Limit testing of in-progress work to ANGLE's build of dEQP

A new feature is added, exposeNonConformantExtensionsAndVersions, which is set by ANGLE's build of dEQP to allow exposing ES3.2 or extensions that are not yet entirely conformant. This would allow ANGLE to expose WIP extensions for regression testing without affecting partners that test ANGLE with dEQP's standalone build. Bug: angleproject:3647 Change-Id: Id1e6219f26b41d3f8cdc9763131b8052227761c5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552926 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarSunny Sun <sunny.sun@arm.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 5fac02c8
......@@ -446,6 +446,14 @@ struct FeaturesVk : FeatureSetBase
"forceDriverUniformOverSpecConst", FeatureCategory::VulkanWorkarounds,
"Forces using driver uniforms instead of specialization constants.", &members,
"http://issuetracker.google.com/173636783"};
// Whether non-conformant configurations and extensions should be exposed. When an extension is
// in development, or a GLES version is not supported on a device, we may still want to expose
// them for partial testing. This feature is enabled by our test harness.
Feature exposeNonConformantExtensionsAndVersions = {
"exposeNonConformantExtensionsAndVersions", FeatureCategory::VulkanWorkarounds,
"Expose GLES versions and extensions that are not conformant.", &members,
"http://anglebug.com/5375"};
};
inline FeaturesVk::FeaturesVk() = default;
......
......@@ -1619,6 +1619,10 @@ gl::Version RendererVk::getMaxSupportedESVersion() const
}
// TODO: more extension checks for 3.2. http://anglebug.com/5366
if (!mFeatures.exposeNonConformantExtensionsAndVersions.enabled)
{
maxVersion = LimitVersionTo(maxVersion, {3, 1});
}
// Limit to ES3.0 if there are any blockers for 3.1.
......
......@@ -174,6 +174,15 @@ bool GetTextureSRGBOverrideSupport(const RendererVk *rendererVk,
return true;
}
bool HasTexelBufferSupport(const RendererVk *rendererVk, GLenum formatGL)
{
const vk::Format &formatVk = rendererVk->getFormat(formatGL);
return rendererVk->hasBufferFormatFeatureBits(
formatVk.vkBufferFormat,
VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT | VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT);
}
bool HasTextureBufferSupport(const RendererVk *rendererVk)
{
// The following formats don't have mandatory UNIFORM_TEXEL_BUFFER support in Vulkan.
......@@ -219,27 +228,40 @@ bool HasTextureBufferSupport(const RendererVk *rendererVk)
// VK_FORMAT_R32G32B32A32_SFLOAT
//
// TODO: RGB32 formats currently don't have STORAGE_TEXEL_BUFFER support on any known platform.
// Despite this limitation, we expose EXT_texture_buffer. http://anglebug.com/3573
const std::array<GLenum, 12> &optionalFormats = {
GL_R8, GL_R8I, GL_R8UI, GL_RG8, GL_RG8I, GL_RG8UI,
GL_R16F, GL_R16I, GL_R16UI, GL_RG16F, GL_RG16I, GL_RG16UI,
// GL_RGB32F,
// GL_RGB32I,
// GL_RGB32UI,
};
for (GLenum formatGL : optionalFormats)
{
const vk::Format &formatVk = rendererVk->getFormat(formatGL);
if (!HasTexelBufferSupport(rendererVk, formatGL))
{
return false;
}
}
if (!rendererVk->hasBufferFormatFeatureBits(formatVk.vkBufferFormat,
VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT |
VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
// TODO: RGB32 formats currently don't have STORAGE_TEXEL_BUFFER support on any known platform.
// Despite this limitation, we expose EXT_texture_buffer. http://anglebug.com/3573
if (rendererVk->getFeatures().exposeNonConformantExtensionsAndVersions.enabled)
{
return true;
}
const std::array<GLenum, 3> &optionalFormats2 = {
GL_RGB32F,
GL_RGB32I,
GL_RGB32UI,
};
for (GLenum formatGL : optionalFormats2)
{
if (!HasTexelBufferSupport(rendererVk, formatGL))
{
return false;
}
}
return true;
}
} // namespace
......
......@@ -428,25 +428,24 @@ ANGLENativeDisplayFactory::ANGLENativeDisplayFactory(
continue;
}
const char **preRotationFeatures =
const char **enabledFeatures =
reinterpret_cast<const char **>(mPlatformAttributes[attrIndex + 1]);
DE_ASSERT(preRotationFeatures != nullptr && preRotationFeatures[0] != nullptr);
DE_ASSERT(enabledFeatures != nullptr && *enabledFeatures != nullptr);
if (strcmp(preRotationFeatures[0], "emulatedPrerotation90") == 0)
for (; *enabledFeatures; ++enabledFeatures)
{
if (strcmp(enabledFeatures[0], "emulatedPrerotation90") == 0)
{
preRotation = 90;
}
else if (strcmp(preRotationFeatures[0], "emulatedPrerotation180") == 0)
else if (strcmp(enabledFeatures[0], "emulatedPrerotation180") == 0)
{
preRotation = 180;
}
else if (strcmp(preRotationFeatures[0], "emulatedPrerotation270") == 0)
else if (strcmp(enabledFeatures[0], "emulatedPrerotation270") == 0)
{
preRotation = 270;
}
else
{
DE_ASSERT(DE_FALSE);
}
break;
}
......
......@@ -38,6 +38,10 @@ ANGLEPlatform::ANGLEPlatform(angle::LogErrorFunc logErrorFunc, uint32_t preRotat
mPlatformMethods.logError = logErrorFunc;
// Enable non-conformant ES versions and extensions for testing. Our test expectations would
// suppress failing tests, but allowing continuous testing of the pieces that are implemented.
mEnableFeatureOverrides.push_back("exposeNonConformantExtensionsAndVersions");
// Create pre-rotation attributes.
switch (preRotation)
{
......@@ -53,10 +57,8 @@ ANGLEPlatform::ANGLEPlatform(angle::LogErrorFunc logErrorFunc, uint32_t preRotat
default:
break;
}
if (!mEnableFeatureOverrides.empty())
{
mEnableFeatureOverrides.push_back(nullptr);
}
#if (DE_OS == DE_OS_WIN32)
{
......
......@@ -252,6 +252,9 @@ static void LogGles31Capabilities(std::ostream &stream)
static void LogGles32Capabilities(std::ostream &stream)
{
// Most of these capabilities are not implemented yet.
ANGLE_SKIP_TEST_IF(IsVulkan());
QUERY_AND_LOG_CAPABILITY(GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS, stream);
QUERY_AND_LOG_CAPABILITY(GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS, stream);
QUERY_AND_LOG_CAPABILITY(GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS, stream);
......@@ -483,4 +486,4 @@ TEST_P(EGLPrintEGLinfoTest, PrintConfigInfo)
}
}
ANGLE_INSTANTIATE_TEST(EGLPrintEGLinfoTest, ES2_VULKAN(), ES3_VULKAN());
ANGLE_INSTANTIATE_TEST(EGLPrintEGLinfoTest, ES2_VULKAN(), ES3_VULKAN(), ES32_VULKAN());
......@@ -795,6 +795,21 @@ PlatformParameters ES31_VULKAN_SWIFTSHADER()
return PlatformParameters(3, 1, egl_platform::VULKAN_SWIFTSHADER());
}
PlatformParameters ES32_VULKAN()
{
return PlatformParameters(3, 2, egl_platform::VULKAN());
}
PlatformParameters ES32_VULKAN_NULL()
{
return PlatformParameters(3, 2, egl_platform::VULKAN_NULL());
}
PlatformParameters ES32_VULKAN_SWIFTSHADER()
{
return PlatformParameters(3, 2, egl_platform::VULKAN_SWIFTSHADER());
}
PlatformParameters ES1_METAL()
{
return PlatformParameters(1, 0, egl_platform::METAL());
......
......@@ -178,6 +178,9 @@ PlatformParameters ES3_VULKAN_SWIFTSHADER();
PlatformParameters ES31_VULKAN();
PlatformParameters ES31_VULKAN_NULL();
PlatformParameters ES31_VULKAN_SWIFTSHADER();
PlatformParameters ES32_VULKAN();
PlatformParameters ES32_VULKAN_NULL();
PlatformParameters ES32_VULKAN_SWIFTSHADER();
PlatformParameters ES1_METAL();
PlatformParameters ES2_METAL();
......
......@@ -148,6 +148,8 @@ struct CombinedPrintToStringParamName
ES31_D3D11(), ES31_OPENGL(), ES31_OPENGLES(), ES31_VULKAN(), ES31_VULKAN_SWIFTSHADER(), \
WithAsyncCommandQueueFeatureVulkan(ES31_VULKAN())
#define ANGLE_ALL_TEST_PLATFORMS_ES32 ES32_VULKAN(), ES32_VULKAN_SWIFTSHADER()
#define ANGLE_ALL_TEST_PLATFORMS_NULL ES2_NULL(), ES3_NULL(), ES31_NULL()
// Instantiate the test once for each GLES1 platform
......
......@@ -243,30 +243,29 @@ bool EGLWindow::initializeDisplay(OSWindow *osWindow,
enabledFeatureOverrides.push_back("force_buffer_gpu_storage_mtl");
}
if (!disabledFeatureOverrides.empty())
{
if (strstr(extensionString, "EGL_ANGLE_feature_control") == nullptr)
const bool hasFeatureControlANGLE =
strstr(extensionString, "EGL_ANGLE_feature_control") != nullptr;
if (!hasFeatureControlANGLE &&
(!enabledFeatureOverrides.empty() || !disabledFeatureOverrides.empty()))
{
fprintf(stderr, "Missing EGL_ANGLE_feature_control.\n");
destroyGL();
return false;
}
if (!disabledFeatureOverrides.empty())
{
disabledFeatureOverrides.push_back(nullptr);
displayAttributes.push_back(EGL_FEATURE_OVERRIDES_DISABLED_ANGLE);
displayAttributes.push_back(reinterpret_cast<EGLAttrib>(disabledFeatureOverrides.data()));
}
if (!enabledFeatureOverrides.empty())
{
if (strstr(extensionString, "EGL_ANGLE_feature_control") == nullptr)
if (hasFeatureControlANGLE)
{
fprintf(stderr, "Missing EGL_ANGLE_feature_control.\n");
destroyGL();
return false;
}
// Always enable exposeNonConformantExtensionsAndVersions in ANGLE tests.
enabledFeatureOverrides.push_back("exposeNonConformantExtensionsAndVersions");
enabledFeatureOverrides.push_back(nullptr);
displayAttributes.push_back(EGL_FEATURE_OVERRIDES_ENABLED_ANGLE);
......
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