mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 08:21:56 +09:00
[Test] (docs/ci, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, scripts/data): check the push control across a Present and only where it can run
- the forgotten mapping's next-frame write must also miss the server; the re-announce must ship the latest write - the case is left out of the ambient, Verify, VerifySplit and Magma Full registrations, where it only skipped - DirectVulkan.Split pins MOBILEGL_IPC_ADOPT_TIER=2 for it, so its emulated declaration holds
This commit is contained in:
@@ -794,11 +794,17 @@ set(MGL_ITEST_MONOLITH_MECHANISM_FILTER
|
||||
# would be a name in a list.
|
||||
set(MGL_ITEST_GLES_VIEW_FILTER
|
||||
"TextureViewScenario.*:TextureViewAliasScenario.*:F1WireScenario.ComputeImageStoreThroughViewPreservesOtherRootLayer:F1WireScenario.TextureViewClearTargetsItsRootMipAndLayer:F1WireScenario.GenerateMipmapThroughViewKeepsOwnerLevelsAndLayersOutsideItsWindow:InvalidImageUnitScenario.ALevelPastATextureViewsWindowReadsZero")
|
||||
# Cases that run only in the split-arm entries Harness/SplitLogPaths.cmake.in declares a lane
|
||||
# for, and skip by construction anywhere else (no split transport, no declared arm). They are
|
||||
# left out of the ambient, verify and whole-binary Magma registrations for the reason above:
|
||||
# there they would green-skip on every run.
|
||||
set(MGL_ITEST_SPLIT_ARM_ONLY_FILTER
|
||||
"PersistentCoherentMapScenario.ThePushIsTheOnlyRouteAWriteTakesToTheServer")
|
||||
|
||||
mgl_itest_lane("DirectGLES." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:${MGL_ITEST_GLES_VIEW_FILTER}"
|
||||
mgl_itest_lane("DirectGLES." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:${MGL_ITEST_GLES_VIEW_FILTER}:${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
ENV "${MGL_ITEST_GLES_ENVIRONMENT}")
|
||||
|
||||
mgl_itest_lane("DirectVulkan." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}"
|
||||
mgl_itest_lane("DirectVulkan." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
ENV "${MGL_ITEST_VULKAN_ENVIRONMENT}")
|
||||
|
||||
# ScenarioIsolationScenario's two cases in ONE process: the first leaves a deleted program current
|
||||
@@ -1328,12 +1334,13 @@ if (MOBILEGL_PIPE_VERIFY)
|
||||
# from the live context at the verb boundary - which is what "the 742 integration entries
|
||||
# prove push equals pull" means. Labelled integration-gpu as well so a verify build's
|
||||
# `ctest -L integration-gpu` still describes the whole registration set.
|
||||
mgl_itest_lane("DirectGLES.Verify." "-${MGL_ITEST_GLES_VIEW_FILTER}"
|
||||
mgl_itest_lane("DirectGLES.Verify." "-${MGL_ITEST_GLES_VIEW_FILTER}:${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
LABELS "integration-gpu\;integration-verify\;integration-monolith-control" TIMEOUT ${MGL_ITEST_VERIFY_TIMEOUT} ENV "${MGL_ITEST_GLES_VERIFY_ENVIRONMENT}")
|
||||
mgl_itest_lane("DirectGLES.Verify." "${MGL_ITEST_GLES_VIEW_FILTER}"
|
||||
LABELS "integration-verify\;integration-monolith-control" TIMEOUT ${MGL_ITEST_VERIFY_TIMEOUT} ENV "${MGL_ITEST_GLES_VERIFY_ENVIRONMENT}\;MOBILEGL_ESPRYT_ENABLE_TEXTURE_VIEW=1")
|
||||
gtest_discover_tests(MobileGLIntegrationTest
|
||||
TEST_PREFIX "DirectVulkan.Verify."
|
||||
TEST_FILTER "-${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
DISCOVERY_TIMEOUT 30
|
||||
PROPERTIES
|
||||
LABELS "integration-gpu\;integration-verify\;integration-monolith-control"
|
||||
@@ -3546,8 +3553,9 @@ endif()
|
||||
# Whole integration binary on Magma split (informational, no CI gate)
|
||||
# =====================================================================================
|
||||
# The set the monolith `DirectVulkan.` arm runs (all but MGL_ITEST_MONOLITH_MECHANISM_FILTER,
|
||||
# oracles that must not inherit a transport), minus DualBlockScenario (its own lane). No
|
||||
# MGITEST_SPLIT_LANE: query-only cases emit no record (ARCHITECTURE.md §16.1). Private log paths
|
||||
# oracles that must not inherit a transport, and MGL_ITEST_SPLIT_ARM_ONLY_FILTER), minus
|
||||
# DualBlockScenario (its own lane). No MGITEST_SPLIT_LANE: query-only cases emit no record
|
||||
# (ARCHITECTURE.md §16.1). Private log paths
|
||||
# come through MGL_MAGMA_FULL_TEST_LISTS, not MGL_SPLIT_ARM_TEST_LISTS, whose entries also get
|
||||
# lane markers that would arm unrelated oracles here; SplitLogPaths.cmake.in walks both.
|
||||
if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
@@ -3558,7 +3566,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
mgl_itest_join_environment(mglItestMagmaFullEnvironment
|
||||
"MOBILEGL_BACKEND_TYPE=DirectVulkan" "MOBILEGL_ITEST_REQUIRE_GPU=1"
|
||||
${MGL_ITEST_CAPABILITY_ENV} ${MGL_ITEST_VULKAN_ENV} ${mglItestArmTransportEnv})
|
||||
mgl_itest_lane("DirectVulkan.${mglItestArm}.Full." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:DualBlockScenario.*"
|
||||
mgl_itest_lane("DirectVulkan.${mglItestArm}.Full." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:DualBlockScenario.*:${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
LABELS "integration-magma-full-${mglItestArmLower}" TEST_LIST "MGL_MAGMA_FULL_TESTS_${mglItestArmUpper}" PROPERTIES ${mglItestArmProperties} ENV "${mglItestMagmaFullEnvironment}")
|
||||
list(APPEND MGL_MAGMA_FULL_TEST_LISTS "MGL_MAGMA_FULL_TESTS_${mglItestArmUpper}")
|
||||
endforeach()
|
||||
@@ -3602,11 +3610,11 @@ if (MOBILEGL_BUILD_DISAGGREGATED AND MOBILEGL_PIPE_VERIFY)
|
||||
# MOBILEGL_ESPRYT_ENABLE_TEXTURE_VIEW=1 or DirectGLES withholds GL_ARB_texture_view and they
|
||||
# green-skip, so they are subtracted from the first registration and re-registered with the
|
||||
# knob. "Every existing verify case on the split arm" is false without the second block.
|
||||
mgl_itest_lane("DirectGLES.VerifySplit." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:${MGL_ITEST_GLES_VIEW_FILTER}:DualBlockScenario.*:${MGL_ITEST_VERIFY_SPLIT_GLES_MAGMA_DECLINE_FILTER}"
|
||||
mgl_itest_lane("DirectGLES.VerifySplit." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:${MGL_ITEST_GLES_VIEW_FILTER}:DualBlockScenario.*:${MGL_ITEST_VERIFY_SPLIT_GLES_MAGMA_DECLINE_FILTER}:${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
LABELS "integration-verify-split" TIMEOUT ${MGL_ITEST_VERIFY_TIMEOUT} TEST_LIST MGL_VERIFY_SPLIT_TESTS_GLES ENV "${MGL_ITEST_GLES_VERIFY_SPLIT_ENVIRONMENT}")
|
||||
mgl_itest_lane("DirectGLES.VerifySplit." "${MGL_ITEST_GLES_VIEW_FILTER}"
|
||||
LABELS "integration-verify-split" TIMEOUT ${MGL_ITEST_VERIFY_TIMEOUT} TEST_LIST MGL_VERIFY_SPLIT_TESTS_GLES_VIEW ENV "${MGL_ITEST_GLES_VERIFY_SPLIT_ENVIRONMENT}\;MOBILEGL_ESPRYT_ENABLE_TEXTURE_VIEW=1")
|
||||
mgl_itest_lane("DirectVulkan.VerifySplit." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:DualBlockScenario.*"
|
||||
mgl_itest_lane("DirectVulkan.VerifySplit." "-${MGL_ITEST_MONOLITH_MECHANISM_FILTER}:DualBlockScenario.*:${MGL_ITEST_SPLIT_ARM_ONLY_FILTER}"
|
||||
LABELS "integration-verify-split" TIMEOUT ${MGL_ITEST_VERIFY_TIMEOUT} TEST_LIST MGL_VERIFY_SPLIT_TESTS_VULKAN ENV "${MGL_ITEST_VULKAN_VERIFY_SPLIT_ENVIRONMENT}")
|
||||
list(APPEND MGL_VERIFY_SPLIT_TEST_LISTS MGL_VERIFY_SPLIT_TESTS_GLES
|
||||
MGL_VERIFY_SPLIT_TESTS_GLES_VIEW MGL_VERIFY_SPLIT_TESTS_VULKAN)
|
||||
|
||||
@@ -26,8 +26,13 @@ foreach(listName IN ITEMS @MGL_SPLIT_ARM_TEST_LISTS@)
|
||||
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
|
||||
"MGITEST_PMAP_LANE=1;MGITEST_PERSISTENT_MAP_ARM=emulated;MOBILEGL_PIPE_STATS=1;MOBILEGL_PIPE_STATS_PERIOD=1")
|
||||
elseif(entry MATCHES "PersistentCoherentMapScenario.ThePushIsTheOnlyRouteAWriteTakesToTheServer$")
|
||||
# The case takes the push away, which only the emulated arm has (R-6: every split arm).
|
||||
# The case takes the push away, which only the emulated arm has. Every split arm
|
||||
# emulates by default except Magma in process, which is granted T0 and adopts, so
|
||||
# that entry asks for T2 by name, as the Magma buffer lanes do.
|
||||
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT "MGITEST_PERSISTENT_MAP_ARM=emulated")
|
||||
if(entry MATCHES "^DirectVulkan\\.Split\\.")
|
||||
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT "MOBILEGL_IPC_ADOPT_TIER=2")
|
||||
endif()
|
||||
elseif(entry MATCHES "LargeArenaAdoptionScenario.TheArenaLandsInTheTierItsLaneDeclares$")
|
||||
# P11 A2: every split arm runs T2, so the arena is declared emulated.
|
||||
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT "MGITEST_PERSISTENT_MAP_ARM=emulated")
|
||||
|
||||
@@ -448,9 +448,10 @@ void main() { oColor = vec4(vColor, 1.0); }
|
||||
// E3(a): the push is the ONLY route a coherent write takes to the server. The cases above go
|
||||
// green just as well if something else delivered the bytes - an unmap or flush record, a
|
||||
// whole-buffer re-sync, the live-host-writes state record, an inproc server reading client
|
||||
// memory - so this one takes the push away and requires the next draw to miss the write.
|
||||
// Forget is what an unmap or a destroy calls and leaves the mapping itself alone; the
|
||||
// re-announce is the call every map-state change makes, and the next draw must see the write.
|
||||
// memory - so this one takes the push away and requires the draws to miss the write, within
|
||||
// one frame and across a Present (the two shapes the cases above draw). Forget is what an
|
||||
// unmap or a destroy calls and leaves the mapping itself alone; the re-announce is the call
|
||||
// every map-state change makes, and the next draw must see the latest write.
|
||||
TEST_F(PersistentCoherentMapScenario, ThePushIsTheOnlyRouteAWriteTakesToTheServer) {
|
||||
if (!Ready() || IsSkipped()) return;
|
||||
if (!SplitLane::IsSplitLane() || SplitLane::DeclaredPersistentMapArm() != "emulated") {
|
||||
@@ -477,13 +478,23 @@ void main() { oColor = vec4(vColor, 1.0); }
|
||||
"a write through a mapping the tracker has forgotten: red here means "
|
||||
"something other than the persistent-map push delivered it, and the "
|
||||
"two cases above would stay green without the push"));
|
||||
Gl().EndFrame();
|
||||
|
||||
ArmTheDrawState();
|
||||
WriteThroughTheMapThenDraw(m_map, 0.0f, 0.0f, 1.0f);
|
||||
const Image nextFrame = ReadPixels(Gl().Width(), Gl().Height());
|
||||
EXPECT_EQ(FirstGLError(), 0u);
|
||||
EXPECT_TRUE(WholeSurfaceIs(nextFrame, "green",
|
||||
"the next frame's write through the forgotten mapping, after a Present: "
|
||||
"red or blue here means the frame boundary delivered a write the push "
|
||||
"did not carry"));
|
||||
|
||||
ASSERT_TRUE(ReannounceLivePersistentMap(m_vbo)) << "no frontend BufferObject behind GL buffer " << m_vbo;
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
const Image repushed = ReadPixels(Gl().Width(), Gl().Height());
|
||||
EXPECT_EQ(FirstGLError(), 0u);
|
||||
EXPECT_TRUE(WholeSurfaceIs(repushed, "red",
|
||||
"the same write after the map is announced again: the tracker must "
|
||||
EXPECT_TRUE(WholeSurfaceIs(repushed, "blue",
|
||||
"the latest write after the map is announced again: the tracker must "
|
||||
"push the whole mapping once, or the green above proves nothing"));
|
||||
AssertOrRecordArm(m_vbo, "after the push was taken away and given back");
|
||||
Gl().EndFrame();
|
||||
|
||||
Reference in New Issue
Block a user