Branch
Hash :
81086a18
Author :
Date :
2024-07-23T15:51:35
Manual roll VK-GL-CTS from 5b2dfe7c775a to 5a542d2049d7 (1 revision) Manual roll requested by solti@google.com https://chromium.googlesource.com/external/github.com/KhronosGroup/VK-GL-CTS.git/+log/5b2dfe7c775a..5a542d2049d7 2024-07-19 marcin.hajder@mobica.com Port KC-CTS tests to VK-GL-CTS (CoverageGL21), PART 8 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,solti@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 Manual edits - Patchset 2: fetched the original roller generated CL - Patchset 3: added missing parts, and run "python3 scripts/run_code_generation.py" - Patchset 4: suppress the failures: KHR-GLES3.api.coverage and KHR-GL46.api.coverage. see https://anglebug.com/355292302 Bug: b/354737043 Bug: angleproject:355292302 Tbr: solti@google.com Change-Id: Ie38a65c6db0b3330e970971bd1325e3c419b6248 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5739577 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Solti Ho <solti@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
#!/usr/bin/python3
# Copyright 2019 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.
#
# Code generation for:
# - src/tests/deqp_support/BUILD.gn
# - src/tests/deqp_data.gni
# NOTE: don't run this script directly. Run scripts/run_code_generation.py.
import errno
import os
import sys
import shutil
def initDataDirectories(dataDirectories):
dataDirectories.append(os.path.join("data", "gles2"))
dataDirectories.append(os.path.join("data", "gles3"))
dataDirectories.append(os.path.join("data", "gles31"))
dataDirectories.append(os.path.join("external", "graphicsfuzz", "data", "gles3"))
dataDirectories.append(
os.path.join("external", "openglcts", "data", "gl_cts", "data", "common"))
dataDirectories.append(
os.path.join("external", "openglcts", "data", "gl_cts", "data", "gles3"))
dataDirectories.append(
os.path.join("external", "openglcts", "data", "gl_cts", "data", "gles31"))
dataDirectories.append(
os.path.join("external", "openglcts", "data", "gl_cts", "data", "gles32"))
def initPathReplacements(pathReplacements):
# The GraphicsFuzz data files need the 'external/graphicsfuzz/' prefix removed
pathToReplace = os.path.join("external", "graphicsfuzz", "") # Include trailing slash
pathReplacements[pathToReplace] = ""
# The KHR dEQP tests expect a root prefix of "gl_cts" for some reason.
pathToReplace = os.path.join("external", "openglcts", "") # Include trailing slash
pathReplacements[pathToReplace] = ""
def createBuildGnFile(buildGnPath):
# Cleanup the old file
if os.path.exists(buildGnPath):
os.remove(buildGnPath)
# Make the new one
return open(buildGnPath, "w+")
def createGniFile(gniFilename):
# Cleanup the old file
if os.path.exists(gniFilename):
os.remove(gniFilename)
# Make the new one
return open(gniFilename, "w+")
def writeFileHeader(fileIn):
templateFileHeader = """# GENERATED FILE - DO NOT EDIT.
# Generated by: {script_name}
#
# Copyright 2019 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.
"""
fileHeader = templateFileHeader.format(script_name=os.path.basename(__file__))
fileIn.write(fileHeader)
def fixDestinationDirectory(pathReplacements, relativeDirectory):
for pathReplacement in pathReplacements:
if pathReplacement in relativeDirectory:
return relativeDirectory.replace(pathReplacement, pathReplacements[pathReplacement])
return relativeDirectory
def convertPathToVarName(path):
return path.replace(os.sep, "_")
def getCMakeLists(deqpSrcDir):
cmakeLists = []
for root, directories, filenames in os.walk(deqpSrcDir):
for filename in filenames:
relativeDirectory = os.path.relpath(root, deqpSrcDir)
if filename == "CMakeLists.txt":
cmakeLists.append(os.path.join(relativeDirectory, filename))
return cmakeLists
def main():
# List of directories containing data files
dataDirectories = []
# List of directories to exclude from the copy
excludedDirectories = [
".git",
]
# List of files to exclude from the copy
excludedFilenames = [
"LICENSE",
]
# Dictionary of parts of paths that need to be replaced
# Key: Part of path to be replaced
# Value: What to replace it with
pathReplacements = {}
# List of unique relative directories for the copy() command outputs
relativeDirectories = []
# VK-GL-CTS source directory
deqpSourceDirectory = os.path.join("..", "third_party", "VK-GL-CTS", "src")
# Tests Directory
testsDirectory = os.path.join("..", "src", "tests")
# dEQP Support Directory
deqpSupportDirectory = "deqp_support"
# BUILD.gn file to write to
buildGnFilename = "BUILD.gn"
# Path to BUILD.gn
buildGnPath = os.path.join(testsDirectory, deqpSupportDirectory, buildGnFilename)
# dEQP data GNI File to write to
dataGniFilename = os.path.join(testsDirectory, deqpSupportDirectory, "deqp_data_autogen.gni")
# run_code_generation.py parameters.
if len(sys.argv) > 1:
# All CMakeLists.txt in the dEQP source tree (at the time)
cmakeDirs = getCMakeLists(deqpSourceDirectory)
inputs = [os.path.join(deqpSourceDirectory, "%s" % dir) for dir in cmakeDirs]
outputs = [dataGniFilename, buildGnPath]
if sys.argv[1] == 'inputs':
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
return 0
deqpSrcDir = os.path.abspath(os.path.join(sys.path[0], deqpSourceDirectory))
initDataDirectories(dataDirectories)
initPathReplacements(pathReplacements)
dataFiles = []
for dataDir in dataDirectories:
dataPath = os.path.join(deqpSrcDir, dataDir)
for root, directories, filenames in os.walk(dataPath):
for filename in filenames:
relativeDirectory = os.path.relpath(root, deqpSrcDir)
# Skip any excluded directories
if any(directory in relativeDirectory for directory in excludedDirectories):
continue
# Skip any excluded files
if any(excludedFilename in filename for excludedFilename in excludedFilenames):
continue
# Record the relative directories and full paths to each data file
if relativeDirectory not in relativeDirectories:
relativeDirectories.append(relativeDirectory)
dataFiles.append(os.path.join(relativeDirectory, filename))
dataFiles.sort()
relativeDirectories.sort(key=convertPathToVarName)
#
# BUILD.gn
#
buildGnFile = createBuildGnFile(buildGnPath)
writeFileHeader(buildGnFile)
# Definitions
buildGnFile.write("deqp_path = \"../../../third_party/VK-GL-CTS/src\"\n")
# Create the copy() commands
templateFilesToCopy = """ "$deqp_path/{dataFile}",
"""
templateCopyCommand = """
copy("vk_gl_cts_data_{relDir}") {{
sources = [
{filesToCopy}
]
outputs = [ "$root_gen_dir/vk_gl_cts_data/{destDir}/{{{{source_file_part}}}}" ]
}}
"""
for relativeDirectory in relativeDirectories:
filesToCopy = ""
for dataFile in dataFiles:
path, filename = os.path.split(dataFile)
if relativeDirectory == path:
filesToCopy += templateFilesToCopy.format(dataFile=dataFile.replace(os.sep, '/'))
copyCommand = ""
destDir = fixDestinationDirectory(pathReplacements, relativeDirectory)
copyCommand += templateCopyCommand.format(
relDir=convertPathToVarName(relativeDirectory),
filesToCopy=filesToCopy,
destDir=destDir.replace(os.sep, '/'))
buildGnFile.write(copyCommand)
#
# .gni
#
gniFile = createGniFile(dataGniFilename)
writeFileHeader(gniFile)
# Imports
templateImports = """import("deqp.gni")
"""
gniFile.write(templateImports)
# Write the lists of data file dependencies
templateDataFiles = """ "$root_gen_dir/vk_gl_cts_data/{dataFile}",
"""
templateDataFileDeps = """
{dataDepName} = [
{files}]
"""
for dataDirectory in dataDirectories:
files = ""
for dataFile in dataFiles:
if dataDirectory + os.sep in dataFile:
files += templateDataFiles.format(
dataFile=fixDestinationDirectory(pathReplacements, dataFile).replace(
os.sep, '/'))
dataDepName = "angle_deqp_" + convertPathToVarName(dataDirectory)
fileDeps = templateDataFileDeps.format(dataDepName=dataDepName, files=files)
gniFile.write(fileDeps)
templateCopyTarget = """ "{deqpSupportDirectory}:vk_gl_cts_data_{relDir}",
"""
templateCopyTargets = """
angle_deqp_data_copy_targets = [
{targets}]
"""
targets = ""
for relativeDirectory in relativeDirectories:
targets += templateCopyTarget.format(
deqpSupportDirectory=deqpSupportDirectory,
relDir=convertPathToVarName(relativeDirectory))
gniFile.write(templateCopyTargets.format(targets=targets))
if __name__ == '__main__':
sys.exit(main())