Fix failing Vulkan render tests (#2851)

This commit is contained in:
Adrian Cojocaru
2024-09-19 21:30:14 +03:00
committed by GitHub
parent 7913eab644
commit e2df2d9061
12 changed files with 56 additions and 2 deletions

View File

@@ -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"
]
}

View File

@@ -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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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);