mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-22 11:50:36 +02:00
kopper: determine modifier support per-drawable
this should more accurately block modifier usage when not supported Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24075>
This commit is contained in:
parent
a9efabd8f3
commit
f9d62b4c0b
2 changed files with 4 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ struct dri_drawable
|
|||
struct kopper_loader_info info;
|
||||
__DRIimage *image; //texture_from_pixmap
|
||||
bool is_window;
|
||||
bool has_modifiers;
|
||||
|
||||
/* hooks filled in by dri2 & drisw */
|
||||
void (*allocate_textures)(struct dri_context *ctx,
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ kopper_get_pixmap_buffer(struct dri_drawable *drawable,
|
|||
struct dri_screen *screen = drawable->screen;
|
||||
|
||||
#ifdef HAVE_DRI3_MODIFIERS
|
||||
if (screen->has_modifiers) {
|
||||
if (drawable->has_modifiers) {
|
||||
xcb_dri3_buffers_from_pixmap_cookie_t bps_cookie;
|
||||
xcb_dri3_buffers_from_pixmap_reply_t *bps_reply;
|
||||
xcb_generic_error_t *error;
|
||||
|
|
@ -900,6 +900,8 @@ kopperCreateNewDrawable(__DRIscreen *psp,
|
|||
struct dri_screen *screen = dri_screen(psp);
|
||||
struct dri_drawable *drawable =
|
||||
screen->create_drawable(screen, &config->modes, info->is_pixmap, data);
|
||||
if (drawable)
|
||||
drawable->has_modifiers = screen->has_modifiers && info->multiplanes_available;
|
||||
|
||||
return opaque_dri_drawable(drawable);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue