mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 18:13:23 +09:00
[Tests] pin full texture staging extents beside scattered upload regions
This commit is contained in:
@@ -1266,7 +1266,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// bytes an untransformed level shadow?
|
||||
Uint8 SourceIsVerbatimLevelShadow;
|
||||
// P5 (b1): DOES THIS RESOURCE HAVE A LIVE HOST WRITER RIGHT NOW? One byte out of the
|
||||
// pad, so MGP_ASSERT_POD(MGPSubData, 72) below does not move.
|
||||
// original pad; the complete mip extent below is a separate payload extension.
|
||||
//
|
||||
// It is here rather than on MGPResourceDesc, and that is a ruling with a reason. The
|
||||
// fact is CONTENT-shaped - "someone may be writing these bytes without telling you" -
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
// Converted, because the fallback is right:
|
||||
// FenceSync used this fallback through P5. P5b §9 moved it to class B: the frontend
|
||||
// now calls the emitter and the server preserves the optional/native-null fallback.
|
||||
// GL_Texture.cpp:6537 GetTextureImage -> the frontend's own CPU readback, which is exact
|
||||
// GL_Texture.cpp:6799 GetTexImage -> the same
|
||||
// GetTexImage/GetTextureImage now emit owned texture readback replies. Their
|
||||
// split path must never use the frontend shadow after GPU writes.
|
||||
// GL_Getter.cpp x2 GetGpuTimestampNs and GL_Query.cpp's query probes now use their
|
||||
// timer/occlusion/primitive capability bits. An advertised path emits real query
|
||||
// records; only an unavailable native capability reports COUNTER_BITS 0.
|
||||
|
||||
@@ -515,6 +515,10 @@ TEST(TextureEmit, AScatteredUploadCarriesTheLevelShadowsStridesAndNotZero) {
|
||||
IntVec3{2, 2, 1});
|
||||
Textures().DrainTextureSubData(Ctx());
|
||||
const Vector<MGPSubRegion> regions = Textures().LastRegions();
|
||||
const auto& record = Textures().LastSubData();
|
||||
EXPECT_EQ(record.LevelWidth, 256u);
|
||||
EXPECT_EQ(record.LevelHeight, 256u);
|
||||
EXPECT_EQ(record.LevelDepth, 1u);
|
||||
ASSERT_GE(regions.size(), 2u);
|
||||
// A SUB-RECT'S ROWS ARE NOT CONTIGUOUS IN THE SHADOW, so it must carry the LEVEL's pitches -
|
||||
// not its own width - or the staging planner on the far side repacks the wrong bytes.
|
||||
|
||||
Reference in New Issue
Block a user