mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
dri2: Require a loader with working buffer invalidation
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10808>
This commit is contained in:
parent
4d0179af32
commit
68aa2099fa
5 changed files with 5 additions and 14 deletions
|
|
@ -2477,7 +2477,6 @@ dri2_init_screen(__DRIscreen * sPriv)
|
||||||
|
|
||||||
screen->can_share_buffer = true;
|
screen->can_share_buffer = true;
|
||||||
screen->auto_fake_front = dri_with_format(sPriv);
|
screen->auto_fake_front = dri_with_format(sPriv);
|
||||||
screen->broken_invalidate = !sPriv->dri2.useInvalidate;
|
|
||||||
screen->lookup_egl_image = dri2_lookup_egl_image;
|
screen->lookup_egl_image = dri2_lookup_egl_image;
|
||||||
|
|
||||||
const __DRIimageLookupExtension *loader = sPriv->dri2.image;
|
const __DRIimageLookupExtension *loader = sPriv->dri2.image;
|
||||||
|
|
@ -2540,7 +2539,6 @@ dri_kms_init_screen(__DRIscreen * sPriv)
|
||||||
|
|
||||||
screen->can_share_buffer = false;
|
screen->can_share_buffer = false;
|
||||||
screen->auto_fake_front = dri_with_format(sPriv);
|
screen->auto_fake_front = dri_with_format(sPriv);
|
||||||
screen->broken_invalidate = !sPriv->dri2.useInvalidate;
|
|
||||||
screen->lookup_egl_image = dri2_lookup_egl_image;
|
screen->lookup_egl_image = dri2_lookup_egl_image;
|
||||||
|
|
||||||
const __DRIimageLookupExtension *loader = sPriv->dri2.image;
|
const __DRIimageLookupExtension *loader = sPriv->dri2.image;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ dri_st_framebuffer_validate(struct st_context_iface *stctx,
|
||||||
lastStamp = drawable->dPriv->lastStamp;
|
lastStamp = drawable->dPriv->lastStamp;
|
||||||
new_stamp = (drawable->texture_stamp != lastStamp);
|
new_stamp = (drawable->texture_stamp != lastStamp);
|
||||||
|
|
||||||
if (new_stamp || new_mask || screen->broken_invalidate) {
|
if (new_stamp || new_mask) {
|
||||||
if (new_stamp && drawable->update_drawable_info)
|
if (new_stamp && drawable->update_drawable_info)
|
||||||
drawable->update_drawable_info(drawable);
|
drawable->update_drawable_info(drawable);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -763,14 +763,7 @@ static int
|
||||||
dri_get_param(struct st_manager *smapi,
|
dri_get_param(struct st_manager *smapi,
|
||||||
enum st_manager_param param)
|
enum st_manager_param param)
|
||||||
{
|
{
|
||||||
struct dri_screen *screen = (struct dri_screen *)smapi;
|
return 0;
|
||||||
|
|
||||||
switch(param) {
|
|
||||||
case ST_MANAGER_BROKEN_INVALIDATE:
|
|
||||||
return screen->broken_invalidate;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@ struct dri_screen
|
||||||
struct st_manager base;
|
struct st_manager base;
|
||||||
struct st_api *st_api;
|
struct st_api *st_api;
|
||||||
|
|
||||||
/* on old libGL's invalidate doesn't get called as it should */
|
|
||||||
boolean broken_invalidate;
|
|
||||||
|
|
||||||
/* dri */
|
/* dri */
|
||||||
__DRIscreen *sPriv;
|
__DRIscreen *sPriv;
|
||||||
boolean throttle;
|
boolean throttle;
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,9 @@ driCreateNewScreen2(int scrn, int fd,
|
||||||
}
|
}
|
||||||
|
|
||||||
setupLoaderExtensions(psp, extensions);
|
setupLoaderExtensions(psp, extensions);
|
||||||
|
// dri2 drivers require working invalidate
|
||||||
|
if (fd != -1 && !psp->dri2.useInvalidate)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
psp->loaderPrivate = data;
|
psp->loaderPrivate = data;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue