drmmode: Track if BO allocation used modifiers
Keep track of whether or not we fed modifiers into GBM when we allocated a BO. We'll use this later inside Glamor, to reallocate buffer storage if we allocate buffer storage using modifiers, and a non-modifier-aware client requests an export of that pixmap. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
75bba3aedc
commit
0e9504e10c
|
@ -752,13 +752,16 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
|
|||
format, modifiers,
|
||||
num_modifiers);
|
||||
free(modifiers);
|
||||
if (bo->gbm)
|
||||
if (bo->gbm) {
|
||||
bo->used_modifiers = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bo->gbm = gbm_bo_create(drmmode->gbm, width, height, format,
|
||||
GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT);
|
||||
bo->used_modifiers = FALSE;
|
||||
return bo->gbm != NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -75,6 +75,7 @@ typedef struct {
|
|||
uint32_t height;
|
||||
struct dumb_bo *dumb;
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
Bool used_modifiers;
|
||||
struct gbm_bo *gbm;
|
||||
#endif
|
||||
} drmmode_bo;
|
||||
|
|
Loading…
Reference in New Issue
Block a user