From 41b7905000ff007e488a505eb07609c1b1900ef0 Mon Sep 17 00:00:00 2001 From: rereview Date: Tue, 8 Sep 2026 18:46:58 -0400 Subject: [PATCH] [Fix] (Espryt, Pipe): carry the bound sampler state's CSO handle into the sampler twin's sync and mix the texture-bind generation into the shader-image shutter - the twin resolved a content-addressed record by an identity handle, and an image re-bind that only moved the level never re-emitted the set --- MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp | 8 ++++++++ MobileGL/MG_Impl/Pipe/Tracker.h | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp index bd22e365..23865c86 100644 --- a/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp +++ b/MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp @@ -5301,7 +5301,15 @@ namespace MobileGL::MG_Backend::DirectGLES { } backendSampler = backendObj.get(); } +#if MOBILEGL_PIPE_PUSH + backendSampler->SyncToBackend( + samplerObject, + static_cast(unit) < MG_Pipe::MGPipeApplier().BoundSamplerStates.size() + ? MG_Pipe::MGPipeApplier().BoundSamplerStates[static_cast(unit)] + : MG_Pipe::kMGPipeNullHandle); +#else backendSampler->SyncToBackend(samplerObject); +#endif // Syncing the object's parameters is not the same as putting it on the // unit: without this the driver kept sampling with the texture's own // parameters and every sampler object was inert. diff --git a/MobileGL/MG_Impl/Pipe/Tracker.h b/MobileGL/MG_Impl/Pipe/Tracker.h index 3b1c2c9f..283115c9 100644 --- a/MobileGL/MG_Impl/Pipe/Tracker.h +++ b/MobileGL/MG_Impl/Pipe/Tracker.h @@ -515,8 +515,9 @@ namespace MobileGL::MG_Pipe { now[Index(MGPipeDirty::NewSamplers)] = MGPipeMixShutter( MGPipeMixShutter(textureParams, ctx.GetSamplingResolutionGeneration()), ctx.GetTextureBindGeneration()); - now[Index(MGPipeDirty::NewShaderImages)] = - MGPipeMixShutter(MGPipeMixShutter(textureContent, textureParams), programImages); + now[Index(MGPipeDirty::NewShaderImages)] = MGPipeMixShutter( + MGPipeMixShutter(MGPipeMixShutter(textureContent, textureParams), programImages), + ctx.GetTextureBindGeneration()); now[Index(MGPipeDirty::NewConstBuffers)] = buffers; now[Index(MGPipeDirty::NewShaderBuffers)] = buffers; now[Index(MGPipeDirty::NewSoTargets)] =