Revert "egl: Fixes transparency with EGL and X11."
This reverts commit 90a19074b4
.
This commit is contained in:
@@ -813,8 +813,7 @@ struct __DRIuseInvalidateExtensionRec {
|
|||||||
#define __DRI_ATTRIB_GREEN_SHIFT 51
|
#define __DRI_ATTRIB_GREEN_SHIFT 51
|
||||||
#define __DRI_ATTRIB_BLUE_SHIFT 52
|
#define __DRI_ATTRIB_BLUE_SHIFT 52
|
||||||
#define __DRI_ATTRIB_ALPHA_SHIFT 53
|
#define __DRI_ATTRIB_ALPHA_SHIFT 53
|
||||||
#define __DRI_ATTRIB_CONFIG_SELECT_GROUP 54
|
#define __DRI_ATTRIB_MAX 54
|
||||||
#define __DRI_ATTRIB_MAX 55
|
|
||||||
|
|
||||||
/* __DRI_ATTRIB_RENDER_TYPE */
|
/* __DRI_ATTRIB_RENDER_TYPE */
|
||||||
#define __DRI_ATTRIB_RGBA_BIT 0x01
|
#define __DRI_ATTRIB_RGBA_BIT 0x01
|
||||||
|
@@ -187,7 +187,6 @@ static const EGLint dri2_to_egl_attribute_map[__DRI_ATTRIB_MAX] = {
|
|||||||
[__DRI_ATTRIB_MAX_SWAP_INTERVAL] = EGL_MAX_SWAP_INTERVAL,
|
[__DRI_ATTRIB_MAX_SWAP_INTERVAL] = EGL_MAX_SWAP_INTERVAL,
|
||||||
[__DRI_ATTRIB_MIN_SWAP_INTERVAL] = EGL_MIN_SWAP_INTERVAL,
|
[__DRI_ATTRIB_MIN_SWAP_INTERVAL] = EGL_MIN_SWAP_INTERVAL,
|
||||||
[__DRI_ATTRIB_YINVERTED] = EGL_Y_INVERTED_NOK,
|
[__DRI_ATTRIB_YINVERTED] = EGL_Y_INVERTED_NOK,
|
||||||
[__DRI_ATTRIB_CONFIG_SELECT_GROUP] = EGL_CONFIG_SELECT_GROUP_MESA,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const __DRIconfig *
|
const __DRIconfig *
|
||||||
@@ -203,9 +202,6 @@ dri2_get_dri_config(struct dri2_egl_config *conf, EGLint surface_type,
|
|||||||
static EGLBoolean
|
static EGLBoolean
|
||||||
dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria)
|
dri2_match_config(const _EGLConfig *conf, const _EGLConfig *criteria)
|
||||||
{
|
{
|
||||||
if (conf->NativeVisualID != criteria->NativeVisualID)
|
|
||||||
return EGL_FALSE;
|
|
||||||
|
|
||||||
if (_eglCompareConfigs(conf, criteria, NULL, EGL_FALSE) != 0)
|
if (_eglCompareConfigs(conf, criteria, NULL, EGL_FALSE) != 0)
|
||||||
return EGL_FALSE;
|
return EGL_FALSE;
|
||||||
|
|
||||||
|
@@ -816,25 +816,28 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
|
|||||||
if (dri2_conf->base.ConfigID == config_count + 1)
|
if (dri2_conf->base.ConfigID == config_count + 1)
|
||||||
config_count++;
|
config_count++;
|
||||||
|
|
||||||
/* Allows RGB visuals to match a 32-bit RGBA EGLConfig.
|
/* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig.
|
||||||
|
* Ditto for 30-bit RGB visuals to match a 32-bit RGBA EGLConfig.
|
||||||
* Otherwise it will only match a 32-bit RGBA visual. On a
|
* Otherwise it will only match a 32-bit RGBA visual. On a
|
||||||
* composited window manager on X11, this will make all of the
|
* composited window manager on X11, this will make all of the
|
||||||
* EGLConfigs with destination alpha get blended by the
|
* EGLConfigs with destination alpha get blended by the
|
||||||
* compositor. This is probably not what the application
|
* compositor. This is probably not what the application
|
||||||
* wants... especially on drivers that only have 32-bit RGBA
|
* wants... especially on drivers that only have 32-bit RGBA
|
||||||
* EGLConfigs! */
|
* EGLConfigs! */
|
||||||
unsigned int rgba_mask = ~(visuals[i].red_mask |
|
if (d.data->depth == 24 || d.data->depth == 30) {
|
||||||
visuals[i].green_mask |
|
unsigned int rgba_mask = ~(visuals[i].red_mask |
|
||||||
visuals[i].blue_mask);
|
visuals[i].green_mask |
|
||||||
rgba_shifts[3] = ffs(rgba_mask) - 1;
|
visuals[i].blue_mask);
|
||||||
rgba_sizes[3] = util_bitcount(rgba_mask);
|
rgba_shifts[3] = ffs(rgba_mask) - 1;
|
||||||
dri2_conf = dri2_add_config(disp, config, config_count + 1,
|
rgba_sizes[3] = util_bitcount(rgba_mask);
|
||||||
surface_type, config_attrs,
|
dri2_conf = dri2_add_config(disp, config, config_count + 1,
|
||||||
rgba_shifts, rgba_sizes);
|
surface_type, config_attrs,
|
||||||
if (dri2_conf)
|
rgba_shifts, rgba_sizes);
|
||||||
if (dri2_conf->base.ConfigID == config_count + 1)
|
if (dri2_conf)
|
||||||
config_count++;
|
if (dri2_conf->base.ConfigID == config_count + 1)
|
||||||
}
|
config_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xcb_depth_next(&d);
|
xcb_depth_next(&d);
|
||||||
|
@@ -258,9 +258,6 @@ static const struct {
|
|||||||
{ EGL_COLOR_COMPONENT_TYPE_EXT, ATTRIB_TYPE_ENUM,
|
{ EGL_COLOR_COMPONENT_TYPE_EXT, ATTRIB_TYPE_ENUM,
|
||||||
ATTRIB_CRITERION_EXACT,
|
ATTRIB_CRITERION_EXACT,
|
||||||
EGL_COLOR_COMPONENT_TYPE_FIXED_EXT },
|
EGL_COLOR_COMPONENT_TYPE_FIXED_EXT },
|
||||||
{ EGL_CONFIG_SELECT_GROUP_MESA, ATTRIB_TYPE_INTEGER,
|
|
||||||
ATTRIB_CRITERION_IGNORE,
|
|
||||||
0 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -299,8 +296,6 @@ _eglValidateConfig(const _EGLConfig *conf, EGLBoolean for_matching)
|
|||||||
if (val > 1 || val < 0)
|
if (val > 1 || val < 0)
|
||||||
valid = EGL_FALSE;
|
valid = EGL_FALSE;
|
||||||
break;
|
break;
|
||||||
case EGL_CONFIG_SELECT_GROUP_MESA:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
if (val < 0)
|
if (val < 0)
|
||||||
valid = EGL_FALSE;
|
valid = EGL_FALSE;
|
||||||
@@ -613,10 +608,6 @@ _eglCompareConfigs(const _EGLConfig *conf1, const _EGLConfig *conf2,
|
|||||||
if (conf1 == conf2)
|
if (conf1 == conf2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
val1 = conf1->ConfigSelectGroup - conf2->ConfigSelectGroup;
|
|
||||||
if (val1)
|
|
||||||
return val1;
|
|
||||||
|
|
||||||
/* the enum values have the desired ordering */
|
/* the enum values have the desired ordering */
|
||||||
STATIC_ASSERT(EGL_NONE < EGL_SLOW_CONFIG);
|
STATIC_ASSERT(EGL_NONE < EGL_SLOW_CONFIG);
|
||||||
STATIC_ASSERT(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG);
|
STATIC_ASSERT(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG);
|
||||||
|
@@ -89,7 +89,6 @@ struct _egl_config
|
|||||||
EGLint FramebufferTargetAndroid;
|
EGLint FramebufferTargetAndroid;
|
||||||
EGLint RecordableAndroid;
|
EGLint RecordableAndroid;
|
||||||
EGLint ComponentType;
|
EGLint ComponentType;
|
||||||
EGLint ConfigSelectGroup;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -140,7 +139,6 @@ _eglOffsetOfConfig(EGLint attr)
|
|||||||
ATTRIB_MAP(EGL_FRAMEBUFFER_TARGET_ANDROID, FramebufferTargetAndroid);
|
ATTRIB_MAP(EGL_FRAMEBUFFER_TARGET_ANDROID, FramebufferTargetAndroid);
|
||||||
ATTRIB_MAP(EGL_RECORDABLE_ANDROID, RecordableAndroid);
|
ATTRIB_MAP(EGL_RECORDABLE_ANDROID, RecordableAndroid);
|
||||||
ATTRIB_MAP(EGL_COLOR_COMPONENT_TYPE_EXT, ComponentType);
|
ATTRIB_MAP(EGL_COLOR_COMPONENT_TYPE_EXT, ComponentType);
|
||||||
ATTRIB_MAP(EGL_CONFIG_SELECT_GROUP_MESA, ConfigSelectGroup);
|
|
||||||
#undef ATTRIB_MAP
|
#undef ATTRIB_MAP
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
@@ -70,8 +70,7 @@ struct _egl_global _eglGlobal =
|
|||||||
" EGL_EXT_device_query"
|
" EGL_EXT_device_query"
|
||||||
" EGL_EXT_platform_base"
|
" EGL_EXT_platform_base"
|
||||||
" EGL_KHR_client_get_all_proc_addresses"
|
" EGL_KHR_client_get_all_proc_addresses"
|
||||||
" EGL_KHR_debug"
|
" EGL_KHR_debug",
|
||||||
" EGL_MESA_config_select_group",
|
|
||||||
|
|
||||||
.PlatformExtensionString =
|
.PlatformExtensionString =
|
||||||
#ifdef HAVE_WAYLAND_PLATFORM
|
#ifdef HAVE_WAYLAND_PLATFORM
|
||||||
|
@@ -379,7 +379,6 @@ driCreateConfigs(mesa_format format,
|
|||||||
modes->yInverted = GL_TRUE;
|
modes->yInverted = GL_TRUE;
|
||||||
modes->sRGBCapable = is_srgb;
|
modes->sRGBCapable = is_srgb;
|
||||||
modes->mutableRenderBuffer = mutable_render_buffer;
|
modes->mutableRenderBuffer = mutable_render_buffer;
|
||||||
modes->configSelectGroup = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -469,7 +468,6 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
|
|||||||
__ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
|
__ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
|
||||||
__ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable),
|
__ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable),
|
||||||
__ATTRIB(__DRI_ATTRIB_MUTABLE_RENDER_BUFFER, mutableRenderBuffer),
|
__ATTRIB(__DRI_ATTRIB_MUTABLE_RENDER_BUFFER, mutableRenderBuffer),
|
||||||
__ATTRIB(__DRI_ATTRIB_CONFIG_SELECT_GROUP, configSelectGroup),
|
|
||||||
|
|
||||||
/* The struct field doesn't matter here, these are handled by the
|
/* The struct field doesn't matter here, these are handled by the
|
||||||
* switch in driGetConfigAttribIndex. We need them in the array
|
* switch in driGetConfigAttribIndex. We need them in the array
|
||||||
|
@@ -211,9 +211,6 @@ struct gl_config
|
|||||||
|
|
||||||
/* EGL_KHR_mutable_render_buffer */
|
/* EGL_KHR_mutable_render_buffer */
|
||||||
GLuint mutableRenderBuffer; /* bool */
|
GLuint mutableRenderBuffer; /* bool */
|
||||||
|
|
||||||
/* EGL_MESA_config_select_group */
|
|
||||||
GLint configSelectGroup;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user