[Mesa-dev] [PATCH 1/3] mesa/main: Move NULL pointer check.

Manolova, Plamena plamena.manolova at intel.com
Thu Jun 15 20:39:56 UTC 2017


Thank you Rafael :)

On Thu, Jun 15, 2017 at 8:57 PM, Rafael Antognolli <
rafael.antognolli at intel.com> wrote:

> Indeed the other two commits are related to the no_error path, but I
> think at least this one should be applied. So it is:
>
> Reviewed-by: Rafael Antognolli <rafael.antognolli at intel.com>
>
> On Wed, Jun 14, 2017 at 07:33:12PM +0300, Plamena Manolova wrote:
> > In blit_framebuffer we're already doing a NULL
> > pointer check for readFb and drawFb so it makes
> > sense to do it before we actually use the pointers.
> >
> > CID: 1412569
> > Signed-off-by: Plamena Manolova <plamena.manolova at intel.com>
> > ---
> >  src/mesa/main/blit.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c
> > index bb866b1..8bb3ba3 100644
> > --- a/src/mesa/main/blit.c
> > +++ b/src/mesa/main/blit.c
> > @@ -349,12 +349,6 @@ blit_framebuffer(struct gl_context *ctx,
> >  {
> >     FLUSH_VERTICES(ctx, 0);
> >
> > -   /* Update completeness status of readFb and drawFb. */
> > -   _mesa_update_framebuffer(ctx, readFb, drawFb);
> > -
> > -   /* Make sure drawFb has an initialized bounding box. */
> > -   _mesa_update_draw_buffer_bounds(ctx, drawFb);
> > -
> >     if (!readFb || !drawFb) {
> >        /* This will normally never happen but someday we may want to
> >         * support MakeCurrent() with no drawables.
> > @@ -362,6 +356,12 @@ blit_framebuffer(struct gl_context *ctx,
> >        return;
> >     }
> >
> > +   /* Update completeness status of readFb and drawFb. */
> > +   _mesa_update_framebuffer(ctx, readFb, drawFb);
> > +
> > +   /* Make sure drawFb has an initialized bounding box. */
> > +   _mesa_update_draw_buffer_bounds(ctx, drawFb);
> > +
> >     if (!no_error) {
> >        const GLbitfield legalMaskBits = (GL_COLOR_BUFFER_BIT |
> >                                          GL_DEPTH_BUFFER_BIT |
> > --
> > 2.9.3
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170615/795589cf/attachment.html>


More information about the mesa-dev mailing list