mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 01:38:06 +02:00
dri: use image loader function directly in dri_create_image_with_modifiers
it can't be anything else Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
This commit is contained in:
parent
2b042cb9c2
commit
35d518fcde
5 changed files with 8 additions and 10 deletions
|
|
@ -1070,7 +1070,7 @@ create_dri_image(struct dri2_egl_surface *dri2_surf,
|
|||
}
|
||||
|
||||
dri2_surf->back->dri_image = dri_create_image_with_modifiers(
|
||||
dri2_dpy->dri_screen_render_gpu, dri2_dpy->image, dri2_surf->base.Width,
|
||||
dri2_dpy->dri_screen_render_gpu, dri2_surf->base.Width,
|
||||
dri2_surf->base.Height, pipe_format,
|
||||
(dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu) ? 0 : use_flags,
|
||||
modifiers, num_modifiers, NULL);
|
||||
|
|
@ -1211,7 +1211,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
|||
|
||||
if (dri2_dpy->dri_screen_display_gpu) {
|
||||
linear_copy_display_gpu_image = dri_create_image_with_modifiers(
|
||||
dri2_dpy->dri_screen_display_gpu, dri2_dpy->image,
|
||||
dri2_dpy->dri_screen_display_gpu,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height,
|
||||
linear_pipe_format, use_flags | __DRI_IMAGE_USE_LINEAR,
|
||||
&linear_mod, 1, NULL);
|
||||
|
|
@ -1296,7 +1296,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
|||
|
||||
if (!dri2_surf->back->linear_copy) {
|
||||
dri2_surf->back->linear_copy = dri_create_image_with_modifiers(
|
||||
dri2_dpy->dri_screen_render_gpu, dri2_dpy->image,
|
||||
dri2_dpy->dri_screen_render_gpu,
|
||||
dri2_surf->base.Width, dri2_surf->base.Height,
|
||||
linear_pipe_format, use_flags | __DRI_IMAGE_USE_LINEAR,
|
||||
&linear_mod, 1, NULL);
|
||||
|
|
|
|||
|
|
@ -735,7 +735,6 @@ dri_query_dma_buf_formats(__DRIscreen *_screen, int max, int *formats,
|
|||
|
||||
__DRIimage *
|
||||
dri_create_image_with_modifiers(__DRIscreen *screen,
|
||||
const __DRIimageExtension *image,
|
||||
uint32_t width, uint32_t height,
|
||||
uint32_t dri_format, uint32_t dri_usage,
|
||||
const uint64_t *modifiers,
|
||||
|
|
@ -762,8 +761,8 @@ dri_create_image_with_modifiers(__DRIscreen *screen,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return image->createImage(screen, width, height, dri_format,
|
||||
modifiers, modifiers_count, dri_usage,
|
||||
loaderPrivate);
|
||||
return dri_create_image(screen, width, height, dri_format,
|
||||
modifiers, modifiers_count, dri_usage,
|
||||
loaderPrivate);
|
||||
}
|
||||
/* vim: set sw=3 ts=8 sts=3 expandtab: */
|
||||
|
|
|
|||
|
|
@ -284,7 +284,6 @@ dri2_query_dma_buf_format_modifier_attribs(__DRIscreen *_screen,
|
|||
int attrib, uint64_t *value);
|
||||
PUBLIC __DRIimage *
|
||||
dri_create_image_with_modifiers(__DRIscreen *screen,
|
||||
const __DRIimageExtension *image,
|
||||
uint32_t width, uint32_t height,
|
||||
uint32_t dri_format, uint32_t dri_usage,
|
||||
const uint64_t *modifiers,
|
||||
|
|
|
|||
|
|
@ -1045,7 +1045,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
|||
mods_comp = NULL;
|
||||
}
|
||||
|
||||
bo->image = dri_create_image_with_modifiers(dri->screen, dri->image, width, height,
|
||||
bo->image = dri_create_image_with_modifiers(dri->screen, width, height,
|
||||
dri_format, dri_use,
|
||||
mods_filtered ? mods_filtered : modifiers,
|
||||
mods_filtered ? count_filtered : count,
|
||||
|
|
|
|||
|
|
@ -1467,7 +1467,7 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int fourcc,
|
|||
free(mod_reply);
|
||||
}
|
||||
#endif
|
||||
buffer->image = dri_create_image_with_modifiers(draw->dri_screen_render_gpu, draw->ext->image,
|
||||
buffer->image = dri_create_image_with_modifiers(draw->dri_screen_render_gpu,
|
||||
width, height, format,
|
||||
__DRI_IMAGE_USE_SHARE |
|
||||
__DRI_IMAGE_USE_SCANOUT |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue