mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Test] (P13 W4b): register the CPU-mip and store-read knob lanes on monolith's record arm.
This commit is contained in:
@@ -3442,6 +3442,35 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
ENVIRONMENT "${MGL_ITEST_GLES_${mglItestArmUpper}_ENVIRONMENT}\;MGITEST_ESPRYT_FORCE_CPU_MIPMAP=1\;MOBILEGL_LOG_FILE_PATH=${CMAKE_CURRENT_BINARY_DIR}/p8b-cpu-mip-${mglItestArmLower}-${cpuMipCase}.log")
|
||||
endforeach()
|
||||
endforeach()
|
||||
# P13 W4b: MONOLITH TAKES THE SAME KNOBS. On the record arm the monolith runs the server's
|
||||
# generation and the server's store read in its own process, so both knobs reach it and each
|
||||
# entry asserts its arm's line in its private log. Ambient monolith environment; integration-gpu.
|
||||
foreach(cpuMipCase Rgb16fUploadedBaseGeneratesItsChain
|
||||
Rgb16fRenderTargetBaseGeneratesFromTheGpuWrittenLevel
|
||||
Rgb32fUploadedBaseGeneratesItsChain
|
||||
Rgb32fRenderTargetBaseGeneratesFromTheGpuWrittenLevel)
|
||||
gtest_discover_tests(MobileGLIntegrationTest
|
||||
TEST_PREFIX "DirectGLES.Monolith.CpuMip."
|
||||
TEST_FILTER "GenerateMipmapServerScenario.${cpuMipCase}"
|
||||
DISCOVERY_TIMEOUT 30
|
||||
PROPERTIES
|
||||
LABELS "integration-gpu"
|
||||
TIMEOUT ${MGL_ITEST_TIMEOUT}
|
||||
ENVIRONMENT "${MGL_ITEST_GLES_ENVIRONMENT}\;MGITEST_ESPRYT_FORCE_CPU_MIPMAP=1\;MOBILEGL_LOG_FILE_PATH=${CMAKE_CURRENT_BINARY_DIR}/p13-cpu-mip-monolith-${cpuMipCase}.log")
|
||||
endforeach()
|
||||
foreach(storeReadCase AnUploadedLevelReadsBackExactly
|
||||
ACopiedWindowReadsBackOverTheUpload
|
||||
ACopiedWindowReadsBackFromAnImmutableLevel
|
||||
APartialUploadAfterTheCopyKeepsTheCopiedWindow)
|
||||
gtest_discover_tests(MobileGLIntegrationTest
|
||||
TEST_PREFIX "DirectGLES.Monolith.StoreRead."
|
||||
TEST_FILTER "CopyImageStoreReadbackScenario.${storeReadCase}"
|
||||
DISCOVERY_TIMEOUT 30
|
||||
PROPERTIES
|
||||
LABELS "integration-gpu"
|
||||
TIMEOUT ${MGL_ITEST_TIMEOUT}
|
||||
ENVIRONMENT "${MGL_ITEST_GLES_ENVIRONMENT}\;MGITEST_ESPRYT_REFUSE_TEXTURE_READBACK_EXTENT=${MGL_P8E_REFUSE_EXTENT}\;MOBILEGL_LOG_FILE_PATH=${CMAKE_CURRENT_BINARY_DIR}/p13-store-read-monolith-${storeReadCase}.log")
|
||||
endforeach()
|
||||
|
||||
# P8-C: draw inputs a compute shader wrote, read on the CPU by the side that applies the draw
|
||||
# (restart rewrite, multi-draw rebase, *IndirectCount, indirect gl_BaseVertex, an orphaned
|
||||
|
||||
@@ -129,6 +129,8 @@ namespace MGITest {
|
||||
ScenarioTest::SetUp();
|
||||
if (!Ready()) return;
|
||||
m_wire = SplitRuntimeSkipReason().empty();
|
||||
// P13 W4b: monolith on the record arm reads back through the server's store route.
|
||||
m_recordArm = m_wire || PeekSplitRuntime().dataArmIsRecord;
|
||||
m_espryt = Gl().BackendName() == "DirectGLES";
|
||||
if (const char* knob = std::getenv(kRefuseExtentKnob)) {
|
||||
int width = 0, height = 0;
|
||||
@@ -219,10 +221,12 @@ namespace MGITest {
|
||||
}
|
||||
|
||||
// Under the knob the Espryt server must have answered from its store at least once;
|
||||
// otherwise the entry proves nothing about that route.
|
||||
// otherwise the entry proves nothing about that route. On monolith's record arm (P13
|
||||
// W4b) that server code runs in this process and logs into the whole lane log.
|
||||
void ExpectStoreReadNamedSince(const PipeStatsWindow::LogMark& mark) {
|
||||
if (!m_forced || !m_espryt || !m_wire) return;
|
||||
const std::string log = PipeStatsWindow::ReadServerLogSince(mark);
|
||||
if (!m_forced || !m_espryt || !m_recordArm) return;
|
||||
const std::string log = m_wire ? PipeStatsWindow::ReadServerLogSince(mark)
|
||||
: PipeStatsWindow::ReadLaneLogSince(mark);
|
||||
EXPECT_NE(log.find(kStoreReadMarker), std::string::npos)
|
||||
<< kRefuseExtentKnob << " is set but the server log carries no '" << kStoreReadMarker
|
||||
<< "' line: the knob did not reach the server, or no read took the store route";
|
||||
@@ -238,6 +242,7 @@ namespace MGITest {
|
||||
}
|
||||
|
||||
bool m_wire = false;
|
||||
bool m_recordArm = false;
|
||||
bool m_espryt = false;
|
||||
bool m_forced = false;
|
||||
int m_width = kDefaultWidth;
|
||||
|
||||
@@ -133,6 +133,8 @@ void main() { o_color = gl_FragCoord.y < u_split ? u_bottom : u_top; }
|
||||
ScenarioTest::SetUp();
|
||||
if (!Ready()) return;
|
||||
m_wire = SplitRuntimeSkipReason().empty();
|
||||
// P13 W4b: monolith on the record arm runs the server's generation in this process.
|
||||
m_recordArm = m_wire || PeekSplitRuntime().dataArmIsRecord;
|
||||
m_espryt = Gl().BackendName() == "DirectGLES";
|
||||
m_forcedCpu = std::getenv(kForceCpuMipmap) != nullptr;
|
||||
m_refusedReadback = std::getenv(kRefuseReadback) != nullptr;
|
||||
@@ -293,10 +295,13 @@ void main() { o_color = gl_FragCoord.y < u_split ? u_bottom : u_top; }
|
||||
}
|
||||
|
||||
// Under the knob the SERVER must say it filtered on the CPU; without that line the entry
|
||||
// ran the native arm and its green says nothing about the arm it is named for.
|
||||
// ran the native arm and its green says nothing about the arm it is named for. On
|
||||
// monolith's record arm (P13 W4b) the same backend code runs in this process, so the
|
||||
// whole lane log is where its line lands.
|
||||
void ExpectCpuArmNamed() {
|
||||
if (!m_forcedCpu || !m_wire || !m_espryt) return;
|
||||
const std::string log = PipeStatsWindow::ReadServerLogSince(m_mark);
|
||||
if (!m_forcedCpu || !m_recordArm || !m_espryt) return;
|
||||
const std::string log = m_wire ? PipeStatsWindow::ReadServerLogSince(m_mark)
|
||||
: PipeStatsWindow::ReadLaneLogSince(m_mark);
|
||||
EXPECT_NE(log.find(kCpuMipmapMarker), std::string::npos)
|
||||
<< kForceCpuMipmap << " is set but the server log after glGenerateMipmap carries no '"
|
||||
<< kCpuMipmapMarker << "' line: the knob did not reach the server, or the three-channel "
|
||||
@@ -486,6 +491,7 @@ void main() { o_color = gl_FragCoord.y < u_split ? u_bottom : u_top; }
|
||||
}
|
||||
|
||||
bool m_wire = false;
|
||||
bool m_recordArm = false;
|
||||
bool m_espryt = false;
|
||||
bool m_forcedCpu = false;
|
||||
bool m_refusedReadback = false;
|
||||
|
||||
Reference in New Issue
Block a user