diff --git a/scripts/generate_entry_points.py b/scripts/generate_entry_points.py index 57e0ba00b7..e7840cfd4b 100755 --- a/scripts/generate_entry_points.py +++ b/scripts/generate_entry_points.py @@ -80,6 +80,14 @@ PLS_DISABLE_WILDCARDS = [ "glFramebufferTexture*", "glReadnPixels*", "glReadPixels*", + # Resizing the storage of an attached renderbuffer/texture changes the + # rendering area without going through any of the attachment-binding entry + # points above, breaking the "PLS extents == rendering area" invariant + # checked only at glBeginPixelLocalStorageANGLE. End PLS implicitly so the + # next Begin re-validates the dimensions. + "glRenderbufferStorage*", + "glTexStorage*", + "glTexImage*", ] # These are the entry points which purely set state in the current context with diff --git a/src/libGLESv2/entry_points_gles_2_0_autogen.cpp b/src/libGLESv2/entry_points_gles_2_0_autogen.cpp index 6d53f75c4b..c863a04e7c 100644 --- a/src/libGLESv2/entry_points_gles_2_0_autogen.cpp +++ b/src/libGLESv2/entry_points_gles_2_0_autogen.cpp @@ -4248,6 +4248,10 @@ void GL_APIENTRY GL_RenderbufferStorage(GLenum target, if (ANGLE_LIKELY(context != nullptr)) { SCOPED_SHARE_CONTEXT_LOCK(context); + if (context->getState().getPixelLocalStorageActivePlanes() != 0) + { + context->endPixelLocalStorageImplicit(); + } bool isCallValid = context->skipValidation(); if (!isCallValid) {