On Jun 16, 2017 6:08 AM, "Michel Dänzer" <mic...@daenzer.net> wrote:
On 15/06/17 08:56 PM, Marek Olšák wrote: > From: Marek Olšák <marek.ol...@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@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev