dri: Remove old createImageWithModifiers
Everyone can use createImageWithModifiers2, which is now just called createImageWithModifiers. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
This commit is contained in:
@@ -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)) {
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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 */
|
||||
|
Reference in New Issue
Block a user