Commit 2ba626dc by Jamie Madill Committed by Commit Bot

Work around dEQP KHR-GLES31 bug with tess/geom support.

dEQP was inadvertendly requiring the presence of these extensions to even run the tests. There's a WIP fix to the dEQP tests and this CL implements that fix as a temporary workaround until we can update dEQP. Fixes several tests in KHR-GLES31.core.constant_expressions and KHR-GLES31.core.shader_macros. They now correctly return unsupported. Bug: angleproject:4143 Change-Id: I110beb2f18fd29f8f02b2ab166cfcfcfae80c2c1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1924620Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 10f41ebb
...@@ -910,7 +910,11 @@ deqp_khr_common_sources = [ ...@@ -910,7 +910,11 @@ deqp_khr_common_sources = [
"$deqp_path/external/openglcts/modules/common/glcSampleVariablesTests.hpp", "$deqp_path/external/openglcts/modules/common/glcSampleVariablesTests.hpp",
"$deqp_path/external/openglcts/modules/common/glcSeparableProgramsTransformFeedbackTests.cpp", "$deqp_path/external/openglcts/modules/common/glcSeparableProgramsTransformFeedbackTests.cpp",
"$deqp_path/external/openglcts/modules/common/glcSeparableProgramsTransformFeedbackTests.hpp", "$deqp_path/external/openglcts/modules/common/glcSeparableProgramsTransformFeedbackTests.hpp",
"$deqp_path/external/openglcts/modules/common/glcShaderConstExprTests.cpp",
# Override to work around a dEQP bug: https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/1859
# "$deqp_path/external/openglcts/modules/common/glcShaderConstExprTests.cpp",
"deqp_support/glcShaderConstExprTests_override.cpp",
"$deqp_path/external/openglcts/modules/common/glcShaderConstExprTests.hpp", "$deqp_path/external/openglcts/modules/common/glcShaderConstExprTests.hpp",
"$deqp_path/external/openglcts/modules/common/glcShaderGroupVoteTests.cpp", "$deqp_path/external/openglcts/modules/common/glcShaderGroupVoteTests.cpp",
"$deqp_path/external/openglcts/modules/common/glcShaderGroupVoteTests.hpp", "$deqp_path/external/openglcts/modules/common/glcShaderGroupVoteTests.hpp",
...@@ -924,7 +928,11 @@ deqp_khr_common_sources = [ ...@@ -924,7 +928,11 @@ deqp_khr_common_sources = [
"$deqp_path/external/openglcts/modules/common/glcShaderLibraryCase.hpp", "$deqp_path/external/openglcts/modules/common/glcShaderLibraryCase.hpp",
"$deqp_path/external/openglcts/modules/common/glcShaderLoopTests.cpp", "$deqp_path/external/openglcts/modules/common/glcShaderLoopTests.cpp",
"$deqp_path/external/openglcts/modules/common/glcShaderLoopTests.hpp", "$deqp_path/external/openglcts/modules/common/glcShaderLoopTests.hpp",
"$deqp_path/external/openglcts/modules/common/glcShaderMacroTests.cpp",
# Override to work around a dEQP bug: https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/1859
# "$deqp_path/external/openglcts/modules/common/glcShaderMacroTests.cpp",
"deqp_support/glcShaderMacroTests_override.cpp",
"$deqp_path/external/openglcts/modules/common/glcShaderMacroTests.hpp", "$deqp_path/external/openglcts/modules/common/glcShaderMacroTests.hpp",
"$deqp_path/external/openglcts/modules/common/glcShaderMultisampleInterpolationTests.cpp", "$deqp_path/external/openglcts/modules/common/glcShaderMultisampleInterpolationTests.cpp",
"$deqp_path/external/openglcts/modules/common/glcShaderMultisampleInterpolationTests.hpp", "$deqp_path/external/openglcts/modules/common/glcShaderMultisampleInterpolationTests.hpp",
......
...@@ -68,13 +68,6 @@ ...@@ -68,13 +68,6 @@
3569 VULKAN : KHR-GLES31.core.shader_bitfield_operation.usubBorrow.* = SKIP 3569 VULKAN : KHR-GLES31.core.shader_bitfield_operation.usubBorrow.* = SKIP
3569 VULKAN : KHR-GLES31.core.shader_bitfield_operation.umulExtended.* = SKIP 3569 VULKAN : KHR-GLES31.core.shader_bitfield_operation.umulExtended.* = SKIP
3569 VULKAN : KHR-GLES31.core.shader_bitfield_operation.imulExtended.* = SKIP 3569 VULKAN : KHR-GLES31.core.shader_bitfield_operation.imulExtended.* = SKIP
/// Crash due to missing unsupported check in dEQP
3571 VULKAN : KHR-GLES31.core.shader_macros*_geometry = SKIP
3571 VULKAN : KHR-GLES31.core.shader_macros*_tess_control = SKIP
3571 VULKAN : KHR-GLES31.core.shader_macros*_tess_eval = SKIP
3571 VULKAN : KHR-GLES31.core.constant_expressions.*geometry = SKIP
3571 VULKAN : KHR-GLES31.core.constant_expressions.*tess_control = SKIP
3571 VULKAN : KHR-GLES31.core.constant_expressions.*tess_eval = SKIP
3520 VULKAN : KHR-GLES31.core.vertex_attrib_binding* = SKIP 3520 VULKAN : KHR-GLES31.core.vertex_attrib_binding* = SKIP
3520 VULKAN : KHR-GLES31.core.internalformat.texture2d.* = FAIL 3520 VULKAN : KHR-GLES31.core.internalformat.texture2d.* = FAIL
......
/*-------------------------------------------------------------------------
* OpenGL Conformance Test Suite
* -----------------------------
*
* Copyright (c) 2017 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/ /*!
* \file
* \brief
*/ /*-------------------------------------------------------------------*/
#include "deSharedPtr.hpp"
#include "glcShaderMacroTests.hpp"
#include "glsShaderExecUtil.hpp"
#include "gluContextInfo.hpp"
#include "tcuTestLog.hpp"
namespace glcts
{
using tcu::TestLog;
using namespace deqp::gls::ShaderExecUtil;
class ExecutorTestCase : public deqp::TestCase
{
public:
ExecutorTestCase(deqp::Context &context,
const char *name,
glu::ShaderType shaderType,
const ShaderSpec &shaderSpec,
int expectedOutput);
virtual ~ExecutorTestCase(void);
virtual tcu::TestNode::IterateResult iterate(void);
protected:
glu::ShaderType m_shaderType;
ShaderSpec m_shaderSpec;
int m_expectedOutput;
};
ExecutorTestCase::ExecutorTestCase(deqp::Context &context,
const char *name,
glu::ShaderType shaderType,
const ShaderSpec &shaderSpec,
int expectedOutput)
: deqp::TestCase(context, name, ""),
m_shaderType(shaderType),
m_shaderSpec(shaderSpec),
m_expectedOutput(expectedOutput)
{}
ExecutorTestCase::~ExecutorTestCase(void) {}
tcu::TestNode::IterateResult ExecutorTestCase::iterate(void)
{
de::SharedPtr<ShaderExecutor> executor(
createExecutor(m_context.getRenderContext(), m_shaderType, m_shaderSpec));
DE_ASSERT(executor.get());
executor->log(m_context.getTestContext().getLog());
if (!executor->isOk())
TCU_FAIL("Compilation failed");
executor->useProgram();
int result = 0;
void *const outputs = &result;
executor->execute(1, DE_NULL, &outputs);
if (m_expectedOutput == result)
{
m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
return tcu::TestNode::STOP;
}
m_context.getTestContext().getLog()
<< tcu::TestLog::Message << "Expected: " << m_expectedOutput
<< " but test returned: " << result << tcu::TestLog::EndMessage;
m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail");
return tcu::TestNode::STOP;
}
ShaderMacroTests::ShaderMacroTests(deqp::Context &context)
: TestCaseGroup(context, "shader_macros", "Shader Macro tests")
{}
ShaderMacroTests::~ShaderMacroTests() {}
void ShaderMacroTests::init(void)
{
const char *fragmentPrecisionShaderTemplate =
"out0 = 0;\n"
"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
"out0 = 1;\n"
"#endif\n";
glu::ContextType contextType = m_context.getRenderContext().getType();
ShaderSpec shaderSpec;
shaderSpec.version = glu::getContextTypeGLSLVersion(contextType);
shaderSpec.source = fragmentPrecisionShaderTemplate;
shaderSpec.outputs.push_back(Symbol("out0", glu::VarType(glu::TYPE_INT, glu::PRECISION_HIGHP)));
std::vector<glu::ShaderType> shaderTypes;
shaderTypes.push_back(glu::SHADERTYPE_VERTEX);
shaderTypes.push_back(glu::SHADERTYPE_FRAGMENT);
if (glu::contextSupports(contextType, glu::ApiType::es(3, 2)))
{
shaderSpec.version = glu::GLSL_VERSION_320_ES;
shaderTypes.push_back(glu::SHADERTYPE_GEOMETRY);
shaderTypes.push_back(glu::SHADERTYPE_TESSELLATION_CONTROL);
shaderTypes.push_back(glu::SHADERTYPE_TESSELLATION_EVALUATION);
}
else if (glu::contextSupports(contextType, glu::ApiType::es(3, 1)))
{
shaderSpec.version = glu::GLSL_VERSION_310_ES;
shaderTypes.push_back(glu::SHADERTYPE_GEOMETRY);
shaderTypes.push_back(glu::SHADERTYPE_TESSELLATION_CONTROL);
shaderTypes.push_back(glu::SHADERTYPE_TESSELLATION_EVALUATION);
}
for (std::size_t typeIndex = 0; typeIndex < shaderTypes.size(); ++typeIndex)
{
glu::ShaderType shaderType = shaderTypes[typeIndex];
std::string caseName("fragment_precision_high_");
caseName += getShaderTypeName(shaderType);
addChild(new ExecutorTestCase(m_context, caseName.c_str(), shaderType, shaderSpec, 1));
}
}
} // namespace glcts
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