mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
egl: Drop backwards compat for missing __DRI_ATTRIB_*_SHIFT.
The only implementation supports it. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20171>
This commit is contained in:
parent
a145a8301e
commit
433c6f5d3a
1 changed files with 4 additions and 18 deletions
|
|
@ -339,24 +339,10 @@ dri2_get_shifts_and_sizes(const __DRIcoreExtension *core,
|
|||
const __DRIconfig *config, int *shifts,
|
||||
unsigned int *sizes)
|
||||
{
|
||||
unsigned int mask;
|
||||
|
||||
if (core->getConfigAttrib(config, __DRI_ATTRIB_RED_SHIFT, (unsigned int *)&shifts[0])) {
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_GREEN_SHIFT, (unsigned int *)&shifts[1]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_BLUE_SHIFT, (unsigned int *)&shifts[2]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_ALPHA_SHIFT, (unsigned int *)&shifts[3]);
|
||||
} else {
|
||||
/* Driver isn't exposing shifts, so convert masks to shifts */
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_RED_MASK, &mask);
|
||||
shifts[0] = ffs(mask) - 1;
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_GREEN_MASK, &mask);
|
||||
shifts[1] = ffs(mask) - 1;
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_BLUE_MASK, &mask);
|
||||
shifts[2] = ffs(mask) - 1;
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_ALPHA_MASK, &mask);
|
||||
shifts[3] = ffs(mask) - 1;
|
||||
}
|
||||
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_RED_SHIFT, (unsigned int *)&shifts[0]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_GREEN_SHIFT, (unsigned int *)&shifts[1]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_BLUE_SHIFT, (unsigned int *)&shifts[2]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_ALPHA_SHIFT, (unsigned int *)&shifts[3]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_RED_SIZE, &sizes[0]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_GREEN_SIZE, &sizes[1]);
|
||||
core->getConfigAttrib(config, __DRI_ATTRIB_BLUE_SIZE, &sizes[2]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue