From 0bffe8ec053f2a43795515b0f9c64cf98b5bd8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 21 Oct 2024 02:24:36 -0400 Subject: [PATCH] mesa_interface: rename __DRIimage to struct dri_image Reviewed-By: Mike Blumenkrantz Part-of: --- src/egl/drivers/dri2/egl_dri2.c | 18 +++--- src/egl/drivers/dri2/egl_dri2.h | 16 +++--- src/egl/drivers/dri2/platform_android.c | 10 ++-- src/egl/drivers/dri2/platform_device.c | 2 +- src/egl/drivers/dri2/platform_surfaceless.c | 2 +- src/egl/drivers/dri2/platform_wayland.c | 16 +++--- src/gallium/frontends/dri/dri2.c | 54 +++++++++--------- src/gallium/frontends/dri/dri_drawable.h | 2 +- src/gallium/frontends/dri/dri_helpers.c | 18 +++--- src/gallium/frontends/dri/dri_helpers.h | 2 +- src/gallium/frontends/dri/dri_screen.c | 2 +- src/gallium/frontends/dri/dri_screen.h | 2 +- src/gallium/frontends/dri/dri_util.h | 34 +++++------ src/gallium/frontends/dri/drisw.c | 2 +- src/gallium/frontends/dri/kopper.c | 2 +- .../frontends/dri/loader_dri3_helper.c | 24 ++++---- .../frontends/dri/loader_dri3_helper.h | 10 ++-- src/gallium/include/mesa_interface.h | 56 +++++++++---------- src/gbm/backends/dri/gbm_dri.c | 14 ++--- src/gbm/backends/dri/gbm_driint.h | 4 +- 20 files changed, 144 insertions(+), 146 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index f7face51075..abab8c9edbc 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -566,7 +566,7 @@ dri2_validate_egl_image(void *image, void *data) return true; } -__DRIimage * +struct dri_image * dri2_lookup_egl_image_validated(void *image, void *data) { struct dri2_egl_image *dri2_img; @@ -1867,7 +1867,7 @@ dri2_create_image(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target, } _EGLImage * -dri2_create_image_from_dri(_EGLDisplay *disp, __DRIimage *dri_image) +dri2_create_image_from_dri(_EGLDisplay *disp, struct dri_image *dri_image) { struct dri2_egl_image *dri2_img; @@ -1919,7 +1919,7 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx, { struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx); GLuint renderbuffer = (GLuint)(uintptr_t)buffer; - __DRIimage *dri_image; + struct dri_image *dri_image; if (renderbuffer == 0) { _eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr"); @@ -1948,10 +1948,10 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx, #ifdef HAVE_WAYLAND_PLATFORM /* This structure describes how a wl_buffer maps to one or more - * __DRIimages. A wl_drm_buffer stores the wl_drm format code and the + * dri_image structures. A wl_drm_buffer stores the wl_drm format code and the * offsets and strides of the planes in the buffer. This table maps a * wl_drm format code to a description of the planes in the buffer - * that lets us create a __DRIimage for each of the planes. */ + * that lets us create a struct dri_image for each of the planes. */ static const struct wl_drm_components_descriptor { uint32_t dri_components; @@ -1973,7 +1973,7 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx, struct wl_drm_buffer *buffer; struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); const struct wl_drm_components_descriptor *f; - __DRIimage *dri_image; + struct dri_image *dri_image; _EGLImageAttribs attrs; int32_t plane; @@ -2160,7 +2160,7 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, EGLint name, pitch; uint32_t fourcc; _EGLImageAttribs attrs; - __DRIimage *dri_image; + struct dri_image *dri_image; name = (EGLint)(uintptr_t)buffer; @@ -2508,7 +2508,7 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx, struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); _EGLImage *res; _EGLImageAttribs attrs; - __DRIimage *dri_image; + struct dri_image *dri_image; unsigned num_fds; int fds[DMA_BUF_MAX_PLANES]; int pitches[DMA_BUF_MAX_PLANES]; @@ -2845,7 +2845,7 @@ dri2_wl_reference_buffer(void *user_data, uint32_t name, int fd, { _EGLDisplay *disp = user_data; struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); - __DRIimage *img; + struct dri_image *img; int dri_components = 0; if (fd == -1) diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 44cd6b76e68..4278ff969f1 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -359,9 +359,9 @@ struct dri2_egl_surface { #ifdef HAVE_WAYLAND_PLATFORM struct wl_buffer *wl_buffer; bool wl_release; - __DRIimage *dri_image; + struct dri_image *dri_image; /* for is_different_gpu case. NULL else */ - __DRIimage *linear_copy; + struct dri_image *linear_copy; /* for swrast */ void *data; int data_size; @@ -381,8 +381,8 @@ struct dri2_egl_surface { /* in-fence associated with buffer, -1 once passed down to dri layer: */ int in_fence_fd; - __DRIimage *dri_image_back; - __DRIimage *dri_image_front; + struct dri_image *dri_image_back; + struct dri_image *dri_image_front; /* Used to record all the buffers created by ANativeWindow and their ages. * Allocate number of color_buffers based on query to android bufferqueue @@ -397,7 +397,7 @@ struct dri2_egl_surface { #endif /* surfaceless and device */ - __DRIimage *front; + struct dri_image *front; enum pipe_format visual; int out_fence_fd; @@ -414,7 +414,7 @@ struct dri2_egl_config { struct dri2_egl_image { _EGLImage base; - __DRIimage *dri_image; + struct dri_image *dri_image; }; struct dri2_egl_sync { @@ -476,7 +476,7 @@ dri2_surface_get_dri_drawable(_EGLSurface *surf); GLboolean dri2_validate_egl_image(void *image, void *data); -__DRIimage * +struct dri_image * dri2_lookup_egl_image_validated(void *image, void *data); void @@ -509,7 +509,7 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx, EGLClientBuffer buffer, const EGLint *attr_list); _EGLImage * -dri2_create_image_from_dri(_EGLDisplay *disp, __DRIimage *dri_image); +dri2_create_image_from_dri(_EGLDisplay *disp, struct dri_image *dri_image); #ifdef HAVE_X11_PLATFORM EGLBoolean diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index 835bb8cfa63..ea04a86545b 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -51,7 +51,7 @@ #include "platform_android.h" #include "dri_util.h" -static __DRIimage * +static struct dri_image * droid_create_image_from_buffer_info( struct dri2_egl_display *dri2_dpy, int width, int height, struct u_gralloc_buffer_basic_info *buf_info, @@ -67,7 +67,7 @@ droid_create_image_from_buffer_info( color_info->vertical_siting, 0, &error, priv); } -static __DRIimage * +static struct dri_image * droid_create_image_from_native_buffer(_EGLDisplay *disp, struct ANativeWindowBuffer *buf, void *priv) @@ -85,7 +85,7 @@ droid_create_image_from_native_buffer(_EGLDisplay *disp, .hal_format = buf->format, .pixel_stride = buf->stride, }; - __DRIimage *img = NULL; + struct dri_image *img = NULL; if (u_gralloc_get_buffer_basic_info(dri2_dpy->gralloc, &gr_handle, &buf_info)) @@ -113,7 +113,7 @@ droid_create_image_from_native_buffer(_EGLDisplay *disp, } static void -handle_in_fence_fd(struct dri2_egl_surface *dri2_surf, __DRIimage *img) +handle_in_fence_fd(struct dri2_egl_surface *dri2_surf, struct dri_image *img) { _EGLDisplay *disp = dri2_surf->base.Resource.Display; struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); @@ -728,7 +728,7 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp, _EGLContext *ctx, return NULL; } - __DRIimage *dri_image = + struct dri_image *dri_image = droid_create_image_from_native_buffer(disp, buf, buf); if (dri_image) { diff --git a/src/egl/drivers/dri2/platform_device.c b/src/egl/drivers/dri2/platform_device.c index 3202b6069c5..41ab931e3d7 100644 --- a/src/egl/drivers/dri2/platform_device.c +++ b/src/egl/drivers/dri2/platform_device.c @@ -45,7 +45,7 @@ #include "loader.h" #include "dri_util.h" -static __DRIimage * +static struct dri_image * device_alloc_image(struct dri2_egl_display *dri2_dpy, struct dri2_egl_surface *dri2_surf) { diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index 5f743b16b02..87d06c50656 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -40,7 +40,7 @@ #include "loader_dri_helper.h" #include "dri_util.h" -static __DRIimage * +static struct dri_image * surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy, struct dri2_egl_surface *dri2_surf) { diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 4d1460400ba..513d2d0709b 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -960,7 +960,7 @@ get_surface_specific_modifiers(struct dri2_egl_surface *dri2_surf, } static void -update_surface(struct dri2_egl_surface *dri2_surf, __DRIimage *dri_img) +update_surface(struct dri2_egl_surface *dri2_surf, struct dri_image *dri_img) { int compression_rate; @@ -1193,7 +1193,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) if (dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu && dri2_surf->back->linear_copy == NULL) { uint64_t linear_mod = DRM_FORMAT_MOD_LINEAR; - __DRIimage *linear_copy_display_gpu_image = NULL; + struct dri_image *linear_copy_display_gpu_image = NULL; if (dri2_dpy->dri_screen_display_gpu) { linear_copy_display_gpu_image = dri_create_image_with_modifiers( @@ -1217,7 +1217,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) num_planes = 1; for (i = 0; i < num_planes; i++) { - __DRIimage *image = dri2_from_planar( + struct dri_image *image = dri2_from_planar( linear_copy_display_gpu_image, i, NULL); if (!image) { @@ -1319,7 +1319,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) static void back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer) { - __DRIimage *image; + struct dri_image *image; int name, pitch; image = dri2_surf->back->dri_image; @@ -1460,7 +1460,7 @@ static const struct wl_callback_listener throttle_listener = { static struct wl_buffer * create_wl_buffer(struct dri2_egl_display *dri2_dpy, - struct dri2_egl_surface *dri2_surf, __DRIimage *image) + struct dri2_egl_surface *dri2_surf, struct dri_image *image) { struct wl_buffer *ret = NULL; EGLBoolean query; @@ -1526,7 +1526,7 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy, wl_proxy_set_queue((struct wl_proxy *)params, dri2_surf->wl_queue); for (i = 0; i < num_planes; i++) { - __DRIimage *p_image; + struct dri_image *p_image; int stride, offset; int fd = -1; @@ -1664,7 +1664,7 @@ dri2_wl_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw, dri2_surf->back = NULL; if (!dri2_surf->current->wl_buffer) { - __DRIimage *image; + struct dri_image *image; if (dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu) image = dri2_surf->current->linear_copy; @@ -1753,7 +1753,7 @@ dri2_wl_create_wayland_buffer_from_image(_EGLDisplay *disp, _EGLImage *img) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); struct dri2_egl_image *dri2_img = dri2_egl_image(img); - __DRIimage *image = dri2_img->dri_image; + struct dri_image *image = dri2_img->dri_image; struct wl_buffer *buffer; int fourcc; diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index f9a52016edb..54ce3cf78c5 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -380,7 +380,7 @@ dri2_release_buffer(__DRIbuffer *bPriv) } void -dri2_set_in_fence_fd(__DRIimage *img, int fd) +dri2_set_in_fence_fd(struct dri_image *img, int fd) { validate_fence_fd(fd); validate_fence_fd(img->in_fence_fd); @@ -906,7 +906,7 @@ from_dri_compression_rate(enum __DRIFixedRateCompression rate) } } -static __DRIimage * +static struct dri_image * dri_create_image_from_winsys(struct dri_screen *screen, int width, int height, const struct dri2_format_mapping *map, int num_handles, struct winsys_handle *whandle, @@ -914,7 +914,7 @@ dri_create_image_from_winsys(struct dri_screen *screen, void *loaderPrivate) { struct pipe_screen *pscreen = screen->base.screen; - __DRIimage *img; + struct dri_image *img; struct pipe_resource templ; unsigned tex_usage = 0; int i; @@ -1005,7 +1005,7 @@ dri_create_image_from_winsys(struct dri_screen *screen, if (!tex_usage) return NULL; - img = CALLOC_STRUCT(__DRIimageRec); + img = CALLOC_STRUCT(dri_image); if (!img) return NULL; @@ -1111,7 +1111,7 @@ dri2_get_modifier_num_planes(struct dri_screen *screen, } } -__DRIimage * +struct dri_image * dri_create_image(struct dri_screen *screen, int width, int height, int format, @@ -1122,7 +1122,7 @@ dri_create_image(struct dri_screen *screen, { const struct dri2_format_mapping *map = dri2_get_mapping_by_format(format); struct pipe_screen *pscreen = screen->base.screen; - __DRIimage *img; + struct dri_image *img; struct pipe_resource templ; unsigned tex_usage = 0; unsigned count = _count; @@ -1186,7 +1186,7 @@ dri_create_image(struct dri_screen *screen, if (use & __DRI_IMAGE_USE_FRONT_RENDERING) tex_usage |= PIPE_BIND_USE_FRONT_RENDERING; - img = CALLOC_STRUCT(__DRIimageRec); + img = CALLOC_STRUCT(dri_image); if (!img) return NULL; @@ -1229,7 +1229,7 @@ dri_create_image(struct dri_screen *screen, } static bool -dri2_query_image_common(__DRIimage *image, int attrib, int *value) +dri2_query_image_common(struct dri_image *image, int attrib, int *value) { switch (attrib) { case __DRI_IMAGE_ATTRIB_WIDTH: @@ -1269,7 +1269,7 @@ dri2_query_image_common(__DRIimage *image, int attrib, int *value) } static bool -dri2_query_image_by_resource_handle(__DRIimage *image, int attrib, int *value) +dri2_query_image_by_resource_handle(struct dri_image *image, int attrib, int *value) { struct pipe_screen *pscreen = image->texture->screen; struct winsys_handle whandle; @@ -1342,7 +1342,7 @@ dri2_query_image_by_resource_handle(__DRIimage *image, int attrib, int *value) } static bool -dri2_resource_get_param(__DRIimage *image, enum pipe_resource_param param, +dri2_resource_get_param(struct dri_image *image, enum pipe_resource_param param, unsigned handle_usage, uint64_t *value) { struct pipe_screen *pscreen = image->texture->screen; @@ -1358,7 +1358,7 @@ dri2_resource_get_param(__DRIimage *image, enum pipe_resource_param param, } static bool -dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value) +dri2_query_image_by_resource_param(struct dri_image *image, int attrib, int *value) { enum pipe_resource_param param; uint64_t res_param; @@ -1430,7 +1430,7 @@ dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value) } GLboolean -dri2_query_image(__DRIimage *image, int attrib, int *value) +dri2_query_image(struct dri_image *image, int attrib, int *value) { if (dri2_query_image_common(image, attrib, value)) return GL_TRUE; @@ -1442,12 +1442,12 @@ dri2_query_image(__DRIimage *image, int attrib, int *value) return GL_FALSE; } -__DRIimage * -dri2_dup_image(__DRIimage *image, void *loaderPrivate) +struct dri_image * +dri2_dup_image(struct dri_image *image, void *loaderPrivate) { - __DRIimage *img; + struct dri_image *img; - img = CALLOC_STRUCT(__DRIimageRec); + img = CALLOC_STRUCT(dri_image); if (!img) return NULL; @@ -1469,7 +1469,7 @@ dri2_dup_image(__DRIimage *image, void *loaderPrivate) } GLboolean -dri2_validate_usage(__DRIimage *image, unsigned int use) +dri2_validate_usage(struct dri_image *image, unsigned int use) { if (!image || !image->texture) return false; @@ -1496,13 +1496,13 @@ dri2_validate_usage(__DRIimage *image, unsigned int use) return screen->check_resource_capability(screen, image->texture, bind); } -__DRIimage * +struct dri_image * dri2_from_names(struct dri_screen *screen, int width, int height, int fourcc, int *names, int num_names, int *strides, int *offsets, void *loaderPrivate) { const struct dri2_format_mapping *map = dri2_get_mapping_by_fourcc(fourcc); - __DRIimage *img; + struct dri_image *img; struct winsys_handle whandle; if (!map) @@ -1531,10 +1531,10 @@ dri2_from_names(struct dri_screen *screen, int width, int height, int fourcc, return img; } -__DRIimage * -dri2_from_planar(__DRIimage *image, int plane, void *loaderPrivate) +struct dri_image * +dri2_from_planar(struct dri_image *image, int plane, void *loaderPrivate) { - __DRIimage *img; + struct dri_image *img; if (plane < 0) { return NULL; @@ -1630,7 +1630,7 @@ dri2_query_dma_buf_format_modifier_attribs(struct dri_screen *screen, } } -__DRIimage * +struct dri_image * dri2_from_dma_bufs(struct dri_screen *screen, int width, int height, int fourcc, uint64_t modifier, int *fds, int num_fds, @@ -1643,7 +1643,7 @@ dri2_from_dma_bufs(struct dri_screen *screen, unsigned *error, void *loaderPrivate) { - __DRIimage *img; + struct dri_image *img; const struct dri2_format_mapping *map = dri2_get_mapping_by_fourcc(fourcc); if (!screen->dmabuf_import) { @@ -1769,7 +1769,7 @@ dri2_query_compression_modifiers(struct dri_screen *screen, uint32_t fourcc, } void -dri2_blit_image(struct dri_context *ctx, __DRIimage *dst, __DRIimage *src, +dri2_blit_image(struct dri_context *ctx, struct dri_image *dst, struct dri_image *src, int dstx0, int dsty0, int dstwidth, int dstheight, int srcx0, int srcy0, int srcwidth, int srcheight, int flush_flag) @@ -1822,7 +1822,7 @@ dri2_blit_image(struct dri_context *ctx, __DRIimage *dst, __DRIimage *src, } void * -dri2_map_image(struct dri_context *ctx, __DRIimage *image, +dri2_map_image(struct dri_context *ctx, struct dri_image *image, int x0, int y0, int width, int height, unsigned int flags, int *stride, void **data) { @@ -1865,7 +1865,7 @@ dri2_map_image(struct dri_context *ctx, __DRIimage *image, } void -dri2_unmap_image(struct dri_context *ctx, __DRIimage *image, void *data) +dri2_unmap_image(struct dri_context *ctx, struct dri_image *image, void *data) { struct pipe_context *pipe = ctx->st->pipe; diff --git a/src/gallium/frontends/dri/dri_drawable.h b/src/gallium/frontends/dri/dri_drawable.h index 1e5bbde918e..d7bc1945f0f 100644 --- a/src/gallium/frontends/dri/dri_drawable.h +++ b/src/gallium/frontends/dri/dri_drawable.h @@ -89,7 +89,7 @@ struct dri_drawable /* kopper */ struct kopper_loader_info info; - __DRIimage *image; //texture_from_pixmap + struct dri_image *image; //texture_from_pixmap bool is_window; bool window_valid; diff --git a/src/gallium/frontends/dri/dri_helpers.c b/src/gallium/frontends/dri/dri_helpers.c index 7712573f357..d1c740c4357 100644 --- a/src/gallium/frontends/dri/dri_helpers.c +++ b/src/gallium/frontends/dri/dri_helpers.c @@ -252,7 +252,7 @@ const __DRI2fenceExtension dri2FenceExtension = { .get_fence_fd = dri_get_fence_fd, }; -__DRIimage * +struct dri_image * dri_create_image_from_renderbuffer(struct dri_context *dri_ctx, int renderbuffer, void *loaderPrivate, unsigned *error) @@ -262,7 +262,7 @@ dri_create_image_from_renderbuffer(struct dri_context *dri_ctx, struct pipe_context *p_ctx = st->pipe; struct gl_renderbuffer *rb; struct pipe_resource *tex; - __DRIimage *img; + struct dri_image *img; /* Wait for glthread to finish to get up-to-date GL object lookups. */ _mesa_glthread_finish(st->ctx); @@ -292,7 +292,7 @@ dri_create_image_from_renderbuffer(struct dri_context *dri_ctx, return NULL; } - img = CALLOC_STRUCT(__DRIimageRec); + img = CALLOC_STRUCT(dri_image); if (!img) { *error = __DRI_IMAGE_ERROR_BAD_ALLOC; return NULL; @@ -321,7 +321,7 @@ dri_create_image_from_renderbuffer(struct dri_context *dri_ctx, } void -dri2_destroy_image(__DRIimage *img) +dri2_destroy_image(struct dri_image *img) { const __DRIimageLoaderExtension *imgLoader = img->screen->image.loader; const __DRIdri2LoaderExtension *dri2Loader = img->screen->dri2.loader; @@ -343,12 +343,12 @@ dri2_destroy_image(__DRIimage *img) } -__DRIimage * +struct dri_image * dri2_create_from_texture(struct dri_context *dri_ctx, int target, unsigned texture, int depth, int level, unsigned *error, void *loaderPrivate) { - __DRIimage *img; + struct dri_image *img; struct st_context *st = dri_ctx->st; struct gl_context *ctx = st->ctx; struct pipe_context *p_ctx = st->pipe; @@ -390,7 +390,7 @@ dri2_create_from_texture(struct dri_context *dri_ctx, int target, unsigned textu return NULL; } - img = CALLOC_STRUCT(__DRIimageRec); + img = CALLOC_STRUCT(dri_image); if (!img) { *error = __DRI_IMAGE_ERROR_BAD_ALLOC; return NULL; @@ -726,7 +726,7 @@ dri_query_dma_buf_formats(struct dri_screen *screen, int max, int *formats, } -__DRIimage * +struct dri_image * dri_create_image_with_modifiers(struct dri_screen *screen, uint32_t width, uint32_t height, uint32_t dri_format, uint32_t dri_usage, @@ -760,7 +760,7 @@ dri_create_image_with_modifiers(struct dri_screen *screen, } void -dri_image_fence_sync(struct dri_context *ctx, __DRIimage *img) +dri_image_fence_sync(struct dri_context *ctx, struct dri_image *img) { struct pipe_context *pipe = ctx->st->pipe; struct pipe_fence_handle *fence; diff --git a/src/gallium/frontends/dri/dri_helpers.h b/src/gallium/frontends/dri/dri_helpers.h index 1ddd8f7a682..cb82289841f 100644 --- a/src/gallium/frontends/dri/dri_helpers.h +++ b/src/gallium/frontends/dri/dri_helpers.h @@ -59,7 +59,7 @@ dri2_yuv_dma_buf_supported(struct dri_screen *screen, bool dri2_validate_egl_image(struct dri_screen *screen, void *handle); void -dri_image_fence_sync(struct dri_context *ctx, __DRIimage *img); +dri_image_fence_sync(struct dri_context *ctx, struct dri_image *img); #endif /* vim: set sw=3 ts=8 sts=3 expandtab: */ diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c index d55de482133..327e83996fb 100644 --- a/src/gallium/frontends/dri/dri_screen.c +++ b/src/gallium/frontends/dri/dri_screen.c @@ -505,7 +505,7 @@ dri_get_egl_image(struct pipe_frontend_screen *fscreen, { struct dri_screen *screen = (struct dri_screen *)fscreen; const __DRIimageLookupExtension *loader = screen->dri2.image; - __DRIimage *img = NULL; + struct dri_image *img = NULL; const struct dri2_format_mapping *map; img = loader->lookupEGLImageValidated(egl_image, screen->loaderPrivate); diff --git a/src/gallium/frontends/dri/dri_screen.h b/src/gallium/frontends/dri/dri_screen.h index 5af32378d0f..bdb64ddf9dd 100644 --- a/src/gallium/frontends/dri/dri_screen.h +++ b/src/gallium/frontends/dri/dri_screen.h @@ -137,7 +137,7 @@ dri_screen_get_kopper(struct dri_screen *screen) return screen->kopper_loader; } -struct __DRIimageRec { +struct dri_image { struct pipe_resource *texture; unsigned level; unsigned layer; diff --git a/src/gallium/frontends/dri/dri_util.h b/src/gallium/frontends/dri/dri_util.h index 593e4ce0acb..5730165d1e6 100644 --- a/src/gallium/frontends/dri/dri_util.h +++ b/src/gallium/frontends/dri/dri_util.h @@ -217,20 +217,20 @@ dri_interop_flush_objects(struct dri_context *_ctx, unsigned count, struct mesa_glinterop_export_in *objects, struct mesa_glinterop_flush_out *out); -PUBLIC __DRIimage * +PUBLIC struct dri_image * dri_create_image_from_renderbuffer(struct dri_context *dri_ctx, int renderbuffer, void *loaderPrivate, unsigned *error); PUBLIC void -dri2_destroy_image(__DRIimage *img); +dri2_destroy_image(struct dri_image *img); -PUBLIC __DRIimage * +PUBLIC struct dri_image * dri2_create_from_texture(struct dri_context *dri_ctx, int target, unsigned texture, int depth, int level, unsigned *error, void *loaderPrivate); -PUBLIC __DRIimage * +PUBLIC struct dri_image * dri_create_image(struct dri_screen *screen, int width, int height, int format, @@ -239,18 +239,18 @@ dri_create_image(struct dri_screen *screen, unsigned int use, void *loaderPrivate); PUBLIC GLboolean -dri2_query_image(__DRIimage *image, int attrib, int *value); -PUBLIC __DRIimage * -dri2_dup_image(__DRIimage *image, void *loaderPrivate); +dri2_query_image(struct dri_image *image, int attrib, int *value); +PUBLIC struct dri_image * +dri2_dup_image(struct dri_image *image, void *loaderPrivate); PUBLIC GLboolean -dri2_validate_usage(__DRIimage *image, unsigned int use); -PUBLIC __DRIimage * +dri2_validate_usage(struct dri_image *image, unsigned int use); +PUBLIC struct dri_image * dri2_from_names(struct dri_screen *screen, int width, int height, int fourcc, int *names, int num_names, int *strides, int *offsets, void *loaderPrivate); -PUBLIC __DRIimage * -dri2_from_planar(__DRIimage *image, int plane, void *loaderPrivate); -PUBLIC __DRIimage * +PUBLIC struct dri_image * +dri2_from_planar(struct dri_image *image, int plane, void *loaderPrivate); +PUBLIC struct dri_image * dri2_from_dma_bufs(struct dri_screen *screen, int width, int height, int fourcc, uint64_t modifier, int *fds, int num_fds, @@ -263,18 +263,18 @@ dri2_from_dma_bufs(struct dri_screen *screen, unsigned *error, void *loaderPrivate); PUBLIC void -dri2_blit_image(struct dri_context *ctx, __DRIimage *dst, __DRIimage *src, +dri2_blit_image(struct dri_context *ctx, struct dri_image *dst, struct dri_image *src, int dstx0, int dsty0, int dstwidth, int dstheight, int srcx0, int srcy0, int srcwidth, int srcheight, int flush_flag); PUBLIC int dri2_get_capabilities(struct dri_screen *_screen); PUBLIC void * -dri2_map_image(struct dri_context *ctx, __DRIimage *image, +dri2_map_image(struct dri_context *ctx, struct dri_image *image, int x0, int y0, int width, int height, unsigned int flags, int *stride, void **data); PUBLIC void -dri2_unmap_image(struct dri_context *ctx, __DRIimage *image, void *data); +dri2_unmap_image(struct dri_context *ctx, struct dri_image *image, void *data); PUBLIC bool dri_query_dma_buf_formats(struct dri_screen *_screen, int max, int *formats, int *count); @@ -286,7 +286,7 @@ PUBLIC bool dri2_query_dma_buf_format_modifier_attribs(struct dri_screen *_screen, uint32_t fourcc, uint64_t modifier, int attrib, uint64_t *value); -PUBLIC __DRIimage * +PUBLIC struct dri_image * dri_create_image_with_modifiers(struct dri_screen *screen, uint32_t width, uint32_t height, uint32_t dri_format, uint32_t dri_usage, @@ -300,7 +300,7 @@ PUBLIC int driSWRastQueryBufferAge(struct dri_drawable *drawable); PUBLIC void -dri2_set_in_fence_fd(__DRIimage *img, int fd); +dri2_set_in_fence_fd(struct dri_image *img, int fd); PUBLIC bool dri2_query_compression_rates(struct dri_screen *_screen, const struct dri_config *config, int max, diff --git a/src/gallium/frontends/dri/drisw.c b/src/gallium/frontends/dri/drisw.c index 331f9c40a61..4590b57e626 100644 --- a/src/gallium/frontends/dri/drisw.c +++ b/src/gallium/frontends/dri/drisw.c @@ -371,7 +371,7 @@ dri_image_drawable_get_buffers(struct dri_drawable *drawable, unsigned statts_count); static void -handle_in_fence(struct dri_context *ctx, __DRIimage *img) +handle_in_fence(struct dri_context *ctx, struct dri_image *img) { struct pipe_context *pipe = ctx->st->pipe; struct pipe_fence_handle *fence; diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 574c71240db..15824a21451 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -132,7 +132,7 @@ pipe_format_to_fourcc(enum pipe_format format) /** kopper_get_pixmap_buffer * * Get the DRM object for a pixmap from the X server and - * wrap that with a __DRIimage structure using createImageFromDmaBufs + * wrap that with a struct dri_image structure using createImageFromDmaBufs */ static struct pipe_resource * kopper_get_pixmap_buffer(struct dri_drawable *drawable, diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c index a4afd0b2b0c..268ec3d86c8 100644 --- a/src/gallium/frontends/dri/loader_dri3_helper.c +++ b/src/gallium/frontends/dri/loader_dri3_helper.c @@ -195,7 +195,7 @@ loader_dri3_blit_context_put(void) */ static bool loader_dri3_blit_image(struct loader_dri3_drawable *draw, - __DRIimage *dst, __DRIimage *src, + struct dri_image *dst, struct dri_image *src, int dstx0, int dsty0, int width, int height, int srcx0, int srcy0, int flush_flag) { @@ -1355,7 +1355,7 @@ has_supported_modifier(struct loader_dri3_drawable *draw, unsigned int format, /** loader_dri3_alloc_render_buffer * - * Use the driver createImage function to construct a __DRIimage, then + * Use the driver createImage function to construct a struct dri_image, then * get a file descriptor for that and create an X pixmap from that * * Allocate an xshmfence for synchronization @@ -1365,7 +1365,7 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int fourcc, int width, int height, int depth) { struct loader_dri3_buffer *buffer; - __DRIimage *pixmap_buffer = NULL, *linear_buffer_display_gpu = NULL; + struct dri_image *pixmap_buffer = NULL, *linear_buffer_display_gpu = NULL; int format = loader_fourcc_to_image_format(fourcc); xcb_pixmap_t pixmap; xcb_sync_fence_t sync_fence; @@ -1518,7 +1518,7 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int fourcc, num_planes = 1; for (i = 0; i < num_planes; i++) { - __DRIimage *image = dri2_from_planar(pixmap_buffer, i, NULL); + struct dri_image *image = dri2_from_planar(pixmap_buffer, i, NULL); if (!image) { assert(i == 0); @@ -1759,7 +1759,7 @@ dri3_update_drawable(struct loader_dri3_drawable *draw) return true; } -__DRIimage * +struct dri_image * loader_dri3_create_image(xcb_connection_t *c, xcb_dri3_buffer_from_pixmap_reply_t *bp_reply, unsigned int fourcc, @@ -1767,7 +1767,7 @@ loader_dri3_create_image(xcb_connection_t *c, void *loaderPrivate) { int *fds; - __DRIimage *image_planar, *ret; + struct dri_image *image_planar, *ret; int stride, offset; /* Get an FD for the pixmap object @@ -1777,7 +1777,7 @@ loader_dri3_create_image(xcb_connection_t *c, stride = bp_reply->stride; offset = 0; - /* createImageFromDmaBufs creates a wrapper __DRIimage structure which + /* createImageFromDmaBufs creates a wrapper struct dri_image structure which * can deal with multiple planes for things like Yuv images. So, once * we've gotten the planar wrapper, pull the single plane out of it and * discard the wrapper. @@ -1806,14 +1806,14 @@ loader_dri3_create_image(xcb_connection_t *c, } #ifdef HAVE_X11_DRM -__DRIimage * +struct dri_image * loader_dri3_create_image_from_buffers(xcb_connection_t *c, xcb_dri3_buffers_from_pixmap_reply_t *bp_reply, unsigned int fourcc, struct dri_screen *dri_screen, void *loaderPrivate) { - __DRIimage *ret; + struct dri_image *ret; int *fds; uint32_t *strides_in, *offsets_in; int strides[4], offsets[4]; @@ -1848,12 +1848,12 @@ loader_dri3_create_image_from_buffers(xcb_connection_t *c, } #endif -__DRIimage * +struct dri_image * loader_dri3_get_pixmap_buffer(xcb_connection_t *conn, xcb_drawable_t pixmap, struct dri_screen *screen, unsigned fourcc, bool multiplanes_available, int *width, int *height, void *loader_data) { - __DRIimage *image; + struct dri_image *image; #ifdef HAVE_X11_DRM if (multiplanes_available) { xcb_dri3_buffers_from_pixmap_cookie_t bps_cookie; @@ -1892,7 +1892,7 @@ loader_dri3_get_pixmap_buffer(xcb_connection_t *conn, xcb_drawable_t pixmap, str /** dri3_get_pixmap_buffer * * Get the DRM object for a pixmap from the X server and - * wrap that with a __DRIimage structure using createImageFromDmaBufs + * wrap that with a struct dri_image structure using createImageFromDmaBufs */ static struct loader_dri3_buffer * dri3_get_pixmap_buffer(struct dri_drawable *driDrawable, unsigned int fourcc, diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h index 93c012100f2..9061e9755e2 100644 --- a/src/gallium/frontends/dri/loader_dri3_helper.h +++ b/src/gallium/frontends/dri/loader_dri3_helper.h @@ -42,7 +42,7 @@ enum loader_dri3_buffer_type { }; struct loader_dri3_buffer { - __DRIimage *image; + struct dri_image *image; uint32_t pixmap; /* default case: linear buffer allocated in render gpu vram. @@ -50,7 +50,7 @@ struct loader_dri3_buffer { * to render gpu. p2p case is enabled when driver name matches * while creating screen in dri3_create_screen() function. */ - __DRIimage *linear_buffer; + struct dri_image *linear_buffer; /* Synchronization between the client and X server is done using an * xshmfence that is mapped into an X server SyncFence. This lets the @@ -249,7 +249,7 @@ loader_dri3_wait_x(struct loader_dri3_drawable *draw); PUBLIC void loader_dri3_wait_gl(struct loader_dri3_drawable *draw); -PUBLIC __DRIimage * +PUBLIC struct dri_image * loader_dri3_create_image(xcb_connection_t *c, xcb_dri3_buffer_from_pixmap_reply_t *bp_reply, unsigned int fourcc, @@ -257,7 +257,7 @@ loader_dri3_create_image(xcb_connection_t *c, void *loaderPrivate); #ifdef HAVE_X11_DRM -PUBLIC __DRIimage * +PUBLIC struct dri_image * loader_dri3_create_image_from_buffers(xcb_connection_t *c, xcb_dri3_buffers_from_pixmap_reply_t *bp_reply, unsigned int fourcc, @@ -280,7 +280,7 @@ loader_dri3_swapbuffer_barrier(struct loader_dri3_drawable *draw); PUBLIC void loader_dri3_close_screen(struct dri_screen *dri_screen); -__DRIimage * +struct dri_image * loader_dri3_get_pixmap_buffer(xcb_connection_t *conn, xcb_drawable_t pixmap, struct dri_screen *screen, unsigned fourcc, bool multiplanes_available, int *width, int *height, void *loader_data); diff --git a/src/gallium/include/mesa_interface.h b/src/gallium/include/mesa_interface.h index 9b972065da7..7e7432d1edf 100644 --- a/src/gallium/include/mesa_interface.h +++ b/src/gallium/include/mesa_interface.h @@ -35,6 +35,7 @@ struct dri_screen; struct dri_context; struct dri_drawable; struct dri_config; +struct dri_image; /** * Extension struct. Drivers 'inherit' from this struct by embedding @@ -933,25 +934,24 @@ enum __DRIFixedRateCompression { /* Available in version 16 */ #define __DRI_IMAGE_FORMAT_MODIFIER_ATTRIB_PLANE_COUNT 0x0001 -typedef struct __DRIimageRec __DRIimage; typedef struct { __DRIextension base; - void (*destroyImage)(__DRIimage *image); + void (*destroyImage)(struct dri_image *image); - unsigned char (*queryImage)(__DRIimage *image, int attrib, int *value); + unsigned char (*queryImage)(struct dri_image *image, int attrib, int *value); /** - * The new __DRIimage will share the content with the old one, see dup(2). + * The new struct dri_image will share the content with the old one, see dup(2). */ - __DRIimage *(*dupImage)(__DRIimage *image, void *loaderPrivate); + struct dri_image *(*dupImage)(struct dri_image *image, void *loaderPrivate); /** - * Validate that a __DRIimage can be used a certain way. + * Validate that a struct dri_image can be used a certain way. * * \since 2 */ - unsigned char (*validateUsage)(__DRIimage *image, unsigned int use); + unsigned char (*validateUsage)(struct dri_image *image, unsigned int use); /** * Create an image from a series of GEM names; uses FourCC for format @@ -959,7 +959,7 @@ typedef struct { * * \since 5 */ - __DRIimage *(*createImageFromNames)(struct dri_screen *screen, + struct dri_image *(*createImageFromNames)(struct dri_screen *screen, int width, int height, int fourcc, int *names, int num_names, int *strides, int *offsets, @@ -967,20 +967,20 @@ typedef struct { /** * Create an image out of a sub-region of a parent image. This - * entry point lets us create individual __DRIimages for different + * entry point lets us create individual dri_image structures for different * planes in a planar buffer (typically yuv), for example. While a * sub-image shares the underlying buffer object with the parent * image and other sibling sub-images, the life times of parent and * sub-images are not dependent. Destroying the parent or a * sub-image doesn't affect other images. The underlying buffer - * object is free when no __DRIimage remains that references it. + * object is free when no struct dri_image remains that references it. * * Sub-images may overlap, but rendering to overlapping sub-images * is undefined. * * \since 5 */ - __DRIimage *(*fromPlanar)(__DRIimage *image, int plane, + struct dri_image *(*fromPlanar)(struct dri_image *image, int plane, void *loaderPrivate); /** @@ -988,7 +988,7 @@ typedef struct { * * \since 6 */ - __DRIimage *(*createImageFromTexture)(struct dri_context *context, + struct dri_image *(*createImageFromTexture)(struct dri_context *context, int target, unsigned texture, int depth, @@ -997,7 +997,7 @@ typedef struct { void *loaderPrivate); /** - * Blit a part of a __DRIimage to another and flushes + * Blit a part of a struct dri_image to another and flushes * * flush_flag: * 0: no flush @@ -1006,7 +1006,7 @@ typedef struct { * * \since 9 */ - void (*blitImage)(struct dri_context *context, __DRIimage *dst, __DRIimage *src, + void (*blitImage)(struct dri_context *context, struct dri_image *dst, struct dri_image *src, int dstx0, int dsty0, int dstwidth, int dstheight, int srcx0, int srcy0, int srcwidth, int srcheight, int flush_flag); @@ -1020,7 +1020,7 @@ typedef struct { int (*getCapabilities)(struct dri_screen *screen); /** - * Returns a map of the specified region of a __DRIimage for the specified usage. + * Returns a map of the specified region of a struct dri_image for the specified usage. * * flags may include __DRI_IMAGE_TRANSFER_READ, which will populate the * mapping with the current buffer content. If __DRI_IMAGE_TRANSFER_READ @@ -1034,16 +1034,16 @@ typedef struct { * * \since 12 */ - void *(*mapImage)(struct dri_context *context, __DRIimage *image, + void *(*mapImage)(struct dri_context *context, struct dri_image *image, int x0, int y0, int width, int height, unsigned int flags, int *stride, void **data); /** - * Unmap a previously mapped __DRIimage + * Unmap a previously mapped struct dri_image * * \since 12 */ - void (*unmapImage)(struct dri_context *context, __DRIimage *image, void *data); + void (*unmapImage)(struct dri_context *context, struct dri_image *image, void *data); /* * dmabuf format query to support EGL_EXT_image_dma_buf_import_modifiers. @@ -1113,7 +1113,7 @@ typedef struct { * \param error will be set to one of __DRI_IMAGE_ERROR_xxx * \return the newly created image on success, or NULL otherwise */ - __DRIimage *(*createImageFromRenderbuffer)(struct dri_context *context, + struct dri_image *(*createImageFromRenderbuffer)(struct dri_context *context, int renderbuffer, void *loaderPrivate, unsigned *error); @@ -1123,7 +1123,7 @@ typedef struct { * * See __DRI_IMAGE_*_FLAG for valid definitions of flags. */ - __DRIimage *(*createImageFromDmaBufs)(struct dri_screen *screen, + struct dri_image *(*createImageFromDmaBufs)(struct dri_screen *screen, int width, int height, int fourcc, uint64_t modifier, int *fds, int num_fds, @@ -1149,11 +1149,9 @@ typedef struct { * 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 19 */ - __DRIimage *(*createImage)(struct dri_screen *screen, + struct dri_image *(*createImage)(struct dri_screen *screen, int width, int height, int format, const uint64_t *modifiers, const unsigned int modifier_count, @@ -1169,7 +1167,7 @@ typedef struct { * * \since 21 */ - void (*setInFenceFd)(__DRIimage *image, int fd); + void (*setInFenceFd)(struct dri_image *image, int fd); /* * Query supported compression rates for a given format for @@ -1222,8 +1220,8 @@ typedef struct { * This extension must be implemented by the loader and passed to the * driver at screen creation time. The EGLImage entry points in the * various client APIs take opaque EGLImage handles and use this - * extension to map them to a __DRIimage. At version 1, this - * extensions allows mapping EGLImage pointers to __DRIimage pointers, + * extension to map them to a struct dri_image. At version 1, this + * extensions allows mapping EGLImage pointers to struct dri_image pointers, * but future versions could support other EGLImage-like, opaque types * with new lookup functions. */ @@ -1242,7 +1240,7 @@ typedef struct { /** * Lookup EGLImage after validateEGLImage(). No lock in this function. */ - __DRIimage *(*lookupEGLImageValidated)(void *image, void *loaderPrivate); + struct dri_image *(*lookupEGLImageValidated)(void *image, void *loaderPrivate); } __DRIimageLookupExtension; /** @@ -1367,8 +1365,8 @@ enum __DRIimageBufferMask { struct __DRIimageList { uint32_t image_mask; - __DRIimage *back; - __DRIimage *front; + struct dri_image *back; + struct dri_image *front; }; #define __DRI_IMAGE_LOADER "DRI_IMAGE_LOADER" diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index b8ed7d04afa..184bfda8a47 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -73,7 +73,7 @@ dri_validate_egl_image(void *image, void *data) return dri->validate_image(image, dri->lookup_user_data); } -static __DRIimage * +static struct dri_image * dri_lookup_egl_image_validated(void *image, void *data) { struct gbm_dri_device *dri = data; @@ -426,7 +426,7 @@ gbm_dri_bo_get_fd(struct gbm_bo *_bo) } static int -get_number_planes(struct gbm_dri_device *dri, __DRIimage *image) +get_number_planes(struct gbm_dri_device *dri, struct dri_image *image) { int num_planes = 0; @@ -471,7 +471,7 @@ gbm_dri_bo_get_handle_for_plane(struct gbm_bo *_bo, int plane) return ret; } - __DRIimage *image = dri2_from_planar(bo->image, plane, NULL); + struct dri_image *image = dri2_from_planar(bo->image, plane, NULL); if (image) { dri2_query_image(image, __DRI_IMAGE_ATTRIB_HANDLE, &ret.s32); dri2_destroy_image(image); @@ -510,7 +510,7 @@ gbm_dri_bo_get_plane_fd(struct gbm_bo *_bo, int plane) return -1; } - __DRIimage *image = dri2_from_planar(bo->image, plane, NULL); + struct dri_image *image = dri2_from_planar(bo->image, plane, NULL); if (image) { dri2_query_image(image, __DRI_IMAGE_ATTRIB_FD, &fd); dri2_destroy_image(image); @@ -527,7 +527,7 @@ gbm_dri_bo_get_stride(struct gbm_bo *_bo, int plane) { struct gbm_dri_device *dri = gbm_dri_device(_bo->gbm); struct gbm_dri_bo *bo = gbm_dri_bo(_bo); - __DRIimage *image; + struct dri_image *image; int stride = 0; if (!dri->has_dmabuf_import) { @@ -577,7 +577,7 @@ gbm_dri_bo_get_offset(struct gbm_bo *_bo, int plane) return 0; } - __DRIimage *image = dri2_from_planar(bo->image, plane, NULL); + struct dri_image *image = dri2_from_planar(bo->image, plane, NULL); if (image) { dri2_query_image(image, __DRI_IMAGE_ATTRIB_OFFSET, &offset); dri2_destroy_image(image); @@ -640,7 +640,7 @@ gbm_dri_bo_import(struct gbm_device *gbm, { struct gbm_dri_device *dri = gbm_dri_device(gbm); struct gbm_dri_bo *bo; - __DRIimage *image; + struct dri_image *image; unsigned dri_use = 0; int gbm_format; diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h index b924b7cbc1f..5d98855b11e 100644 --- a/src/gbm/backends/dri/gbm_driint.h +++ b/src/gbm/backends/dri/gbm_driint.h @@ -64,7 +64,7 @@ struct gbm_dri_device { const __DRIextension **loader_extensions; GLboolean (*validate_image)(void *image, void *data); - __DRIimage *(*lookup_image_validated)(void *image, void *data); + struct dri_image *(*lookup_image_validated)(void *image, void *data); void *lookup_user_data; void (*flush_front_buffer)(struct dri_drawable * driDrawable, void *data); @@ -100,7 +100,7 @@ struct gbm_dri_device { struct gbm_dri_bo { struct gbm_bo base; - __DRIimage *image; + struct dri_image *image; /* Used for cursors and the swrast front BO */ uint32_t handle, size;