dri: Add config attributes for color channel shift
authorKevin Strasser <kevin.strasser@intel.com>
Fri, 25 Jan 2019 00:11:11 +0000 (16:11 -0800)
committerAdam Jackson <ajax@nwnk.net>
Wed, 21 Aug 2019 18:36:57 +0000 (18:36 +0000)
commit5a747306ce6dd3021c15cfabc83465ec3fb4bb1c
treeb2023d6e7d6f91aeb169a13b7cfd47ced1b344ee
parent9328e7c04cd86c0eff00fb91061a0fdbf7b1e149
dri: Add config attributes for color channel shift

The existing mask attributes can only support up to 32 bpp. Introduce
per-channel SHIFT attributes that indicate how many bits, from lsb towards
msb, the bit field is offset. A shift of -1 will indicate that there is no
bit field set for the channel.

As old loaders will still be looking for masks, we set the masks to 0 for
any formats wider than 32 bpp.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
include/GL/internal/dri_interface.h
src/mesa/drivers/dri/common/utils.c
src/mesa/main/context.c
src/mesa/main/mtypes.h