dri: collapse some modifier/dmabuf checks
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
This commit is contained in:
committed by
Marge Bot
parent
140ebeaad4
commit
baae0940e3
@@ -92,7 +92,6 @@ struct dri_drawable
|
||||
__DRIimage *image; //texture_from_pixmap
|
||||
bool is_window;
|
||||
bool window_valid;
|
||||
bool has_modifiers;
|
||||
|
||||
/* hooks filled in by dri2 & drisw */
|
||||
void (*allocate_textures)(struct dri_context *ctx,
|
||||
|
||||
@@ -647,7 +647,6 @@ dri_init_screen(struct dri_screen *screen,
|
||||
if (pscreen->get_param(pscreen, PIPE_CAP_DEVICE_PROTECTED_CONTEXT))
|
||||
screen->has_protected_context = true;
|
||||
screen->has_reset_status_query = pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY);
|
||||
screen->has_modifiers = pscreen->query_dmabuf_modifiers != NULL;
|
||||
|
||||
|
||||
#ifdef HAVE_LIBDRM
|
||||
|
||||
@@ -129,7 +129,6 @@ struct dri_screen
|
||||
/* kopper */
|
||||
struct pipe_screen *unwrapped_screen;
|
||||
bool has_dmabuf;
|
||||
bool has_modifiers;
|
||||
bool is_sw;
|
||||
|
||||
struct dri_drawable *(*create_drawable)(struct dri_screen *screen,
|
||||
|
||||
@@ -158,7 +158,7 @@ kopper_get_pixmap_buffer(struct dri_drawable *drawable,
|
||||
struct dri_screen *screen = drawable->screen;
|
||||
|
||||
drawable->image = loader_dri3_get_pixmap_buffer(conn, pixmap, opaque_dri_screen(screen),
|
||||
fourcc, drawable->has_modifiers, &width, &height, drawable);
|
||||
fourcc, drawable->screen->dmabuf_import, &width, &height, drawable);
|
||||
if (!drawable->image)
|
||||
return NULL;
|
||||
|
||||
@@ -620,8 +620,6 @@ 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user