diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 7fa90f3e80e..732548c3b0f 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -1350,22 +1350,10 @@ dri2_create_image(__DRIscreen *_screen, static __DRIimage * dri2_create_image_with_modifiers(__DRIscreen *dri_screen, - int width, int height, int format, - const uint64_t *modifiers, - const unsigned count, - void *loaderPrivate) -{ - return dri2_create_image_common(dri_screen, width, height, format, - __DRI_IMAGE_USE_SHARE, modifiers, count, - loaderPrivate); -} - -static __DRIimage * -dri2_create_image_with_modifiers2(__DRIscreen *dri_screen, - int width, int height, int format, - const uint64_t *modifiers, - const unsigned count, unsigned int use, - void *loaderPrivate) + int width, int height, int format, + const uint64_t *modifiers, + const unsigned count, unsigned int use, + void *loaderPrivate) { return dri2_create_image_common(dri_screen, width, height, format, use, modifiers, count, loaderPrivate); @@ -2054,7 +2042,6 @@ static const __DRIimageExtension dri2ImageExtensionTempl = { .queryDmaBufFormats = NULL, .queryDmaBufModifiers = NULL, .queryDmaBufFormatModifierAttribs = NULL, - .createImageWithModifiers2 = NULL, .queryCompressionRates = NULL, .queryCompressionModifiers = NULL, }; @@ -2083,7 +2070,6 @@ const __DRIimageExtension driVkImageExtension = { .queryDmaBufFormats = dri2_query_dma_buf_formats, .queryDmaBufModifiers = dri2_query_dma_buf_modifiers, .queryDmaBufFormatModifierAttribs = dri2_query_dma_buf_format_modifier_attribs, - .createImageWithModifiers2 = dri2_create_image_with_modifiers2, }; const __DRIimageExtension driVkImageExtensionSw = { @@ -2337,8 +2323,6 @@ dri2_init_screen_extensions(struct dri_screen *screen, if (pscreen->resource_create_with_modifiers) { screen->image_extension.createImageWithModifiers = dri2_create_image_with_modifiers; - screen->image_extension.createImageWithModifiers2 = - dri2_create_image_with_modifiers2; } if (pscreen->get_param(pscreen, PIPE_CAP_NATIVE_FENCE_FD)) { diff --git a/src/gallium/include/mesa_interface.h b/src/gallium/include/mesa_interface.h index 79839b46432..601220c4480 100644 --- a/src/gallium/include/mesa_interface.h +++ b/src/gallium/include/mesa_interface.h @@ -1556,30 +1556,6 @@ struct __DRIimageExtensionRec { */ void (*unmapImage)(__DRIcontext *context, __DRIimage *image, void *data); - - /** - * Creates an image with implementation's favorite modifiers. - * - * This acts like createImage except there is a list of modifiers passed in - * which the implementation may selectively use to create the DRIimage. The - * result should be the implementation selects one modifier (perhaps it would - * hold on to a few and later pick). - * - * The created image should be destroyed with destroyImage(). - * - * Returns the new DRIimage. The chosen modifier can be obtained later on - * and passed back to things like the kernel's AddFB2 interface. - * - * \sa __DRIimageRec::createImage - * - * \since 14 - */ - __DRIimage *(*createImageWithModifiers)(__DRIscreen *screen, - int width, int height, int format, - const uint64_t *modifiers, - const unsigned int modifier_count, - void *loaderPrivate); - /* * Like createImageFromDmaBufs, with fewer options. * @@ -1697,8 +1673,6 @@ struct __DRIimageExtensionRec { * Creates an image with implementation's favorite modifiers and the * provided usage flags. * - * This acts like createImageWithModifiers except usage is also specified. - * * The created image should be destroyed with destroyImage(). * * Returns the new DRIimage. The chosen modifier can be obtained later on @@ -1708,12 +1682,12 @@ struct __DRIimageExtensionRec { * * \since 19 */ - __DRIimage *(*createImageWithModifiers2)(__DRIscreen *screen, - int width, int height, int format, - const uint64_t *modifiers, - const unsigned int modifier_count, - unsigned int use, - void *loaderPrivate); + __DRIimage *(*createImageWithModifiers)(__DRIscreen *screen, + int width, int height, int format, + const uint64_t *modifiers, + const unsigned int modifier_count, + unsigned int use, + void *loaderPrivate); /** * Set an in-fence-fd on the image. If a fence-fd is already set diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 24f3c0bcb55..6e3517b391d 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -981,7 +981,7 @@ gbm_dri_bo_create(struct gbm_device *gbm, /* Gallium drivers requires shared in order to get the handle/stride */ dri_use |= __DRI_IMAGE_USE_SHARE; - if (modifiers && !dri->image->createImageWithModifiers2) { + if (modifiers && !dri->image->createImageWithModifiers) { errno = ENOSYS; goto failed; } @@ -1166,7 +1166,7 @@ gbm_dri_surface_create(struct gbm_device *gbm, struct gbm_dri_device *dri = gbm_dri_device(gbm); struct gbm_dri_surface *surf; - if (modifiers && !dri->image->createImageWithModifiers2) { + if (modifiers && !dri->image->createImageWithModifiers) { errno = ENOSYS; return NULL; } diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 177bad87d31..96910cc37af 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1463,7 +1463,7 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, #ifdef HAVE_DRI3_MODIFIERS if (draw->multiplanes_available && draw->ext->image->queryDmaBufModifiers && - draw->ext->image->createImageWithModifiers2) { + draw->ext->image->createImageWithModifiers) { xcb_dri3_get_supported_modifiers_cookie_t mod_cookie; xcb_dri3_get_supported_modifiers_reply_t *mod_reply; xcb_generic_error_t *error = NULL; diff --git a/src/loader/loader_dri_helper.c b/src/loader/loader_dri_helper.c index 145452e2d12..c22e2a1a86a 100644 --- a/src/loader/loader_dri_helper.c +++ b/src/loader/loader_dri_helper.c @@ -38,7 +38,7 @@ __DRIimage *loader_dri_create_image(__DRIscreen *screen, unsigned int modifiers_count, void *loaderPrivate) { - if (modifiers && modifiers_count > 0 && image->createImageWithModifiers2) { + if (modifiers && modifiers_count > 0 && image->createImageWithModifiers) { bool has_valid_modifier = false; int i; @@ -57,10 +57,10 @@ __DRIimage *loader_dri_create_image(__DRIscreen *screen, if (!has_valid_modifier) return NULL; - return image->createImageWithModifiers2(screen, width, height, - dri_format, modifiers, - modifiers_count, dri_usage, - loaderPrivate); + return image->createImageWithModifiers(screen, width, height, + dri_format, modifiers, + modifiers_count, dri_usage, + loaderPrivate); } /* No modifier given or fallback to the legacy createImage allowed */