[Fix] (trace-replay): validate Complementary Reimagined shader fixture

- clear stale temporary framebuffer attachments before DirectGLES color/depth blits

- add Complementary Reimagined in-world trace to retrace validation
This commit is contained in:
2026-06-19 10:28:47 +08:00
parent 4366909cf0
commit e60b044ff7
2 changed files with 27 additions and 0 deletions
@@ -1656,12 +1656,21 @@ namespace MobileGL::MG_Backend::DirectGLES {
ClearGLErrors();
ScopedDepthBlitState state;
g_GLESFuncs.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
AssertNoGLError("detach depth blit read color texture");
g_GLESFuncs.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
AssertNoGLError("detach depth blit draw color texture");
g_GLESFuncs.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, srcTexture,
srcLevel);
AssertNoGLError("attach depth blit source texture");
g_GLESFuncs.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, dstTexture,
dstLevel);
AssertNoGLError("attach depth blit destination texture");
g_GLESFuncs.glReadBuffer(GL_NONE);
AssertNoGLError("set depth blit read buffer");
const GLenum drawBuffer = GL_NONE;
g_GLESFuncs.glDrawBuffers(1, &drawBuffer);
AssertNoGLError("set depth blit draw buffer");
MOBILEGL_ASSERT(g_GLESFuncs.glCheckFramebufferStatus(GL_READ_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE,
"Depth blit read framebuffer is incomplete.");
AssertNoGLError("check depth blit read framebuffer");
@@ -1686,6 +1695,14 @@ namespace MobileGL::MG_Backend::DirectGLES {
ClearGLErrors();
ScopedDepthBlitState state;
g_GLESFuncs.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
AssertNoGLError("detach color blit read depth texture");
g_GLESFuncs.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
AssertNoGLError("detach color blit draw depth texture");
g_GLESFuncs.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
AssertNoGLError("detach color blit read stencil texture");
g_GLESFuncs.glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_TEXTURE_2D, 0, 0);
AssertNoGLError("detach color blit draw stencil texture");
g_GLESFuncs.glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, srcTexture,
srcLevel);
AssertNoGLError("attach color blit source texture");
+10
View File
@@ -415,6 +415,16 @@ add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-makeup-ultrafast
TOLERANCE 20
FUZZ_PERCENT 20)
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.tgz
TRACE_FILE trace.trace
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.0000151297.png
TARGET_CALL 151297
WIDTH 854
HEIGHT 480
TOLERANCE 20
FUZZ_PERCENT 20)
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-mellow-in-world
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-mellow-in-world.tgz
TRACE_FILE trace.trace