Re: [Mesa-dev] [PATCH] state_tracker: Fix check for scissor enabled when < 0.
Reviewed-by: Marek OlšákMarek On Oct 15, 2016 1:37 AM, "Eric Anholt" wrote: > DEQP's clear tests like to give us x + w < 0 or y + h < 0. Since we > were comparing to an unsigned, it would get promoted to unsigned and come > out as bignum >= width or height and we would clear the whole fb instead > of none of the fb. > > Fixes 10 tests under deqp-gles2/functional/color_clear. > --- > src/mesa/state_tracker/st_cb_clear.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/state_tracker/st_cb_clear.c > b/src/mesa/state_tracker/st_cb_clear.c > index 813ba9b10ffa..158efc186c05 100644 > --- a/src/mesa/state_tracker/st_cb_clear.c > +++ b/src/mesa/state_tracker/st_cb_clear.c > @@ -318,8 +318,8 @@ is_scissor_enabled(struct gl_context *ctx, struct > gl_renderbuffer *rb) > return (ctx->Scissor.EnableFlags & 1) && >(scissor->X > 0 || > scissor->Y > 0 || > - scissor->X + scissor->Width < rb->Width || > - scissor->Y + scissor->Height < rb->Height); > + scissor->X + scissor->Width < (int)rb->Width || > + scissor->Y + scissor->Height < (int)rb->Height); > } > > /** > -- > 2.9.3 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] state_tracker: Fix check for scissor enabled when < 0.
Acked-by: Edward O'CallaghanOn 10/15/2016 10:37 AM, Eric Anholt wrote: > DEQP's clear tests like to give us x + w < 0 or y + h < 0. Since we > were comparing to an unsigned, it would get promoted to unsigned and come > out as bignum >= width or height and we would clear the whole fb instead > of none of the fb. > > Fixes 10 tests under deqp-gles2/functional/color_clear. > --- > src/mesa/state_tracker/st_cb_clear.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/state_tracker/st_cb_clear.c > b/src/mesa/state_tracker/st_cb_clear.c > index 813ba9b10ffa..158efc186c05 100644 > --- a/src/mesa/state_tracker/st_cb_clear.c > +++ b/src/mesa/state_tracker/st_cb_clear.c > @@ -318,8 +318,8 @@ is_scissor_enabled(struct gl_context *ctx, struct > gl_renderbuffer *rb) > return (ctx->Scissor.EnableFlags & 1) && >(scissor->X > 0 || > scissor->Y > 0 || > - scissor->X + scissor->Width < rb->Width || > - scissor->Y + scissor->Height < rb->Height); > + scissor->X + scissor->Width < (int)rb->Width || > + scissor->Y + scissor->Height < (int)rb->Height); > } > > /** > signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] state_tracker: Fix check for scissor enabled when < 0.
On Friday, October 14, 2016 4:37:38 PM PDT Eric Anholt wrote: > DEQP's clear tests like to give us x + w < 0 or y + h < 0. Since we > were comparing to an unsigned, it would get promoted to unsigned and come > out as bignum >= width or height and we would clear the whole fb instead > of none of the fb. > > Fixes 10 tests under deqp-gles2/functional/color_clear. > --- > src/mesa/state_tracker/st_cb_clear.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/state_tracker/st_cb_clear.c > b/src/mesa/state_tracker/st_cb_clear.c > index 813ba9b10ffa..158efc186c05 100644 > --- a/src/mesa/state_tracker/st_cb_clear.c > +++ b/src/mesa/state_tracker/st_cb_clear.c > @@ -318,8 +318,8 @@ is_scissor_enabled(struct gl_context *ctx, struct > gl_renderbuffer *rb) > return (ctx->Scissor.EnableFlags & 1) && >(scissor->X > 0 || > scissor->Y > 0 || > - scissor->X + scissor->Width < rb->Width || > - scissor->Y + scissor->Height < rb->Height); > + scissor->X + scissor->Width < (int)rb->Width || > + scissor->Y + scissor->Height < (int)rb->Height); > } > > /** > Reviewed-by: Kenneth Graunkesignature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] state_tracker: Fix check for scissor enabled when < 0.
DEQP's clear tests like to give us x + w < 0 or y + h < 0. Since we were comparing to an unsigned, it would get promoted to unsigned and come out as bignum >= width or height and we would clear the whole fb instead of none of the fb. Fixes 10 tests under deqp-gles2/functional/color_clear. --- src/mesa/state_tracker/st_cb_clear.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 813ba9b10ffa..158efc186c05 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -318,8 +318,8 @@ is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb) return (ctx->Scissor.EnableFlags & 1) && (scissor->X > 0 || scissor->Y > 0 || - scissor->X + scissor->Width < rb->Width || - scissor->Y + scissor->Height < rb->Height); + scissor->X + scissor->Width < (int)rb->Width || + scissor->Y + scissor->Height < (int)rb->Height); } /** -- 2.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev