Hash :
25a22dec
Author :
Date :
2025-02-24T14:32:42
Manual roll VK-GL-CTS from 69ec1790cb7c to ba86fb950043 (18 revisions) https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS.git/+log/69ec1790cb7c..ba86fb950043 2025-02-21 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-cts-4.6.6 into vk-gl-cts/main 2025-02-21 lorenzo@khronosgroup.org Merge vk-gl-cts/opengl-es-cts-3.2.12 into vk-gl-cts/main 2025-02-21 rgarcia@igalia.com Test "remaining array layers" and cube images with HIC 2025-02-21 javed@igalia.com Add coverage for tess shader IO 2025-02-21 marcin.zajac@cognizant.com Complex acceleration structure updates 2025-02-21 jbolz@nvidia.com Add tests for VK_NV_cooperative_vector 2025-02-21 syoussefi@google.com Remove last references to DE_NULL 2025-02-21 abdolrashidi@google.com Fix non-zero offset added to nullptr 2025-02-21 zzoon@igalia.com Vulkan Video Decode: Increase MAX_BOUND_MEMORY 2025-02-21 lionel.g.landwerlin@intel.com Fix incorrect structure type check 2025-02-21 gleese@broadcom.com Fix test data generation for copy tests 2025-02-21 javed@igalia.com Add tests for differing mutable format 2025-02-21 gleese@broadcom.com Stop querying device address from unbound buffers 2025-02-21 scerveau@igalia.com video: rename clip description names 2025-02-21 kamil.goras@mobica.com Add test that redeclaring gl_FragDepth is not permitted in ES 2025-02-21 kamil.goras@mobica.com Fix KHR-GLES31.core.nearest_edge.* tests that fail with EXT_read_format_bgra formats. If BGRA format and type 1_5_5_5 are preffered by device use BGRA_EXT and UNSIGNED_SHORT_1_5_5_5_REV_EXT in ReadPixels and swizzle colors. 2025-02-21 mateusz.bahyrycz@mobica.com Add support for sparse mode for ray tracing utils 2025-02-21 lorenzo@khronosgroup.org Merge vk-gl-cts/vulkan-cts-1.4.1 into vk-gl-cts/main If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/vk-gl-cts-angle-autoroll Please CC angle-team@google.com,yuxinhu@google.com on the revert to ensure that a human is aware of the problem. To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Bug: b/398956813 Tbr: yuxinhu@google.com Change-Id: I8d2de8b6f8671b5cf66d6b4210877ca8f187528b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6298534 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Auto-Submit: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
/*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* 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 Executor which can run randomly accessed tests.
*//*--------------------------------------------------------------------*/
#include "tcuRandomOrderExecutor.h"
#include "deClock.h"
#include "deStringUtil.hpp"
#include "tcuCommandLine.hpp"
#include "tcuTestLog.hpp"
#include <algorithm>
#include <cstdio>
#include <fstream>
using std::string;
using std::vector;
namespace tcu
{
RandomOrderExecutor::RandomOrderExecutor(TestPackageRoot &root,
TestContext &testCtx,
bool enableRenderDocCapture)
: m_testCtx(testCtx), m_inflater(testCtx)
{
m_nodeStack.push_back(NodeStackEntry(&root));
root.getChildren(m_nodeStack[0].children);
if (enableRenderDocCapture)
{
mRenderDoc.attach();
}
}
RandomOrderExecutor::~RandomOrderExecutor(void)
{
pruneStack(1);
}
void RandomOrderExecutor::pruneStack(size_t newStackSize)
{
// \note Root is not managed by us
DE_ASSERT(de::inRange(newStackSize, size_t(1), m_nodeStack.size()));
while (m_nodeStack.size() > newStackSize)
{
NodeStackEntry &curEntry = m_nodeStack.back();
const bool isPkg = curEntry.node->getNodeType() == NODETYPE_PACKAGE;
DE_ASSERT((m_nodeStack.size() == 2) == isPkg);
if (curEntry.node) // Just in case we are in
// cleanup path after partial
// prune
{
if (curEntry.node->getNodeType() == NODETYPE_GROUP)
m_inflater.leaveGroupNode(static_cast<TestCaseGroup *>(curEntry.node));
else if (curEntry.node->getNodeType() == NODETYPE_PACKAGE)
m_inflater.leaveTestPackage(static_cast<TestPackage *>(curEntry.node));
else
DE_ASSERT(curEntry.children.empty());
curEntry.node = nullptr;
curEntry.children.clear();
}
if (isPkg)
m_caseExecutor.clear();
m_nodeStack.pop_back();
}
}
static TestNode *findNodeByName(vector<TestNode *> &nodes, const std::string &name)
{
for (vector<TestNode *>::const_iterator node = nodes.begin(); node != nodes.end(); ++node)
{
if (name == (*node)->getName())
return *node;
}
return nullptr;
}
TestCase *RandomOrderExecutor::seekToCase(const string &path)
{
const vector<string> components = de::splitString(path, '.');
size_t compNdx;
DE_ASSERT(!m_nodeStack.empty() && m_nodeStack.front().node->getNodeType() == NODETYPE_ROOT);
for (compNdx = 0; compNdx < components.size(); compNdx++)
{
const size_t stackPos = compNdx + 1;
if (stackPos >= m_nodeStack.size())
break; // Stack end
else if (components[compNdx] != m_nodeStack[stackPos].node->getName())
{
// Current stack doesn't match any more, prune.
pruneStack(stackPos);
break;
}
}
DE_ASSERT(m_nodeStack.size() == compNdx + 1);
for (; compNdx < components.size(); compNdx++)
{
const size_t parentStackPos = compNdx;
TestNode *const curNode =
findNodeByName(m_nodeStack[parentStackPos].children, components[compNdx]);
if (!curNode)
throw Exception(string("Test hierarchy node not found: ") + path);
m_nodeStack.push_back(NodeStackEntry(curNode));
if (curNode->getNodeType() == NODETYPE_PACKAGE)
{
TestPackage *const testPackage = static_cast<TestPackage *>(curNode);
m_inflater.enterTestPackage(testPackage, m_nodeStack.back().children);
DE_ASSERT(!m_caseExecutor);
m_caseExecutor = de::MovePtr<TestCaseExecutor>(testPackage->createExecutor());
}
else if (curNode->getNodeType() == NODETYPE_GROUP)
m_inflater.enterGroupNode(static_cast<TestCaseGroup *>(curNode),
m_nodeStack.back().children);
else if (compNdx + 1 != components.size())
throw Exception(string("Invalid test hierarchy path: ") + path);
}
DE_ASSERT(m_nodeStack.size() == components.size() + 1);
if (isTestNodeTypeExecutable(m_nodeStack.back().node->getNodeType()))
return dynamic_cast<TestCase *>(m_nodeStack.back().node);
else
throw Exception(string("Not a test case: ") + path);
}
static qpTestCaseType nodeTypeToTestCaseType(TestNodeType nodeType)
{
switch (nodeType)
{
case NODETYPE_SELF_VALIDATE:
return QP_TEST_CASE_TYPE_SELF_VALIDATE;
case NODETYPE_PERFORMANCE:
return QP_TEST_CASE_TYPE_PERFORMANCE;
case NODETYPE_CAPABILITY:
return QP_TEST_CASE_TYPE_CAPABILITY;
case NODETYPE_ACCURACY:
return QP_TEST_CASE_TYPE_ACCURACY;
default:
DE_ASSERT(false);
return QP_TEST_CASE_TYPE_LAST;
}
}
TestStatus RandomOrderExecutor::execute(const std::string &casePath)
{
TestCase *const testCase = seekToCase(casePath);
TestLog &log = m_testCtx.getLog();
const qpTestCaseType caseType = nodeTypeToTestCaseType(testCase->getNodeType());
m_testCtx.setTerminateAfter(false);
log.startCase(casePath.c_str(), caseType);
{
const TestStatus result = executeInner(testCase, casePath);
log.endCase(result.getCode(), result.getDescription().c_str());
return result;
}
}
tcu::TestStatus RandomOrderExecutor::executeInner(TestCase *testCase, const std::string &casePath)
{
TestLog &log = m_testCtx.getLog();
const uint64_t testStartTime = deGetMicroseconds();
m_testCtx.setTestResult(QP_TEST_RESULT_LAST, "");
// Initialize, will return immediately if fails
try
{
mRenderDoc.startFrame();
m_caseExecutor->init(testCase, casePath);
}
catch (const std::bad_alloc &)
{
m_testCtx.setTerminateAfter(true);
return TestStatus(QP_TEST_RESULT_RESOURCE_ERROR,
"Failed to allocate memory in test case init");
}
catch (const TestException &e)
{
DE_ASSERT(e.getTestResult() != QP_TEST_RESULT_LAST);
m_testCtx.setTerminateAfter(e.isFatal());
log << e;
return TestStatus(e.getTestResult(), e.getMessage());
}
catch (const Exception &e)
{
log << e;
return TestStatus(QP_TEST_RESULT_FAIL, e.getMessage());
}
bool isFirstFrameBeingCaptured = true;
// Execute
for (;;)
{
TestCase::IterateResult iterateResult = TestCase::STOP;
m_testCtx.touchWatchdog();
try
{
// Make every iteration produce one renderdoc frame. Include the init code in the first
// frame, and the deinit code in the last frame.
if (!isFirstFrameBeingCaptured)
{
mRenderDoc.endFrame();
mRenderDoc.startFrame();
}
isFirstFrameBeingCaptured = false;
iterateResult = m_caseExecutor->iterate(testCase);
}
catch (const std::bad_alloc &)
{
m_testCtx.setTestResult(QP_TEST_RESULT_RESOURCE_ERROR,
"Failed to allocate memory during test "
"execution");
}
catch (const TestException &e)
{
log << e;
m_testCtx.setTestResult(e.getTestResult(), e.getMessage());
m_testCtx.setTerminateAfter(e.isFatal());
}
catch (const Exception &e)
{
log << e;
m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, e.getMessage());
}
if (iterateResult == TestCase::STOP)
break;
}
DE_ASSERT(m_testCtx.getTestResult() != QP_TEST_RESULT_LAST);
if (m_testCtx.getTestResult() == QP_TEST_RESULT_RESOURCE_ERROR)
m_testCtx.setTerminateAfter(true);
// De-initialize
try
{
m_caseExecutor->deinit(testCase);
mRenderDoc.endFrame();
}
catch (const tcu::Exception &e)
{
log << e << TestLog::Message
<< "Error in test case deinit, test program "
"will terminate."
<< TestLog::EndMessage;
m_testCtx.setTerminateAfter(true);
}
if (m_testCtx.getWatchDog())
qpWatchDog_reset(m_testCtx.getWatchDog());
{
const TestStatus result =
TestStatus(m_testCtx.getTestResult(), m_testCtx.getTestResultDesc());
m_testCtx.setTestResult(QP_TEST_RESULT_LAST, "");
return result;
}
}
} // namespace tcu