dri: Drop old createImageFromRenderbuffer()
... and rename createImageFromRenderbuffer2() to be it. We don't need to maintain the old function and struct layout, because we're version locked between loader and driver. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
This commit is contained in:
@@ -2192,27 +2192,15 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx,
|
|||||||
return EGL_NO_IMAGE_KHR;
|
return EGL_NO_IMAGE_KHR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dri2_dpy->image->base.version >= 17 &&
|
unsigned error = ~0;
|
||||||
dri2_dpy->image->createImageFromRenderbuffer2) {
|
dri_image = dri2_dpy->image->createImageFromRenderbuffer(
|
||||||
unsigned error = ~0;
|
dri2_ctx->dri_context, renderbuffer, NULL, &error);
|
||||||
|
|
||||||
dri_image = dri2_dpy->image->createImageFromRenderbuffer2(
|
assert(!!dri_image == (error == __DRI_IMAGE_ERROR_SUCCESS));
|
||||||
dri2_ctx->dri_context, renderbuffer, NULL, &error);
|
|
||||||
|
|
||||||
assert(!!dri_image == (error == __DRI_IMAGE_ERROR_SUCCESS));
|
if (!dri_image) {
|
||||||
|
_eglError(egl_error_from_dri_image_error(error), "dri2_create_image_khr");
|
||||||
if (!dri_image) {
|
return EGL_NO_IMAGE_KHR;
|
||||||
_eglError(egl_error_from_dri_image_error(error),
|
|
||||||
"dri2_create_image_khr");
|
|
||||||
return EGL_NO_IMAGE_KHR;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dri_image = dri2_dpy->image->createImageFromRenderbuffer(
|
|
||||||
dri2_ctx->dri_context, renderbuffer, NULL);
|
|
||||||
if (!dri_image) {
|
|
||||||
_eglError(EGL_BAD_ALLOC, "dri2_create_image_khr");
|
|
||||||
return EGL_NO_IMAGE_KHR;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dri2_create_image_from_dri(disp, dri_image);
|
return dri2_create_image_from_dri(disp, dri_image);
|
||||||
|
@@ -2067,7 +2067,6 @@ static const __DRIimageExtension dri2ImageExtensionTempl = {
|
|||||||
.queryDmaBufFormats = NULL,
|
.queryDmaBufFormats = NULL,
|
||||||
.queryDmaBufModifiers = NULL,
|
.queryDmaBufModifiers = NULL,
|
||||||
.queryDmaBufFormatModifierAttribs = NULL,
|
.queryDmaBufFormatModifierAttribs = NULL,
|
||||||
.createImageFromRenderbuffer2 = dri2_create_image_from_renderbuffer2,
|
|
||||||
.createImageWithModifiers2 = NULL,
|
.createImageWithModifiers2 = NULL,
|
||||||
.queryCompressionRates = NULL,
|
.queryCompressionRates = NULL,
|
||||||
.queryCompressionModifiers = NULL,
|
.queryCompressionModifiers = NULL,
|
||||||
@@ -2098,7 +2097,6 @@ const __DRIimageExtension driVkImageExtension = {
|
|||||||
.queryDmaBufFormats = dri2_query_dma_buf_formats,
|
.queryDmaBufFormats = dri2_query_dma_buf_formats,
|
||||||
.queryDmaBufModifiers = dri2_query_dma_buf_modifiers,
|
.queryDmaBufModifiers = dri2_query_dma_buf_modifiers,
|
||||||
.queryDmaBufFormatModifierAttribs = dri2_query_dma_buf_format_modifier_attribs,
|
.queryDmaBufFormatModifierAttribs = dri2_query_dma_buf_format_modifier_attribs,
|
||||||
.createImageFromRenderbuffer2 = dri2_create_image_from_renderbuffer2,
|
|
||||||
.createImageWithModifiers2 = dri2_create_image_with_modifiers2,
|
.createImageWithModifiers2 = dri2_create_image_with_modifiers2,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2121,7 +2119,6 @@ const __DRIimageExtension driVkImageExtensionSw = {
|
|||||||
.getCapabilities = dri2_get_capabilities,
|
.getCapabilities = dri2_get_capabilities,
|
||||||
.mapImage = dri2_map_image,
|
.mapImage = dri2_map_image,
|
||||||
.unmapImage = dri2_unmap_image,
|
.unmapImage = dri2_unmap_image,
|
||||||
.createImageFromRenderbuffer2 = dri2_create_image_from_renderbuffer2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const __DRIrobustnessExtension dri2Robustness = {
|
static const __DRIrobustnessExtension dri2Robustness = {
|
||||||
|
@@ -288,7 +288,7 @@ dri2_lookup_egl_image_validated(struct dri_screen *screen, void *handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
__DRIimage *
|
__DRIimage *
|
||||||
dri2_create_image_from_renderbuffer2(__DRIcontext *context,
|
dri2_create_image_from_renderbuffer(__DRIcontext *context,
|
||||||
int renderbuffer, void *loaderPrivate,
|
int renderbuffer, void *loaderPrivate,
|
||||||
unsigned *error)
|
unsigned *error)
|
||||||
{
|
{
|
||||||
@@ -356,15 +356,6 @@ dri2_create_image_from_renderbuffer2(__DRIcontext *context,
|
|||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
__DRIimage *
|
|
||||||
dri2_create_image_from_renderbuffer(__DRIcontext *context,
|
|
||||||
int renderbuffer, void *loaderPrivate)
|
|
||||||
{
|
|
||||||
unsigned error;
|
|
||||||
return dri2_create_image_from_renderbuffer2(context, renderbuffer,
|
|
||||||
loaderPrivate, &error);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dri2_destroy_image(__DRIimage *img)
|
dri2_destroy_image(__DRIimage *img)
|
||||||
{
|
{
|
||||||
|
@@ -70,10 +70,6 @@ dri2_lookup_egl_image_validated(struct dri_screen *screen, void *handle);
|
|||||||
|
|
||||||
__DRIimage *
|
__DRIimage *
|
||||||
dri2_create_image_from_renderbuffer(__DRIcontext *context,
|
dri2_create_image_from_renderbuffer(__DRIcontext *context,
|
||||||
int renderbuffer, void *loaderPrivate);
|
|
||||||
|
|
||||||
__DRIimage *
|
|
||||||
dri2_create_image_from_renderbuffer2(__DRIcontext *context,
|
|
||||||
int renderbuffer, void *loaderPrivate,
|
int renderbuffer, void *loaderPrivate,
|
||||||
unsigned *error);
|
unsigned *error);
|
||||||
|
|
||||||
|
@@ -1432,11 +1432,6 @@ struct __DRIimageExtensionRec {
|
|||||||
int name, int pitch,
|
int name, int pitch,
|
||||||
void *loaderPrivate);
|
void *loaderPrivate);
|
||||||
|
|
||||||
/* Deprecated since version 17; see createImageFromRenderbuffer2 */
|
|
||||||
__DRIimage *(*createImageFromRenderbuffer)(__DRIcontext *context,
|
|
||||||
int renderbuffer,
|
|
||||||
void *loaderPrivate);
|
|
||||||
|
|
||||||
void (*destroyImage)(__DRIimage *image);
|
void (*destroyImage)(__DRIimage *image);
|
||||||
|
|
||||||
__DRIimage *(*createImage)(__DRIscreen *screen,
|
__DRIimage *(*createImage)(__DRIscreen *screen,
|
||||||
@@ -1674,13 +1669,11 @@ struct __DRIimageExtensionRec {
|
|||||||
* \param loaderPrivate for callbacks into the loader related to the image
|
* \param loaderPrivate for callbacks into the loader related to the image
|
||||||
* \param error will be set to one of __DRI_IMAGE_ERROR_xxx
|
* \param error will be set to one of __DRI_IMAGE_ERROR_xxx
|
||||||
* \return the newly created image on success, or NULL otherwise
|
* \return the newly created image on success, or NULL otherwise
|
||||||
*
|
|
||||||
* \since 17
|
|
||||||
*/
|
*/
|
||||||
__DRIimage *(*createImageFromRenderbuffer2)(__DRIcontext *context,
|
__DRIimage *(*createImageFromRenderbuffer)(__DRIcontext *context,
|
||||||
int renderbuffer,
|
int renderbuffer,
|
||||||
void *loaderPrivate,
|
void *loaderPrivate,
|
||||||
unsigned *error);
|
unsigned *error);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Like createImageFromFds, but takes additional attributes.
|
* Like createImageFromFds, but takes additional attributes.
|
||||||
|
Reference in New Issue
Block a user