Re: [PATCH libdrm] tests: fix MAKE_RGBA macro for 10bpp modes

2017-11-24 Thread Ilia Mirkin
On Fri, Nov 24, 2017 at 8:38 AM, Ville Syrjälä wrote: > On Thu, Nov 23, 2017 at 03:14:46PM -0500, Ilia Mirkin wrote: >> On Thu, Nov 23, 2017 at 2:09 PM, Ville Syrjälä >> wrote: >> > On Thu, Nov 23, 2017 at 01:59:28PM -0500, Ilia Mirkin wrote: >> >> We need to shift the values up, otherwise we'd e

Re: [PATCH libdrm] tests: fix MAKE_RGBA macro for 10bpp modes

2017-11-24 Thread Ville Syrjälä
On Thu, Nov 23, 2017 at 03:14:46PM -0500, Ilia Mirkin wrote: > On Thu, Nov 23, 2017 at 2:09 PM, Ville Syrjälä > wrote: > > On Thu, Nov 23, 2017 at 01:59:28PM -0500, Ilia Mirkin wrote: > >> We need to shift the values up, otherwise we'd end up with a negative > >> shift. This works for up-to 16-bit

Re: [PATCH libdrm] tests: fix MAKE_RGBA macro for 10bpp modes

2017-11-23 Thread Ilia Mirkin
On Thu, Nov 23, 2017 at 2:09 PM, Ville Syrjälä wrote: > On Thu, Nov 23, 2017 at 01:59:28PM -0500, Ilia Mirkin wrote: >> We need to shift the values up, otherwise we'd end up with a negative >> shift. This works for up-to 16-bit components, which is fine for now. > > Shouldn't we actually replicate

Re: [PATCH libdrm] tests: fix MAKE_RGBA macro for 10bpp modes

2017-11-23 Thread Ville Syrjälä
On Thu, Nov 23, 2017 at 01:59:28PM -0500, Ilia Mirkin wrote: > We need to shift the values up, otherwise we'd end up with a negative > shift. This works for up-to 16-bit components, which is fine for now. Shouldn't we actually replicate the high bits in the low bits? > > Signed-off-by: Ilia Mirk

[PATCH libdrm] tests: fix MAKE_RGBA macro for 10bpp modes

2017-11-23 Thread Ilia Mirkin
We need to shift the values up, otherwise we'd end up with a negative shift. This works for up-to 16-bit components, which is fine for now. Signed-off-by: Ilia Mirkin --- tests/util/pattern.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/util/pattern.c