ci: skqp: patch skqp to report also GL results
authorDavid Heidelberg <david.heidelberg@collabora.com>
Fri, 15 Apr 2022 21:41:58 +0000 (23:41 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 22 Apr 2022 20:11:58 +0000 (20:11 +0000)
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15987>

.gitlab-ci/container/build-skqp_gl.patch [new file with mode: 0644]

diff --git a/.gitlab-ci/container/build-skqp_gl.patch b/.gitlab-ci/container/build-skqp_gl.patch
new file mode 100644 (file)
index 0000000..7467ee4
--- /dev/null
@@ -0,0 +1,41 @@
+diff --git a/tools/skqp/src/skqp.cpp b/tools/skqp/src/skqp.cpp
+index 50ed9db01d..938217000d 100644
+--- a/tools/skqp/src/skqp.cpp
++++ b/tools/skqp/src/skqp.cpp
+@@ -448,7 +448,7 @@ inline void write(SkWStream* wStream, const T& text) {
+ void SkQP::makeReport() {
+     SkASSERT_RELEASE(fAssetManager);
+-    int glesErrorCount = 0, vkErrorCount = 0, gles = 0, vk = 0;
++    int glErrorCount = 0, glesErrorCount = 0, vkErrorCount = 0, gl = 0, gles = 0, vk = 0;
+     if (!sk_isdir(fReportDirectory.c_str())) {
+         SkDebugf("Report destination does not exist: '%s'\n", fReportDirectory.c_str());
+@@ -460,6 +460,7 @@ void SkQP::makeReport() {
+     htmOut.writeText(kDocHead);
+     for (const SkQP::RenderResult& run : fRenderResults) {
+         switch (run.fBackend) {
++            case SkQP::SkiaBackend::kGL: ++gl; break;
+             case SkQP::SkiaBackend::kGLES: ++gles; break;
+             case SkQP::SkiaBackend::kVulkan: ++vk; break;
+             default: break;
+@@ -477,15 +478,17 @@ void SkQP::makeReport() {
+         }
+         write(&htmOut, SkStringPrintf("  f(%s);\n", str.c_str()));
+         switch (run.fBackend) {
++            case SkQP::SkiaBackend::kGL: ++glErrorCount; break;
+             case SkQP::SkiaBackend::kGLES: ++glesErrorCount; break;
+             case SkQP::SkiaBackend::kVulkan: ++vkErrorCount; break;
+             default: break;
+         }
+     }
+     htmOut.writeText(kDocMiddle);
+-    write(&htmOut, SkStringPrintf("<p>gles errors: %d (of %d)</br>\n"
++    write(&htmOut, SkStringPrintf("<p>gl errors: %d (of %d)</br>\n"
++                                  "gles errors: %d (of %d)</br>\n"
+                                   "vk errors: %d (of %d)</p>\n",
+-                                  glesErrorCount, gles, vkErrorCount, vk));
++                                  glErrorCount, gl, glesErrorCount, gles, vkErrorCount, vk));
+     htmOut.writeText(kDocTail);
+     SkFILEWStream unitOut(SkOSPath::Join(fReportDirectory.c_str(), kUnitTestReportPath).c_str());
+     SkASSERT_RELEASE(unitOut.isValid());