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)] =