diff options
author | Rob Clark <robclark@freedesktop.org> | 2013-10-12 12:21:49 -0400 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2014-11-24 19:53:41 -0500 |
commit | b958d76f7794143380a79f656fc71cc924422bdc (patch) | |
tree | 6fa9e6a8bbed306bf3e1e5469ee7213455ec5af4 | |
parent | 8f66c98818102b95c28320b9ed7b5e05fd4efa00 (diff) |
modetest: alpha buffers
Make upper-left corner for RGB32 buffers translucent, for testing
blending of AR24 vs XR24.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
-rw-r--r-- | tests/modetest/buffers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index 29b520de..e725c32b 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -854,10 +854,11 @@ fill_tiles_rgb32(const struct format_info *info, unsigned char *mem, div_t d = div(x+y, width); uint32_t rgb32 = 0x00130502 * (d.quot >> 6) + 0x000a1120 * (d.rem >> 6); + uint32_t alpha = ((y < height/2) && (x < width/2)) ? 127 : 255; uint32_t color = MAKE_RGBA(rgb, (rgb32 >> 16) & 0xff, (rgb32 >> 8) & 0xff, rgb32 & 0xff, - 255); + alpha); ((uint32_t *)mem)[x] = color; } |