diff --git a/metrics/android-vulkan-render-test-runner-metrics.json b/metrics/android-vulkan-render-test-runner-metrics.json new file mode 100644 index 000000000..3f0782e96 --- /dev/null +++ b/metrics/android-vulkan-render-test-runner-metrics.json @@ -0,0 +1,20 @@ +{ + "base_test_path": "tests", + "cache_path": "cache-metrics.db", + "expectation_paths": [ + "expectations/platform-android", + "expectations/platform-android-vulkan" + ], + "ignore_paths": [ + "ignores/platform-all.json", + "ignores/platform-linux.json", + "ignores/platform-android.json", + "ignores/platform-android-vulkan.json" + ], + "metric_path": "android-render-test-runner", + "probes": [ + "probeGFX", + "probeMemory", + "probeNetwork" + ] +} diff --git a/metrics/android-vulkan-render-test-runner-style.json b/metrics/android-vulkan-render-test-runner-style.json new file mode 100644 index 000000000..6c30962dd --- /dev/null +++ b/metrics/android-vulkan-render-test-runner-style.json @@ -0,0 +1,19 @@ +{ + "base_test_path": "integration", + "cache_path": "cache-style.db", + "expectation_paths": [ + "expectations/platform-android", + "expectations/platform-android-vulkan" + ], + "ignore_paths": [ + "ignores/platform-all.json", + "ignores/platform-linux.json", + "ignores/platform-android.json", + "ignores/platform-android-vulkan.json" + ], + "metric_path": "android-render-test-runner", + "probes": [ + "probeGFX", + "probeNetwork" + ] +} diff --git a/metrics/expectations/platform-android-vulkan/render-tests/combinations/symbol-translucent--fill-translucent/expected.png b/metrics/expectations/platform-android-vulkan/render-tests/combinations/symbol-translucent--fill-translucent/expected.png new file mode 100644 index 000000000..4d99dc41b Binary files /dev/null and b/metrics/expectations/platform-android-vulkan/render-tests/combinations/symbol-translucent--fill-translucent/expected.png differ diff --git a/metrics/expectations/platform-android-vulkan/render-tests/icon-text-fit/textFit-grid-long/expected.png b/metrics/expectations/platform-android-vulkan/render-tests/icon-text-fit/textFit-grid-long/expected.png new file mode 100644 index 000000000..060dce662 Binary files /dev/null and b/metrics/expectations/platform-android-vulkan/render-tests/icon-text-fit/textFit-grid-long/expected.png differ diff --git a/metrics/expectations/platform-android-vulkan/render-tests/sprites/1x-screen-1x-pattern/expected.png b/metrics/expectations/platform-android-vulkan/render-tests/sprites/1x-screen-1x-pattern/expected.png new file mode 100644 index 000000000..b1104240b Binary files /dev/null and b/metrics/expectations/platform-android-vulkan/render-tests/sprites/1x-screen-1x-pattern/expected.png differ diff --git a/metrics/expectations/platform-android-vulkan/render-tests/sprites/2x-screen-1x-pattern/expected.png b/metrics/expectations/platform-android-vulkan/render-tests/sprites/2x-screen-1x-pattern/expected.png new file mode 100644 index 000000000..a22aa6ced Binary files /dev/null and b/metrics/expectations/platform-android-vulkan/render-tests/sprites/2x-screen-1x-pattern/expected.png differ diff --git a/metrics/ignores/linux-vulkan.json b/metrics/ignores/linux-vulkan.json index b3417b50d..e49d79329 100644 --- a/metrics/ignores/linux-vulkan.json +++ b/metrics/ignores/linux-vulkan.json @@ -1,4 +1,4 @@ { - "render-tests/fill-extrusion-color/function": "failing for Vulkan", + "render-tests/fill-extrusion-color/function": "Layer Z Fighting: https://github.com/maplibre/maplibre-native/issues/1847", "render-tests/tilejson-bounds/default": "flaky on CI" } \ No newline at end of file diff --git a/metrics/ignores/platform-android-vulkan.json b/metrics/ignores/platform-android-vulkan.json new file mode 100644 index 000000000..419d6fb1b --- /dev/null +++ b/metrics/ignores/platform-android-vulkan.json @@ -0,0 +1,4 @@ +{ + "render-tests/fill-extrusion-color/function": "Layer Z Fighting: https://github.com/maplibre/maplibre-native/issues/1847", + "render-tests/combinations/fill-opaque--image-translucent": "investigate" +} \ No newline at end of file diff --git a/platform/android/android.cmake b/platform/android/android.cmake index 083c59b21..5f141e7f5 100644 --- a/platform/android/android.cmake +++ b/platform/android/android.cmake @@ -248,6 +248,10 @@ add_library( ${PROJECT_SOURCE_DIR}/platform/android/MapLibreAndroid/src/cpp/http_file_source.cpp ) +if(MLN_WITH_VULKAN) + target_compile_definitions(mbgl-render-test-runner PRIVATE "MLN_RENDER_BACKEND_VULKAN=1") +endif() + target_include_directories( mbgl-render-test-runner PRIVATE ${ANDROID_NDK}/sources/android/native_app_glue ${PROJECT_SOURCE_DIR}/platform/android/src ${PROJECT_SOURCE_DIR}/src diff --git a/platform/android/src/test/render_test_runner.cpp b/platform/android/src/test/render_test_runner.cpp index eb1c3e6dd..b94d696ef 100644 --- a/platform/android/src/test/render_test_runner.cpp +++ b/platform/android/src/test/render_test_runner.cpp @@ -53,8 +53,13 @@ void android_main(struct android_app* app) { return result; }; +#if MLN_RENDER_BACKEND_VULKAN + auto result = runTestWithManifest("/metrics/android-vulkan-render-test-runner-metrics.json"); + result = runTestWithManifest("/metrics/android-vulkan-render-test-runner-style.json") && result; +#else auto result = runTestWithManifest("/metrics/android-render-test-runner-metrics.json"); result = runTestWithManifest("/metrics/android-render-test-runner-style.json") && result; +#endif mbgl::Log::Info(mbgl::Event::General, "All tests are finished!"); changeState(env, app, result); } diff --git a/render-test/android/app/src/main/assets/to_zip.txt b/render-test/android/app/src/main/assets/to_zip.txt index 20726c44e..71a41f479 100644 --- a/render-test/android/app/src/main/assets/to_zip.txt +++ b/render-test/android/app/src/main/assets/to_zip.txt @@ -6,5 +6,7 @@ metrics/tests/ metrics/android-render-test-runner/ metrics/android-render-test-runner-metrics.json metrics/android-render-test-runner-style.json +metrics/android-vulkan-render-test-runner-metrics.json +metrics/android-vulkan-render-test-runner-style.json metrics/cache-metrics.db metrics/cache-style.db diff --git a/src/mbgl/vulkan/render_pass.cpp b/src/mbgl/vulkan/render_pass.cpp index 3bb40a5bd..5e95bb277 100644 --- a/src/mbgl/vulkan/render_pass.cpp +++ b/src/mbgl/vulkan/render_pass.cpp @@ -53,7 +53,7 @@ void RenderPass::clearStencil(uint32_t value) const { .setAspectMask(vk::ImageAspectFlagBits::eStencil) .setClearValue(vk::ClearDepthStencilValue(0.0f, value)); - const auto& rect = vk::ClearRect().setBaseArrayLayer(0).setLayerCount(1).setRect( + const auto rect = vk::ClearRect().setBaseArrayLayer(0).setLayerCount(1).setRect( {{0, 0}, {extent.width, extent.height}}); commandEncoder.getCommandBuffer()->clearAttachments(attach, rect);