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>
This commit is contained in:

committed by
Adam Jackson

parent
9328e7c04c
commit
5a747306ce
@@ -1564,9 +1564,12 @@ check_compatible(const struct gl_context *ctx,
|
||||
ctxvis->foo != bufvis->foo) \
|
||||
return GL_FALSE
|
||||
|
||||
check_component(redMask);
|
||||
check_component(greenMask);
|
||||
check_component(blueMask);
|
||||
check_component(redShift);
|
||||
check_component(greenShift);
|
||||
check_component(blueShift);
|
||||
check_component(redBits);
|
||||
check_component(greenBits);
|
||||
check_component(blueBits);
|
||||
check_component(depthBits);
|
||||
check_component(stencilBits);
|
||||
|
||||
|
Reference in New Issue
Block a user