Re: [PATCH 5/5] d3dx9: Handle pixel formats larger than 32 bits in surface loading / filtering functions.
On 14 February 2014 15:53, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
+ if (format->bits[c]) + { + mask = format->bits[c] == 32 ? ~0U : (1 << format->bits[c]) - 1; You could probably also do that as "mask = ~0u >> (32 - format->bits[c]);", since you already need to check "format->bits[c]" for 0 anyway.
2014-02-14 17:03 GMT+01:00 Henri Verbeet <hverbeet(a)gmail.com>:
On 14 February 2014 15:53, Matteo Bruni <mbruni(a)codeweavers.com> wrote:
+ if (format->bits[c]) + { + mask = format->bits[c] == 32 ? ~0U : (1 << format->bits[c]) - 1; You could probably also do that as "mask = ~0u >> (32 - format->bits[c]);", since you already need to check "format->bits[c]" for 0 anyway.
Good point, I'll resend this patch with that change.
participants (2)
-
Henri Verbeet -
Matteo Bruni