[Mesa-dev] [PATCH] st/mesa: don't set the border color if it's unused
Nicolai Hähnle
nhaehnle at gmail.com
Mon Jun 19 11:49:47 UTC 2017
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 16.06.2017 12:26, Marek Olšák wrote:
>
>
> On Jun 16, 2017 6:08 AM, "Michel Dänzer" <michel at daenzer.net
> <mailto:michel at daenzer.net>> wrote:
>
> On 15/06/17 08:56 PM, Marek Olšák wrote:
> > From: Marek Olšák <marek.olsak at amd.com <mailto:marek.olsak at amd.com>>
>
> [...]
>
> > /* For non-black borders... */
> > - if (msamp->BorderColor.ui[0] ||
> > - msamp->BorderColor.ui[1] ||
> > - msamp->BorderColor.ui[2] ||
> > - msamp->BorderColor.ui[3]) {
> > + if ((msamp->BorderColor.ui[0] ||
> > + msamp->BorderColor.ui[1] ||
> > + msamp->BorderColor.ui[2] ||
> > + msamp->BorderColor.ui[3]) &&
> > + /* This is true if wrap modes are using the border color. */
> > + (sampler->wrap_s | sampler->wrap_t | sampler->wrap_r) &
> 0x1) {
>
> I'd make this
>
> if (/* This is true if wrap modes are using the border color. */
> (sampler->wrap_s | sampler->wrap_t | sampler->wrap_r) & 0x1 &&
> (msamp->BorderColor.ui[0] ||
> msamp->BorderColor.ui[1] ||
> msamp->BorderColor.ui[2] ||
> msamp->BorderColor.ui[3])) {
>
> No need to test the BorderColor.ui array when the border colour
> isn't used.
>
>
> Done locally.
>
> Marek
>
>
>
> --
> Earthling Michel Dänzer | http://www.amd.com
> Libre software enthusiast | Mesa and X developer
>
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list