[MG_Backend, MG_Impl] complete GLES XFB lifetimes, lazy readback and sampler windows

This commit is contained in:
2026-09-20 12:43:07 -04:00
parent c3a5d2f58e
commit e2d6e33db4
6 changed files with 124 additions and 11 deletions
+13
View File
@@ -80,6 +80,7 @@ namespace {
X(TrackerWalk, TheIndexBufferBitFiresWhenTheSlotVersionWrapsOntoADifferentBuffer) \
X(TrackerWalk, ABaseInstanceSurvivesTheFirstWalkOnAFreshContext) \
X(TrackerWalk, ASamplerBindAloneFiresTheSamplerStateBit) \
X(TrackerWalk, ARedundantDefaultBindStillPublishesAGrowingSamplerWindow) \
X(TrackerWalk, ARestagedProgramPipelineFiresTheProgramBits) \
X(TrackerWalk, ARelinkOfAStageProgramFiresTheProgramBits) \
X(TrackerWalk, UseProgramZeroLeavesTheBoundPipelineDrivingTheProgramBits) \
@@ -784,6 +785,18 @@ namespace {
EXPECT_EQ(Walk(), 0u) << "the widened shutter fires forever";
}
TEST_F(TrackerWalk, ARedundantDefaultBindStillPublishesAGrowingSamplerWindow) {
Walk();
ASSERT_EQ(Walk(), 0u);
const Uint64 generation = Ctx().GetTextureBindGeneration();
Ctx().NoteTextureUnitTouched(7, false);
ASSERT_EQ(Ctx().GetTextureBindGeneration(), generation);
const Uint32 dirty = Walk();
EXPECT_NE(dirty & MGPipeDirtyBit(MGPipeDirty::NewSamplerViews), 0u);
EXPECT_NE(dirty & MGPipeDirtyBit(MGPipeDirty::NewSamplers), 0u);
EXPECT_EQ(Walk(), 0u);
}
// BITS 6/7/8 UNDER A SEPARABLE PROGRAM PIPELINE. GetCurrentProgram() is null for the whole
// life of a bound pipeline, so all three shutters used to latch 0 and never move again
// after the first walk: glUseProgramStages would rebuild the composite and EmitShaderState