mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 19:50:12 +01:00
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>
This commit is contained in:
parent
8f66c98818
commit
b958d76f77
1 changed files with 2 additions and 1 deletions
|
|
@ -854,10 +854,11 @@ fill_tiles_rgb32(const struct format_info *info, unsigned char *mem,
|
||||||
div_t d = div(x+y, width);
|
div_t d = div(x+y, width);
|
||||||
uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
|
uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
|
||||||
+ 0x000a1120 * (d.rem >> 6);
|
+ 0x000a1120 * (d.rem >> 6);
|
||||||
|
uint32_t alpha = ((y < height/2) && (x < width/2)) ? 127 : 255;
|
||||||
uint32_t color =
|
uint32_t color =
|
||||||
MAKE_RGBA(rgb, (rgb32 >> 16) & 0xff,
|
MAKE_RGBA(rgb, (rgb32 >> 16) & 0xff,
|
||||||
(rgb32 >> 8) & 0xff, rgb32 & 0xff,
|
(rgb32 >> 8) & 0xff, rgb32 & 0xff,
|
||||||
255);
|
alpha);
|
||||||
|
|
||||||
((uint32_t *)mem)[x] = color;
|
((uint32_t *)mem)[x] = color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue