Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>

On 16.06.2017 12:26, Marek Olšák wrote:


On Jun 16, 2017 6:08 AM, "Michel Dänzer" <mic...@daenzer.net <mailto:mic...@daenzer.net>> wrote:

    On 15/06/17 08:56 PM, Marek Olšák wrote:
     > From: Marek Olšák <marek.ol...@amd.com <mailto: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



--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to