diff --git a/include/kopper_interface.h b/include/kopper_interface.h index bb40f517968..24d93f1049c 100644 --- a/include/kopper_interface.h +++ b/include/kopper_interface.h @@ -63,15 +63,15 @@ struct __DRIkopperExtensionRec { * on-screen surfaces (eg X11 window) and trying to create a swapchain for * a pixmap is undefined. */ - __DRIdrawable *(*createNewDrawable)(struct dri_screen *screen, + struct dri_drawable *(*createNewDrawable)(struct dri_screen *screen, const __DRIconfig *config, void *loaderPrivate, __DRIkopperDrawableInfo *info); /* flags is a set of __DRI2_FLUSH_* flags */ - int64_t (*swapBuffers)(__DRIdrawable *draw, uint32_t flush_flags); - void (*setSwapInterval)(__DRIdrawable *drawable, int interval); - int (*queryBufferAge)(__DRIdrawable *drawable); - int64_t (*swapBuffersWithDamage)(__DRIdrawable *draw, uint32_t flush_flags, int nrects, const int *rects); + int64_t (*swapBuffers)(struct dri_drawable *draw, uint32_t flush_flags); + void (*setSwapInterval)(struct dri_drawable *drawable, int interval); + int (*queryBufferAge)(struct dri_drawable *drawable); + int64_t (*swapBuffersWithDamage)(struct dri_drawable *draw, uint32_t flush_flags, int nrects, const int *rects); }; /** @@ -109,7 +109,7 @@ struct __DRIkopperLoaderExtensionRec { /* Asks the loader to fill in VkWhateverSurfaceCreateInfo etc. */ void (*SetSurfaceCreateInfo)(void *draw, struct kopper_loader_info *out); /* Asks the loader to fill in the drawable's width and height */ - void (*GetDrawableInfo)(__DRIdrawable *draw, int *w, int *h, + void (*GetDrawableInfo)(struct dri_drawable *draw, int *w, int *h, void *closure); }; #endif /* KOPPER_INTERFACE_H */ diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 20ce2ddc103..d5b1fdc588e 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -162,7 +162,7 @@ const __DRIuseInvalidateExtension use_invalidate = { }; static void -dri2_get_pbuffer_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, +dri2_get_pbuffer_drawable_info(struct dri_drawable *draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -180,7 +180,7 @@ dri2_get_bytes_per_pixel(struct dri2_egl_surface *dri2_surf) } static void -dri2_put_image(__DRIdrawable *draw, int op, int x, int y, int w, int h, +dri2_put_image(struct dri_drawable *draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -217,7 +217,7 @@ dri2_put_image(__DRIdrawable *draw, int op, int x, int y, int w, int h, } static void -dri2_get_image(__DRIdrawable *read, int x, int y, int w, int h, char *data, +dri2_get_image(struct dri_drawable *read, int x, int y, int w, int h, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -1412,7 +1412,7 @@ dri2_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, _EGLSurface *rsurf, _EGLContext *old_ctx; _EGLSurface *old_dsurf, *old_rsurf; _EGLSurface *tmp_dsurf, *tmp_rsurf; - __DRIdrawable *ddraw, *rdraw; + struct dri_drawable *ddraw, *rdraw; struct dri_context *cctx; EGLint egl_error = EGL_SUCCESS; @@ -1541,7 +1541,7 @@ dri2_make_current(_EGLDisplay *disp, _EGLSurface *dsurf, _EGLSurface *rsurf, return EGL_TRUE; } -__DRIdrawable * +struct dri_drawable * dri2_surface_get_dri_drawable(_EGLSurface *surf) { struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf); @@ -1615,7 +1615,7 @@ dri2_flush_drawable_for_swapbuffers_flags( enum __DRI2throttleReason throttle_reason) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw); /* flush not available for swrast */ if (dri2_dpy->swrast_not_kms) @@ -1650,7 +1650,7 @@ static EGLBoolean dri2_swap_buffers(_EGLDisplay *disp, _EGLSurface *surf) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); _EGLContext *ctx = _eglGetCurrentContext(); EGLBoolean ret; @@ -1672,7 +1672,7 @@ dri2_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *surf, const EGLint *rects, EGLint n_rects) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); _EGLContext *ctx = _eglGetCurrentContext(); EGLBoolean ret; @@ -1698,7 +1698,7 @@ dri2_swap_buffers_region(_EGLDisplay *disp, _EGLSurface *surf, EGLint numRects, const EGLint *rects) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); EGLBoolean ret; if (!dri2_dpy->vtbl->swap_buffers_region) @@ -1719,7 +1719,7 @@ dri2_set_damage_region(_EGLDisplay *disp, _EGLSurface *surf, EGLint *rects, EGLint n_rects) { struct dri2_egl_display *dri2_dpy = dri2_egl_display_lock(disp); - __DRIdrawable *drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *drawable = dri2_dpy->vtbl->get_dri_drawable(surf); if (!disp->Extensions.KHR_partial_update) { mtx_unlock(&dri2_dpy->lock); @@ -1774,7 +1774,7 @@ dri2_wait_client(_EGLDisplay *disp, _EGLContext *ctx) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); _EGLSurface *surf = ctx->DrawSurface; - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); /* FIXME: If EGL allows frontbuffer rendering for window surfaces, * we need to copy fake to real here.*/ @@ -1802,7 +1802,7 @@ dri2_bind_tex_image(_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer) struct dri2_egl_context *dri2_ctx; _EGLContext *ctx; GLint format, target; - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf); ctx = _eglGetCurrentContext(); dri2_ctx = dri2_egl_context(ctx); diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 819070c9aec..5335931a49c 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -172,7 +172,7 @@ struct dri2_egl_display_vtbl { EGLint *numerator, EGLint *denominator); /* mandatory */ - __DRIdrawable *(*get_dri_drawable)(_EGLSurface *surf); + struct dri_drawable *(*get_dri_drawable)(_EGLSurface *surf); /* optional */ void (*close_screen_notify)(_EGLDisplay *disp); @@ -320,7 +320,7 @@ struct dri2_egl_context { struct dri2_egl_surface { _EGLSurface base; - __DRIdrawable *dri_drawable; + struct dri_drawable *dri_drawable; __DRIbuffer buffers[5]; bool have_fake_front; @@ -470,7 +470,7 @@ dri2_create_screen(_EGLDisplay *disp); EGLBoolean dri2_setup_device(_EGLDisplay *disp, EGLBoolean software); -__DRIdrawable * +struct dri_drawable * dri2_surface_get_dri_drawable(_EGLSurface *surf); GLboolean diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index 197f3dad669..67379645550 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -550,7 +550,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf) * return error when the allocation for supported buffer failed. */ static int -droid_image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, +droid_image_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *images) { @@ -755,7 +755,7 @@ droid_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target, } static void -droid_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +droid_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { } @@ -894,7 +894,7 @@ static const __DRIimageLoaderExtension droid_image_loader_extension = { }; static void -droid_display_shared_buffer(__DRIdrawable *driDrawable, int fence_fd, +droid_display_shared_buffer(struct dri_drawable *driDrawable, int fence_fd, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -953,7 +953,7 @@ droid_display_shared_buffer(__DRIdrawable *driDrawable, int fence_fd, } static void -droid_swrast_get_drawable_info(__DRIdrawable *drawable, +droid_swrast_get_drawable_info(struct dri_drawable *drawable, int *x, int *y, int *width, int *height, void *loaderPrivate) { @@ -968,21 +968,21 @@ droid_swrast_get_drawable_info(__DRIdrawable *drawable, } static void -droid_swrast_put_image2(__DRIdrawable *draw, int op, int x, int y, int w, +droid_swrast_put_image2(struct dri_drawable *draw, int op, int x, int y, int w, int h, int stride, char *data, void *loaderPrivate) { return; } static void -droid_swrast_put_image(__DRIdrawable *draw, int op, int x, int y, int w, +droid_swrast_put_image(struct dri_drawable *draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { return; } static void -droid_swrast_get_image(__DRIdrawable *read, int x, int y, int w, int h, +droid_swrast_get_image(struct dri_drawable *read, int x, int y, int w, int h, char *data, void *loaderPrivate) { return; diff --git a/src/egl/drivers/dri2/platform_device.c b/src/egl/drivers/dri2/platform_device.c index 116131edf7b..5a5bcf8c217 100644 --- a/src/egl/drivers/dri2/platform_device.c +++ b/src/egl/drivers/dri2/platform_device.c @@ -67,7 +67,7 @@ device_free_images(struct dri2_egl_surface *dri2_surf) } static int -device_image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, +device_image_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *buffers) { @@ -179,7 +179,7 @@ static const struct dri2_egl_display_vtbl dri2_device_display_vtbl = { }; static void -device_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +device_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { } diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 9bb7ea4b950..2d7e10b3fc5 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -284,7 +284,7 @@ get_swrast_front_bo(struct dri2_egl_surface *dri2_surf) } static int -dri2_drm_image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, +dri2_drm_image_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *buffers) { @@ -302,7 +302,7 @@ dri2_drm_image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, } static void -dri2_drm_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +dri2_drm_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { (void)driDrawable; (void)loaderPrivate; @@ -404,7 +404,7 @@ dri2_drm_authenticate(_EGLDisplay *disp, uint32_t id) } static void -swrast_put_image2(__DRIdrawable *driDrawable, int op, int x, int y, int width, +swrast_put_image2(struct dri_drawable *driDrawable, int op, int x, int y, int width, int height, int stride, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -447,7 +447,7 @@ swrast_put_image2(__DRIdrawable *driDrawable, int op, int x, int y, int width, } static void -swrast_get_image(__DRIdrawable *driDrawable, int x, int y, int width, +swrast_get_image(struct dri_drawable *driDrawable, int x, int y, int width, int height, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index ed8986292df..17dc86425fc 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -62,7 +62,7 @@ surfaceless_free_images(struct dri2_egl_surface *dri2_surf) } static int -surfaceless_image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, +surfaceless_image_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *buffers) @@ -179,7 +179,7 @@ static const struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = { }; static void -surfaceless_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +surfaceless_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { } diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 931153c22db..74e64189ea8 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1401,7 +1401,7 @@ update_buffers_if_needed(struct dri2_egl_surface *dri2_surf) } static int -image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, +image_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *buffers) { @@ -1417,7 +1417,7 @@ image_get_buffers(__DRIdrawable *driDrawable, unsigned int format, } static void -dri2_wl_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +dri2_wl_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { (void)driDrawable; (void)loaderPrivate; @@ -1703,7 +1703,7 @@ dri2_wl_swap_buffers_with_damage(_EGLDisplay *disp, _EGLSurface *draw, if (dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu) { _EGLContext *ctx = _eglGetCurrentContext(); struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx); - __DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw); + struct dri_drawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(draw); dri2_blit_image( dri2_ctx->dri_context, dri2_surf->current->linear_copy, dri2_surf->current->dri_image, 0, 0, dri2_surf->base.Width, @@ -2548,7 +2548,7 @@ dri2_wl_swrast_commit_backbuffer(struct dri2_egl_surface *dri2_surf) } static void -dri2_wl_kopper_get_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, +dri2_wl_kopper_get_drawable_info(struct dri_drawable *draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -2561,7 +2561,7 @@ dri2_wl_kopper_get_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, } static void -dri2_wl_swrast_get_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, +dri2_wl_swrast_get_drawable_info(struct dri_drawable *draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -2574,7 +2574,7 @@ dri2_wl_swrast_get_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, } static void -dri2_wl_swrast_get_image(__DRIdrawable *read, int x, int y, int w, int h, +dri2_wl_swrast_get_image(struct dri_drawable *read, int x, int y, int w, int h, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -2613,7 +2613,7 @@ dri2_wl_swrast_get_image(__DRIdrawable *read, int x, int y, int w, int h, } static void -dri2_wl_swrast_put_image2(__DRIdrawable *draw, int op, int x, int y, int w, +dri2_wl_swrast_put_image2(struct dri_drawable *draw, int op, int x, int y, int w, int h, int stride, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -2649,7 +2649,7 @@ dri2_wl_swrast_put_image2(__DRIdrawable *draw, int op, int x, int y, int w, } static void -dri2_wl_swrast_put_image(__DRIdrawable *draw, int op, int x, int y, int w, +dri2_wl_swrast_put_image(struct dri_drawable *draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index ddbaeeee34c..d95e15eaaeb 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -111,7 +111,7 @@ swrastDestroyDrawable(struct dri2_egl_display *dri2_dpy, } static bool -x11_get_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, int *h, +x11_get_drawable_info(struct dri_drawable *draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -144,7 +144,7 @@ x11_get_drawable_info(__DRIdrawable *draw, int *x, int *y, int *w, int *h, } static void -swrastGetDrawableInfo(__DRIdrawable *draw, int *x, int *y, int *w, int *h, +swrastGetDrawableInfo(struct dri_drawable *draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { *x = *y = *w = *h = 0; @@ -152,7 +152,7 @@ swrastGetDrawableInfo(__DRIdrawable *draw, int *x, int *y, int *w, int *h, } static void -swrastPutImage2(__DRIdrawable *draw, int op, int x, int y, int w, int h, +swrastPutImage2(struct dri_drawable *draw, int op, int x, int y, int w, int h, int stride, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -217,7 +217,7 @@ swrastPutImage2(__DRIdrawable *draw, int op, int x, int y, int w, int h, } static void -swrastPutImage(__DRIdrawable *draw, int op, int x, int y, int w, int h, +swrastPutImage(struct dri_drawable *draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -226,7 +226,7 @@ swrastPutImage(__DRIdrawable *draw, int op, int x, int y, int w, int h, } static void -swrastGetImage2(__DRIdrawable * read, +swrastGetImage2(struct dri_drawable * read, int x, int y, int w, int h, int stride, char *data, void *loaderPrivate) { @@ -266,7 +266,7 @@ swrastGetImage2(__DRIdrawable * read, } static void -swrastGetImage(__DRIdrawable *read, int x, int y, int w, int h, char *data, +swrastGetImage(struct dri_drawable *read, int x, int y, int w, int h, char *data, void *loaderPrivate) { struct dri2_egl_surface *dri2_surf = loaderPrivate; @@ -275,7 +275,7 @@ swrastGetImage(__DRIdrawable *read, int x, int y, int w, int h, char *data, } static void -swrastPutImageShm(__DRIdrawable * draw, int op, +swrastPutImageShm(struct dri_drawable * draw, int op, int x, int y, int w, int h, int stride, int shmid, char *shmaddr, unsigned offset, void *loaderPrivate) @@ -326,7 +326,7 @@ swrastPutImageShm(__DRIdrawable * draw, int op, } static void -swrastGetImageShm(__DRIdrawable * read, +swrastGetImageShm(struct dri_drawable * read, int x, int y, int w, int h, int shmid, void *loaderPrivate) { @@ -605,7 +605,7 @@ dri2_query_surface(_EGLDisplay *disp, _EGLSurface *surf, EGLint attribute, struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf); int x, y, w, h; - __DRIdrawable *drawable = dri2_dpy->vtbl->get_dri_drawable(surf); + struct dri_drawable *drawable = dri2_dpy->vtbl->get_dri_drawable(surf); switch (attribute) { case EGL_WIDTH: @@ -671,7 +671,7 @@ dri2_x11_process_buffers(struct dri2_egl_surface *dri2_surf, } static __DRIbuffer * -dri2_x11_get_buffers(__DRIdrawable *driDrawable, int *width, int *height, +dri2_x11_get_buffers(struct dri_drawable *driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate) { @@ -706,7 +706,7 @@ dri2_x11_get_buffers(__DRIdrawable *driDrawable, int *width, int *height, } static __DRIbuffer * -dri2_x11_get_buffers_with_format(__DRIdrawable *driDrawable, int *width, +dri2_x11_get_buffers_with_format(struct dri_drawable *driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate) { @@ -740,7 +740,7 @@ dri2_x11_get_buffers_with_format(__DRIdrawable *driDrawable, int *width, } static void -dri2_x11_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +dri2_x11_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { (void)driDrawable; diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c index bb351317cbf..00ae25c2dfe 100644 --- a/src/egl/drivers/dri2/platform_x11_dri3.c +++ b/src/egl/drivers/dri2/platform_x11_dri3.c @@ -412,7 +412,7 @@ dri3_create_image_khr(_EGLDisplay *disp, _EGLContext *ctx, EGLenum target, * contents of its fake front buffer. */ static void -dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +dri3_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { struct loader_dri3_drawable *draw = loaderPrivate; (void)driDrawable; @@ -492,7 +492,7 @@ dri3_query_surface(_EGLDisplay *disp, _EGLSurface *surf, EGLint attribute, return _eglQuerySurface(disp, surf, attribute, value); } -static __DRIdrawable * +static struct dri_drawable * dri3_get_dri_drawable(_EGLSurface *surf) { struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf); diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 960192fc6a6..8b359480b4c 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -94,10 +94,8 @@ dri2_buffer(__DRIbuffer * driBufferPriv) * EGL: wl_egl_window::resize_callback (called outside Mesa) */ void -dri_invalidate_drawable(__DRIdrawable *dPriv) +dri_invalidate_drawable(struct dri_drawable *drawable) { - struct dri_drawable *drawable = dri_drawable(dPriv); - drawable->lastStamp++; drawable->texture_mask = 0; /* mark all attachments as invalid */ @@ -199,13 +197,13 @@ dri2_drawable_get_buffers(struct dri_drawable *drawable, if (with_format) { num_attachments /= 2; - buffers = loader->getBuffersWithFormat(opaque_dri_drawable(drawable), + buffers = loader->getBuffersWithFormat(drawable, &drawable->w, &drawable->h, attachments, num_attachments, &num_buffers, drawable->loaderPrivate); } else { - buffers = loader->getBuffers(opaque_dri_drawable(drawable), + buffers = loader->getBuffers(drawable, &drawable->w, &drawable->h, attachments, num_attachments, &num_buffers, drawable->loaderPrivate); @@ -270,7 +268,7 @@ dri_image_drawable_get_buffers(struct dri_drawable *drawable, * st_manager_validate_framebuffers (part of st_validate_state) */ return drawable->screen->image.loader->getBuffers( - opaque_dri_drawable(drawable), + drawable, color_format, (uint32_t *)&drawable->base.stamp, drawable->loaderPrivate, buffer_mask, @@ -740,22 +738,19 @@ dri2_flush_frontbuffer(struct dri_context *ctx, } if (image) { - image->flushFrontBuffer(opaque_dri_drawable(drawable), - drawable->loaderPrivate); + image->flushFrontBuffer(drawable, drawable->loaderPrivate); if (ctx->is_shared_buffer_bound) { if (fence) fence_fd = pipe->screen->fence_get_fd(pipe->screen, fence); - shared_buffer_loader->displaySharedBuffer(opaque_dri_drawable(drawable), - fence_fd, + shared_buffer_loader->displaySharedBuffer(drawable, fence_fd, drawable->loaderPrivate); pipe->screen->fence_reference(pipe->screen, &fence, NULL); } } else if (loader->flushFrontBuffer) { - loader->flushFrontBuffer(opaque_dri_drawable(drawable), - drawable->loaderPrivate); + loader->flushFrontBuffer(drawable, drawable->loaderPrivate); } return true; @@ -771,8 +766,7 @@ dri2_flush_swapbuffers(struct dri_context *ctx, const __DRIimageLoaderExtension *image = drawable->screen->image.loader; if (image && image->flushSwapBuffers) { - image->flushSwapBuffers(opaque_dri_drawable(drawable), - drawable->loaderPrivate); + image->flushSwapBuffers(drawable, drawable->loaderPrivate); } } @@ -1916,9 +1910,8 @@ dri_interop_flush_objects(struct dri_context *ctx, * \brief the DRI2bufferDamageExtension set_damage_region method */ void -dri_set_damage_region(__DRIdrawable *dPriv, unsigned int nrects, int *rects) +dri_set_damage_region(struct dri_drawable *drawable, unsigned int nrects, int *rects) { - struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_box *boxes = NULL; if (nrects) { diff --git a/src/gallium/frontends/dri/dri_drawable.c b/src/gallium/frontends/dri/dri_drawable.c index 384c7b1c036..1b64c6a1ebb 100644 --- a/src/gallium/frontends/dri/dri_drawable.c +++ b/src/gallium/frontends/dri/dri_drawable.c @@ -148,7 +148,7 @@ dri_st_framebuffer_flush_swapbuffers(struct st_context *st, /** * This is called when we need to set up GL rendering to a new X window. */ -__DRIdrawable * +struct dri_drawable * dri_create_drawable(struct dri_screen *screen, const __DRIconfig *config, bool isPixmap, void *loaderPrivate) { @@ -192,7 +192,7 @@ dri_create_drawable(struct dri_screen *screen, const __DRIconfig *config, break; } - return opaque_dri_drawable(drawable); + return drawable; } static void @@ -262,10 +262,9 @@ dri_drawable_validate_att(struct dri_context *ctx, */ void dri_set_tex_buffer2(struct dri_context *ctx, GLint target, - GLint format, __DRIdrawable *dPriv) + GLint format, struct dri_drawable *drawable) { struct st_context *st = ctx->st; - struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_resource *pt; _mesa_glthread_finish(st->ctx); @@ -473,11 +472,10 @@ notify_before_flush_cb(void* _args) */ void dri_flush(struct dri_context *ctx, - __DRIdrawable *dPriv, + struct dri_drawable *drawable, unsigned flags, enum __DRI2throttleReason reason) { - struct dri_drawable *drawable = dri_drawable(dPriv); struct st_context *st; unsigned flush_flags; struct notify_before_flush_cb_args args = { 0 }; @@ -573,7 +571,7 @@ dri_flush(struct dri_context *ctx, * DRI2 flush extension. */ void -dri_flush_drawable(__DRIdrawable *dPriv) +dri_flush_drawable(struct dri_drawable *dPriv) { struct dri_context *ctx = dri_get_current(); @@ -585,7 +583,7 @@ dri_flush_drawable(__DRIdrawable *dPriv) * dri_throttle - A DRI2ThrottleExtension throttling function. */ void -dri_throttle(struct dri_context *cPriv, __DRIdrawable *dPriv, +dri_throttle(struct dri_context *cPriv, struct dri_drawable *dPriv, enum __DRI2throttleReason reason) { dri_flush(cPriv, dPriv, 0, reason); diff --git a/src/gallium/frontends/dri/dri_drawable.h b/src/gallium/frontends/dri/dri_drawable.h index 7ed73cbce09..1e5bbde918e 100644 --- a/src/gallium/frontends/dri/dri_drawable.h +++ b/src/gallium/frontends/dri/dri_drawable.h @@ -115,20 +115,6 @@ struct dri_drawable void (*swap_buffers_with_damage)(struct dri_drawable *drawable, int nrects, const int *rects); }; -/* Typecast the opaque pointer to our own type. */ -static inline struct dri_drawable * -dri_drawable(__DRIdrawable *drawable) -{ - return (struct dri_drawable *)drawable; -} - -/* Typecast our own type to the opaque pointer. */ -static inline __DRIdrawable * -opaque_dri_drawable(struct dri_drawable *drawable) -{ - return (__DRIdrawable *)drawable; -} - static inline void dri_get_drawable(struct dri_drawable *drawable) { @@ -154,12 +140,12 @@ dri_pipe_blit(struct pipe_context *pipe, void dri_flush(struct dri_context *ctx, - __DRIdrawable *dPriv, + struct dri_drawable *drawable, unsigned flags, enum __DRI2throttleReason reason); void -dri_flush_drawable(__DRIdrawable *dPriv); +dri_flush_drawable(struct dri_drawable *dPriv); extern const __DRItexBufferExtension driTexBufferExtension; diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c index 409ff58de6a..98ba2a45607 100644 --- a/src/gallium/frontends/dri/dri_util.c +++ b/src/gallium/frontends/dri/dri_util.c @@ -662,8 +662,8 @@ driCopyContext(struct dri_context *dest, struct dri_context *src, unsigned long * function. */ int driBindContext(struct dri_context *ctx, - __DRIdrawable *pdp, - __DRIdrawable *prp) + struct dri_drawable *draw, + struct dri_drawable *read) { /* ** Assume error checking is done properly in glXMakeCurrent before @@ -673,8 +673,7 @@ int driBindContext(struct dri_context *ctx, if (!ctx) return GL_FALSE; - return dri_make_current(ctx, dri_drawable(pdp), - dri_drawable(prp)); + return dri_make_current(ctx, draw, read); } /** @@ -713,9 +712,9 @@ int driUnbindContext(struct dri_context *ctx) /*@}*/ void -driDestroyDrawable(__DRIdrawable *pdp) +driDestroyDrawable(struct dri_drawable *drawable) { - dri_put_drawable(dri_drawable(pdp)); + dri_put_drawable(drawable); } static int @@ -850,29 +849,24 @@ driGetAPIMask(struct dri_screen *screen) * driver. */ void -driSwapBuffersWithDamage(__DRIdrawable *pdp, int nrects, const int *rects) +driSwapBuffersWithDamage(struct dri_drawable *drawable, int nrects, const int *rects) { - struct dri_drawable *drawable = dri_drawable(pdp); - assert(drawable->screen->swrast_loader); drawable->swap_buffers_with_damage(drawable, nrects, rects); } void -driSwapBuffers(__DRIdrawable *pdp) +driSwapBuffers(struct dri_drawable *drawable) { - struct dri_drawable *drawable = dri_drawable(pdp); - assert(drawable->screen->swrast_loader); drawable->swap_buffers(drawable); } int -driSWRastQueryBufferAge(__DRIdrawable *pdp) +driSWRastQueryBufferAge(struct dri_drawable *drawable) { - struct dri_drawable *drawable = dri_drawable(pdp); return drawable->buffer_age; } diff --git a/src/gallium/frontends/dri/dri_util.h b/src/gallium/frontends/dri/dri_util.h index e304d620364..55b93754a57 100644 --- a/src/gallium/frontends/dri/dri_util.h +++ b/src/gallium/frontends/dri/dri_util.h @@ -125,7 +125,7 @@ extern uint32_t driImageFormatToSizedInternalGLFormat(uint32_t image_format); PUBLIC unsigned int driGetAPIMask(struct dri_screen *screen); -PUBLIC __DRIdrawable * +PUBLIC struct dri_drawable * dri_create_drawable(struct dri_screen *psp, const __DRIconfig *config, bool isPixmap, void *loaderPrivate); extern const __DRIimageDriverExtension driImageDriverExtension; @@ -135,41 +135,41 @@ driGetConfigAttrib(const __DRIconfig *config, unsigned int attrib, unsigned int PUBLIC int driIndexConfigAttrib(const __DRIconfig *config, int index, unsigned int *attrib, unsigned int *value); PUBLIC void -driDestroyDrawable(__DRIdrawable *pdp); +driDestroyDrawable(struct dri_drawable *drawable); PUBLIC void -driSwapBuffers(__DRIdrawable *pdp); +driSwapBuffers(struct dri_drawable *drawable); PUBLIC void -driSwapBuffersWithDamage(__DRIdrawable *pdp, int nrects, const int *rects); +driSwapBuffersWithDamage(struct dri_drawable *drawable, int nrects, const int *rects); PUBLIC struct dri_context * driCreateNewContext(struct dri_screen *screen, const __DRIconfig *config, struct dri_context *shared, void *data); PUBLIC int driCopyContext(struct dri_context *dest, struct dri_context *src, unsigned long mask); PUBLIC void driDestroyContext(struct dri_context *ctx); -PUBLIC int driBindContext(struct dri_context *ctx, __DRIdrawable *pdp, __DRIdrawable *prp); +PUBLIC int driBindContext(struct dri_context *ctx, struct dri_drawable *draw, struct dri_drawable *read); PUBLIC int driUnbindContext(struct dri_context *ctx); PUBLIC int64_t -kopperSwapBuffers(__DRIdrawable *dPriv, uint32_t flush_flags); +kopperSwapBuffers(struct dri_drawable *dPriv, uint32_t flush_flags); PUBLIC int64_t -kopperSwapBuffersWithDamage(__DRIdrawable *dPriv, uint32_t flush_flags, int nrects, const int *rects); -PUBLIC __DRIdrawable * +kopperSwapBuffersWithDamage(struct dri_drawable *drawable, uint32_t flush_flags, int nrects, const int *rects); +PUBLIC struct dri_drawable * kopperCreateNewDrawable(struct dri_screen *psp, const __DRIconfig *config, void *data, __DRIkopperDrawableInfo *info); PUBLIC void -kopperSetSwapInterval(__DRIdrawable *dPriv, int interval); +kopperSetSwapInterval(struct dri_drawable *drawable, int interval); PUBLIC int -kopperQueryBufferAge(__DRIdrawable *dPriv); +kopperQueryBufferAge(struct dri_drawable *drawable); PUBLIC void -driswCopySubBuffer(__DRIdrawable *pdp, int x, int y, int w, int h); +driswCopySubBuffer(struct dri_drawable *drawable, int x, int y, int w, int h); PUBLIC void dri_set_tex_buffer2(struct dri_context *ctx, GLint target, - GLint format, __DRIdrawable *dPriv); + GLint format, struct dri_drawable *drawable); PUBLIC int dri_query_renderer_string(struct dri_screen *_screen, int param, @@ -179,14 +179,14 @@ dri_query_renderer_integer(struct dri_screen *_screen, int param, unsigned int *value); PUBLIC void -dri_flush_drawable(__DRIdrawable *dPriv); +dri_flush_drawable(struct dri_drawable *dPriv); PUBLIC void dri_flush(struct dri_context *cPriv, - __DRIdrawable *dPriv, + struct dri_drawable *dPriv, unsigned flags, enum __DRI2throttleReason reason); PUBLIC void -dri_invalidate_drawable(__DRIdrawable *dPriv); +dri_invalidate_drawable(struct dri_drawable *drawable); PUBLIC int dri2GalliumConfigQueryb(struct dri_screen *sPriv, const char *var, @@ -202,7 +202,7 @@ PUBLIC int dri_get_initial_swap_interval(struct dri_screen *driScreen); PUBLIC bool dri_valid_swap_interval(struct dri_screen *driScreen, int interval); PUBLIC void -dri_throttle(struct dri_context *cPriv, __DRIdrawable *dPriv, +dri_throttle(struct dri_context *cPriv, struct dri_drawable *dPriv, enum __DRI2throttleReason reason); PUBLIC int @@ -297,7 +297,7 @@ PUBLIC int dri_query_compatible_render_only_device_fd(int kms_only_fd); PUBLIC int -driSWRastQueryBufferAge(__DRIdrawable *pdp); +driSWRastQueryBufferAge(struct dri_drawable *drawable); PUBLIC void dri2_set_in_fence_fd(__DRIimage *img, int fd); @@ -311,7 +311,7 @@ dri2_query_compression_modifiers(struct dri_screen *_screen, uint32_t fourcc, uint64_t *modifiers, int *count); PUBLIC void -dri_set_damage_region(__DRIdrawable *dPriv, unsigned int nrects, int *rects); +dri_set_damage_region(struct dri_drawable *drawable, unsigned int nrects, int *rects); PUBLIC unsigned dri_fence_get_caps(struct dri_screen *screen); diff --git a/src/gallium/frontends/dri/drisw.c b/src/gallium/frontends/dri/drisw.c index d00120b60b3..331f9c40a61 100644 --- a/src/gallium/frontends/dri/drisw.c +++ b/src/gallium/frontends/dri/drisw.c @@ -56,8 +56,7 @@ get_drawable_info(struct dri_drawable *drawable, int *x, int *y, int *w, int *h) { const __DRIswrastLoaderExtension *loader = drawable->screen->swrast_loader; - loader->getDrawableInfo(opaque_dri_drawable(drawable), - x, y, w, h, + loader->getDrawableInfo(drawable, x, y, w, h, drawable->loaderPrivate); } @@ -66,7 +65,7 @@ put_image(struct dri_drawable *drawable, void *data, unsigned width, unsigned he { const __DRIswrastLoaderExtension *loader = drawable->screen->swrast_loader; - loader->putImage(opaque_dri_drawable(drawable), __DRI_SWRAST_IMAGE_OP_SWAP, + loader->putImage(drawable, __DRI_SWRAST_IMAGE_OP_SWAP, 0, 0, width, height, data, drawable->loaderPrivate); } @@ -77,7 +76,7 @@ put_image2(struct dri_drawable *drawable, void *data, int x, int y, { const __DRIswrastLoaderExtension *loader = drawable->screen->swrast_loader; - loader->putImage2(opaque_dri_drawable(drawable), __DRI_SWRAST_IMAGE_OP_SWAP, + loader->putImage2(drawable, __DRI_SWRAST_IMAGE_OP_SWAP, x, y, width, height, stride, data, drawable->loaderPrivate); } @@ -91,11 +90,11 @@ put_image_shm(struct dri_drawable *drawable, int shmid, char *shmaddr, /* if we have the newer interface, don't have to add the offset_x here. */ if (loader->base.version > 4 && loader->putImageShm2) - loader->putImageShm2(opaque_dri_drawable(drawable), __DRI_SWRAST_IMAGE_OP_SWAP, + loader->putImageShm2(drawable, __DRI_SWRAST_IMAGE_OP_SWAP, x, y, width, height, stride, shmid, shmaddr, offset, drawable->loaderPrivate); else - loader->putImageShm(opaque_dri_drawable(drawable), __DRI_SWRAST_IMAGE_OP_SWAP, + loader->putImageShm(drawable, __DRI_SWRAST_IMAGE_OP_SWAP, x, y, width, height, stride, shmid, shmaddr, offset + offset_x, drawable->loaderPrivate); } @@ -105,8 +104,7 @@ get_image(struct dri_drawable *drawable, int x, int y, int width, int height, vo { const __DRIswrastLoaderExtension *loader = drawable->screen->swrast_loader; - loader->getImage(opaque_dri_drawable(drawable), - x, y, width, height, + loader->getImage(drawable, x, y, width, height, data, drawable->loaderPrivate); } @@ -119,8 +117,7 @@ get_image2(struct dri_drawable *drawable, int x, int y, int width, int height, i if (loader->base.version < 3) return; - loader->getImage2(opaque_dri_drawable(drawable), - x, y, width, height, stride, + loader->getImage2(drawable, x, y, width, height, stride, data, drawable->loaderPrivate); } @@ -140,9 +137,9 @@ get_image_shm(struct dri_drawable *drawable, int x, int y, int width, int height return false; if (loader->base.version > 5 && loader->getImageShm2) - return loader->getImageShm2(opaque_dri_drawable(drawable), x, y, width, height, whandle.handle, drawable->loaderPrivate); + return loader->getImageShm2(drawable, x, y, width, height, whandle.handle, drawable->loaderPrivate); - loader->getImageShm(opaque_dri_drawable(drawable), x, y, width, height, whandle.handle, drawable->loaderPrivate); + loader->getImageShm(drawable, x, y, width, height, whandle.handle, drawable->loaderPrivate); return true; } @@ -644,10 +641,8 @@ drisw_init_screen(struct dri_screen *screen, bool driver_name_is_inferred) /* swrast copy sub buffer entrypoint. */ void -driswCopySubBuffer(__DRIdrawable *pdp, int x, int y, int w, int h) +driswCopySubBuffer(struct dri_drawable *drawable, int x, int y, int w, int h) { - struct dri_drawable *drawable = dri_drawable(pdp); - assert(drawable->screen->swrast_loader); drisw_copy_sub_buffer(drawable, x, y, w, h); diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index aeb809b428d..574c71240db 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -352,8 +352,7 @@ get_drawable_info(struct dri_drawable *drawable, int *x, int *y, int *w, int *h) const __DRIswrastLoaderExtension *loader = drawable->screen->swrast_loader; if (loader) - loader->getDrawableInfo(opaque_dri_drawable(drawable), - x, y, w, h, + loader->getDrawableInfo(drawable, x, y, w, h, drawable->loaderPrivate); } @@ -453,8 +452,7 @@ get_image(struct dri_drawable *drawable, int x, int y, int width, int height, vo { const __DRIswrastLoaderExtension *loader = drawable->screen->swrast_loader; - loader->getImage(opaque_dri_drawable(drawable), - x, y, width, height, + loader->getImage(drawable, x, y, width, height, data, drawable->loaderPrivate); } @@ -474,9 +472,9 @@ get_image_shm(struct dri_drawable *drawable, int x, int y, int width, int height return false; if (loader->base.version > 5 && loader->getImageShm2) - return loader->getImageShm2(opaque_dri_drawable(drawable), x, y, width, height, whandle.handle, drawable->loaderPrivate); + return loader->getImageShm2(drawable, x, y, width, height, whandle.handle, drawable->loaderPrivate); - loader->getImageShm(opaque_dri_drawable(drawable), x, y, width, height, whandle.handle, drawable->loaderPrivate); + loader->getImageShm(drawable, x, y, width, height, whandle.handle, drawable->loaderPrivate); return true; } @@ -524,9 +522,8 @@ kopper_init_drawable(struct dri_drawable *drawable, bool isPixmap, int alphaBits } int64_t -kopperSwapBuffersWithDamage(__DRIdrawable *dPriv, uint32_t flush_flags, int nrects, const int *rects) +kopperSwapBuffersWithDamage(struct dri_drawable *drawable, uint32_t flush_flags, int nrects, const int *rects) { - struct dri_drawable *drawable = dri_drawable(dPriv); struct dri_context *ctx = dri_get_current(); struct pipe_resource *ptex; @@ -548,7 +545,7 @@ kopperSwapBuffersWithDamage(__DRIdrawable *dPriv, uint32_t flush_flags, int nrec drawable->texture_stamp = drawable->lastStamp - 1; - dri_flush(ctx, opaque_dri_drawable(drawable), + dri_flush(ctx, drawable, __DRI2_FLUSH_DRAWABLE | __DRI2_FLUSH_CONTEXT | flush_flags, __DRI2_THROTTLE_SWAPBUFFER); @@ -578,7 +575,7 @@ kopperSwapBuffersWithDamage(__DRIdrawable *dPriv, uint32_t flush_flags, int nrec } int64_t -kopperSwapBuffers(__DRIdrawable *dPriv, uint32_t flush_flags) +kopperSwapBuffers(struct dri_drawable *dPriv, uint32_t flush_flags) { return kopperSwapBuffersWithDamage(dPriv, flush_flags, 0, NULL); } @@ -587,7 +584,7 @@ static void kopper_swap_buffers_with_damage(struct dri_drawable *drawable, int nrects, const int *rects) { - kopperSwapBuffersWithDamage(opaque_dri_drawable(drawable), 0, nrects, rects); + kopperSwapBuffersWithDamage(drawable, 0, nrects, rects); } static void @@ -597,9 +594,8 @@ kopper_swap_buffers(struct dri_drawable *drawable) } void -kopperSetSwapInterval(__DRIdrawable *dPriv, int interval) +kopperSetSwapInterval(struct dri_drawable *drawable, int interval) { - struct dri_drawable *drawable = dri_drawable(dPriv); struct dri_screen *screen = drawable->screen; struct pipe_resource *ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT] ? drawable->textures[ST_ATTACHMENT_BACK_LEFT] : @@ -620,9 +616,8 @@ kopperSetSwapInterval(__DRIdrawable *dPriv, int interval) } int -kopperQueryBufferAge(__DRIdrawable *dPriv) +kopperQueryBufferAge(struct dri_drawable *drawable) { - struct dri_drawable *drawable = dri_drawable(dPriv); struct dri_context *ctx = dri_get_current(); struct pipe_resource *ptex = drawable->textures[ST_ATTACHMENT_BACK_LEFT] ? drawable->textures[ST_ATTACHMENT_BACK_LEFT] : diff --git a/src/gallium/frontends/dri/kopper_stubs.c b/src/gallium/frontends/dri/kopper_stubs.c index 0d119c7cfb3..80362091b26 100644 --- a/src/gallium/frontends/dri/kopper_stubs.c +++ b/src/gallium/frontends/dri/kopper_stubs.c @@ -3,24 +3,24 @@ #include "dri_util.h" int64_t -kopperSwapBuffers(__DRIdrawable *dPriv, uint32_t flush_flags) +kopperSwapBuffers(struct dri_drawable *dPriv, uint32_t flush_flags) { return 0; } int64_t -kopperSwapBuffersWithDamage(__DRIdrawable *dPriv, uint32_t flush_flags, int nrects, const int *rects) +kopperSwapBuffersWithDamage(struct dri_drawable *dPriv, uint32_t flush_flags, int nrects, const int *rects) { return 0; } void -kopperSetSwapInterval(__DRIdrawable *dPriv, int interval) +kopperSetSwapInterval(struct dri_drawable *dPriv, int interval) { } int -kopperQueryBufferAge(__DRIdrawable *dPriv) +kopperQueryBufferAge(struct dri_drawable *dPriv) { return 0; } diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c index d24d3fcfb8d..666ea87750e 100644 --- a/src/gallium/frontends/dri/loader_dri3_helper.c +++ b/src/gallium/frontends/dri/loader_dri3_helper.c @@ -1895,7 +1895,7 @@ loader_dri3_get_pixmap_buffer(xcb_connection_t *conn, xcb_drawable_t pixmap, str * wrap that with a __DRIimage structure using createImageFromDmaBufs */ static struct loader_dri3_buffer * -dri3_get_pixmap_buffer(__DRIdrawable *driDrawable, unsigned int fourcc, +dri3_get_pixmap_buffer(struct dri_drawable *driDrawable, unsigned int fourcc, enum loader_dri3_buffer_type buffer_type, struct loader_dri3_drawable *draw) { @@ -1972,7 +1972,7 @@ no_buffer: * Find a front or back buffer, allocating new ones as necessary */ static struct loader_dri3_buffer * -dri3_get_buffer(__DRIdrawable *driDrawable, +dri3_get_buffer(struct dri_drawable *driDrawable, unsigned int fourcc, enum loader_dri3_buffer_type buffer_type, struct loader_dri3_drawable *draw) @@ -2103,7 +2103,7 @@ dri3_get_buffer(__DRIdrawable *driDrawable, * when the application changes which buffers it needs */ static void -dri3_free_buffers(__DRIdrawable *driDrawable, +dri3_free_buffers(struct dri_drawable *driDrawable, enum loader_dri3_buffer_type buffer_type, struct loader_dri3_drawable *draw) { @@ -2137,7 +2137,7 @@ dri3_free_buffers(__DRIdrawable *driDrawable, * as needed. */ int -loader_dri3_get_buffers(__DRIdrawable *driDrawable, +loader_dri3_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h index 62d71856acf..21948e0029d 100644 --- a/src/gallium/frontends/dri/loader_dri3_helper.h +++ b/src/gallium/frontends/dri/loader_dri3_helper.h @@ -117,7 +117,7 @@ enum loader_dri3_drawable_type { struct loader_dri3_drawable { xcb_connection_t *conn; xcb_screen_t *screen; - __DRIdrawable *dri_drawable; + struct dri_drawable *dri_drawable; xcb_drawable_t drawable; xcb_window_t window; xcb_xfixes_region_t region; @@ -265,7 +265,7 @@ loader_dri3_create_image_from_buffers(xcb_connection_t *c, void *loaderPrivate); #endif PUBLIC int -loader_dri3_get_buffers(__DRIdrawable *driDrawable, +loader_dri3_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, diff --git a/src/gallium/include/mesa_interface.h b/src/gallium/include/mesa_interface.h index 32747f9549a..5300ffb24e1 100644 --- a/src/gallium/include/mesa_interface.h +++ b/src/gallium/include/mesa_interface.h @@ -34,6 +34,7 @@ struct dri_screen; struct dri_context; +struct dri_drawable; /** * \name DRI interface structures @@ -42,7 +43,6 @@ struct dri_context; * side library and the DRI (direct rendering infrastructure). */ /*@{*/ -typedef struct __DRIdrawableRec __DRIdrawable; typedef struct __DRIconfigRec __DRIconfig; typedef struct __DRIcoreExtensionRec __DRIcoreExtension; @@ -103,7 +103,7 @@ struct __DRItexBufferExtensionRec { /** * Method to override base texture image with the contents of a - * __DRIdrawable, including the required texture format attribute. + * struct dri_drawable, including the required texture format attribute. * * For GLX_EXT_texture_from_pixmap with AIGLX. Used by the X server since * 2011. @@ -113,7 +113,7 @@ struct __DRItexBufferExtensionRec { void (*setTexBuffer2)(struct dri_context *pDRICtx, int target, int format, - __DRIdrawable *pDraw); + struct dri_drawable *pDraw); }; /** @@ -276,7 +276,7 @@ struct __DRI2bufferDamageExtensionRec { * \param nrects number of rectangles provided * \param rects the array of rectangles, lower-left origin */ - void (*set_damage_region)(__DRIdrawable *drawable, unsigned int nrects, + void (*set_damage_region)(struct dri_drawable *drawable, unsigned int nrects, int *rects); }; @@ -309,21 +309,21 @@ struct __DRIswrastLoaderExtensionRec { /* * Drawable position and size */ - void (*getDrawableInfo)(__DRIdrawable *drawable, + void (*getDrawableInfo)(struct dri_drawable *drawable, int *x, int *y, int *width, int *height, void *loaderPrivate); /** * Put image to drawable */ - void (*putImage)(__DRIdrawable *drawable, int op, + void (*putImage)(struct dri_drawable *drawable, int op, int x, int y, int width, int height, char *data, void *loaderPrivate); /** * Get image from readable */ - void (*getImage)(__DRIdrawable *readable, + void (*getImage)(struct dri_drawable *readable, int x, int y, int width, int height, char *data, void *loaderPrivate); @@ -332,7 +332,7 @@ struct __DRIswrastLoaderExtensionRec { * * \since 2 */ - void (*putImage2)(__DRIdrawable *drawable, int op, + void (*putImage2)(struct dri_drawable *drawable, int op, int x, int y, int width, int height, int stride, char *data, void *loaderPrivate); @@ -341,7 +341,7 @@ struct __DRIswrastLoaderExtensionRec { * * \since 3 */ - void (*getImage2)(__DRIdrawable *readable, + void (*getImage2)(struct dri_drawable *readable, int x, int y, int width, int height, int stride, char *data, void *loaderPrivate); @@ -350,7 +350,7 @@ struct __DRIswrastLoaderExtensionRec { * * \since 4 */ - void (*putImageShm)(__DRIdrawable *drawable, int op, + void (*putImageShm)(struct dri_drawable *drawable, int op, int x, int y, int width, int height, int stride, int shmid, char *shmaddr, unsigned offset, void *loaderPrivate); @@ -359,7 +359,7 @@ struct __DRIswrastLoaderExtensionRec { * * \since 4 */ - void (*getImageShm)(__DRIdrawable *readable, + void (*getImageShm)(struct dri_drawable *readable, int x, int y, int width, int height, int shmid, void *loaderPrivate); @@ -374,7 +374,7 @@ struct __DRIswrastLoaderExtensionRec { * * \since 5 */ - void (*putImageShm2)(__DRIdrawable *drawable, int op, + void (*putImageShm2)(struct dri_drawable *drawable, int op, int x, int y, int width, int height, int stride, int shmid, char *shmaddr, unsigned offset, @@ -389,7 +389,7 @@ struct __DRIswrastLoaderExtensionRec { * * \since 6 */ - unsigned char (*getImageShm2)(__DRIdrawable *readable, + unsigned char (*getImageShm2)(struct dri_drawable *readable, int x, int y, int width, int height, int shmid, void *loaderPrivate); }; @@ -536,17 +536,17 @@ struct __DRIcoreExtensionRec { unsigned int *attrib, unsigned int *value); /* Not used by the X server. */ - __DRIdrawable *(*createNewDrawable)(struct dri_screen *screen, + struct dri_drawable *(*createNewDrawable)(struct dri_screen *screen, const __DRIconfig *config, unsigned int drawable_id, unsigned int head, void *loaderPrivate); /* Used by the X server */ - void (*destroyDrawable)(__DRIdrawable *drawable); + void (*destroyDrawable)(struct dri_drawable *drawable); /* Used by the X server in swrast mode. */ - void (*swapBuffers)(__DRIdrawable *drawable); + void (*swapBuffers)(struct dri_drawable *drawable); /* Used by the X server in swrast mode. */ struct dri_context *(*createNewContext)(struct dri_screen *screen, @@ -564,13 +564,13 @@ struct __DRIcoreExtensionRec { /* Used by the X server. */ int (*bindContext)(struct dri_context *ctx, - __DRIdrawable *pdraw, - __DRIdrawable *pread); + struct dri_drawable *pdraw, + struct dri_drawable *pread); /* Used by the X server. */ int (*unbindContext)(struct dri_context *ctx); - void (*swapBuffersWithDamage)(__DRIdrawable *drawable, int nrects, const int *rects); + void (*swapBuffersWithDamage)(struct dri_drawable *drawable, int nrects, const int *rects); }; /** Common DRI function definitions, shared among DRI2 and Image extensions @@ -590,7 +590,7 @@ typedef struct dri_screen * bool implicit, void *loaderPrivate); -typedef __DRIdrawable * +typedef struct dri_drawable * (*__DRIcreateNewDrawableFunc)(struct dri_screen *screen, const __DRIconfig *config, void *loaderPrivate); @@ -647,7 +647,7 @@ enum dri_loader_cap { struct __DRIdri2LoaderExtensionRec { __DRIextension base; - __DRIbuffer *(*getBuffers)(__DRIdrawable *driDrawable, + __DRIbuffer *(*getBuffers)(struct dri_drawable *driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate); @@ -664,7 +664,7 @@ struct __DRIdri2LoaderExtensionRec { * * \since 2 */ - void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate); + void (*flushFrontBuffer)(struct dri_drawable *driDrawable, void *loaderPrivate); /** @@ -687,7 +687,7 @@ struct __DRIdri2LoaderExtensionRec { * * \since 3 */ - __DRIbuffer *(*getBuffersWithFormat)(__DRIdrawable *driDrawable, + __DRIbuffer *(*getBuffersWithFormat)(struct dri_drawable *driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate); @@ -1358,7 +1358,7 @@ enum __DRIimageBufferMask { * EGL_SINGLE_BUFFER. * * If buffer_mask contains __DRI_IMAGE_BUFFER_SHARED, then must contains no - * other bits. As a corollary, a __DRIdrawable that has a "shared" buffer + * other bits. As a corollary, a struct dri_drawable that has a "shared" buffer * has no front nor back buffer. * * The loader returns __DRI_IMAGE_BUFFER_SHARED in buffer_mask if and only @@ -1378,7 +1378,7 @@ enum __DRIimageBufferMask { * buffer should appear promptly on the screen. It is different from * a front buffer in that its behavior is independent from the * GL_DRAW_BUFFER state. Specifically, if GL_DRAW_FRAMEBUFFER is 0 and the - * __DRIdrawable's buffer_mask is __DRI_IMAGE_BUFFER_SHARED, then all + * struct dri_drawable's buffer_mask is __DRI_IMAGE_BUFFER_SHARED, then all * rendering should appear promptly on the screen if GL_DRAW_BUFFER is not * GL_NONE. * @@ -1419,7 +1419,7 @@ struct __DRIimageLoaderExtensionRec { * __DRIimageBufferMask. * \param buffers Returned buffers */ - int (*getBuffers)(__DRIdrawable *driDrawable, + int (*getBuffers)(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, @@ -1435,7 +1435,7 @@ struct __DRIimageLoaderExtensionRec { * \param driDrawable Drawable whose front-buffer is to be flushed * \param loaderPrivate Loader's private data */ - void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate); + void (*flushFrontBuffer)(struct dri_drawable *driDrawable, void *loaderPrivate); /** * Return a loader capability value. If the loader doesn't know the enum, @@ -1456,7 +1456,7 @@ struct __DRIimageLoaderExtensionRec { * * \since 3 */ - void (*flushSwapBuffers)(__DRIdrawable *driDrawable, void *loaderPrivate); + void (*flushSwapBuffers)(struct dri_drawable *driDrawable, void *loaderPrivate); /** * Clean up any loader state associated with an image. @@ -1554,7 +1554,7 @@ struct __DRImutableRenderBufferLoaderExtensionRec { /** * Inform the display engine (that is, SurfaceFlinger and/or hwcomposer) - * that the __DRIdrawable has new content. + * that the struct dri_drawable has new content. * * The display engine may ignore this call, for example, if it continually * refreshes and displays the buffer on every frame, as in @@ -1569,7 +1569,7 @@ struct __DRImutableRenderBufferLoaderExtensionRec { * __DRIimageLoaderExtension::getBuffers(), must be * __DRI_IMAGE_BUFFER_SHARED. */ - void (*displaySharedBuffer)(__DRIdrawable *drawable, int fence_fd, + void (*displaySharedBuffer)(struct dri_drawable *drawable, int fence_fd, void *loaderPrivate); }; diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 4b274fe6ec3..74cd789b951 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -85,7 +85,7 @@ dri_lookup_egl_image_validated(void *image, void *data) } static void -dri_flush_front_buffer(__DRIdrawable * driDrawable, void *data) +dri_flush_front_buffer(struct dri_drawable * driDrawable, void *data) { struct gbm_dri_surface *surf = data; struct gbm_dri_device *dri = gbm_dri_device(surf->base.gbm); @@ -109,7 +109,7 @@ dri_get_capability(void *loaderPrivate, enum dri_loader_cap cap) } static int -image_get_buffers(__DRIdrawable *driDrawable, +image_get_buffers(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, @@ -127,7 +127,7 @@ image_get_buffers(__DRIdrawable *driDrawable, } static void -swrast_get_drawable_info(__DRIdrawable *driDrawable, +swrast_get_drawable_info(struct dri_drawable *driDrawable, int *x, int *y, int *width, @@ -143,7 +143,7 @@ swrast_get_drawable_info(__DRIdrawable *driDrawable, } static void -swrast_put_image2(__DRIdrawable *driDrawable, +swrast_put_image2(struct dri_drawable *driDrawable, int op, int x, int y, @@ -163,7 +163,7 @@ swrast_put_image2(__DRIdrawable *driDrawable, } static void -swrast_put_image(__DRIdrawable *driDrawable, +swrast_put_image(struct dri_drawable *driDrawable, int op, int x, int y, @@ -177,7 +177,7 @@ swrast_put_image(__DRIdrawable *driDrawable, } static void -swrast_get_image(__DRIdrawable *driDrawable, +swrast_get_image(struct dri_drawable *driDrawable, int x, int y, int width, diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h index 8be93aa7e49..46d1fc0a0c3 100644 --- a/src/gbm/backends/dri/gbm_driint.h +++ b/src/gbm/backends/dri/gbm_driint.h @@ -67,14 +67,14 @@ struct gbm_dri_device { __DRIimage *(*lookup_image_validated)(void *image, void *data); void *lookup_user_data; - void (*flush_front_buffer)(__DRIdrawable * driDrawable, void *data); - int (*image_get_buffers)(__DRIdrawable *driDrawable, + void (*flush_front_buffer)(struct dri_drawable * driDrawable, void *data); + int (*image_get_buffers)(struct dri_drawable *driDrawable, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *buffers); - void (*swrast_put_image2)(__DRIdrawable *driDrawable, + void (*swrast_put_image2)(struct dri_drawable *driDrawable, int op, int x, int y, @@ -83,7 +83,7 @@ struct gbm_dri_device { int stride, char *data, void *loaderPrivate); - void (*swrast_get_image)(__DRIdrawable *driDrawable, + void (*swrast_get_image)(struct dri_drawable *driDrawable, int x, int y, int width, diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 895454f8c25..35a726074bf 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -391,7 +391,7 @@ dri2_wait_gl(struct glx_context *gc) * contents of its fake front buffer. */ static void -dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate) +dri2FlushFrontBuffer(struct dri_drawable *driDrawable, void *loaderPrivate) { struct glx_display *priv; struct glx_context *gc; @@ -540,7 +540,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, } static __DRIbuffer * -dri2GetBuffers(__DRIdrawable * driDrawable, +dri2GetBuffers(struct dri_drawable * driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate) @@ -563,7 +563,7 @@ dri2GetBuffers(__DRIdrawable * driDrawable, } static __DRIbuffer * -dri2GetBuffersWithFormat(__DRIdrawable * driDrawable, +dri2GetBuffersWithFormat(struct dri_drawable * driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate) diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index ad1df2dab7c..69732897fa9 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -294,7 +294,7 @@ dri3_wait_gl(struct glx_context *gc) * contents of its fake front buffer. */ static void -dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) +dri3_flush_front_buffer(struct dri_drawable *driDrawable, void *loaderPrivate) { struct loader_dri3_drawable *draw = loaderPrivate; struct dri3_drawable *pdraw = loader_drawable_to_dri3_drawable(draw); @@ -325,7 +325,7 @@ dri3_flush_front_buffer(__DRIdrawable *driDrawable, void *loaderPrivate) * loader_dri_drawable. */ static void -dri3_flush_swap_buffers(__DRIdrawable *driDrawable, void *loaderPrivate) +dri3_flush_swap_buffers(struct dri_drawable *driDrawable, void *loaderPrivate) { struct loader_dri3_drawable *draw = loaderPrivate; struct dri3_drawable *pdraw = loader_drawable_to_dri3_drawable(draw); diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index d2838da7af6..092162fac53 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -770,7 +770,7 @@ Bool dri_bind_context(struct glx_context *context, GLXDrawable draw, GLXDrawable read) { __GLXDRIdrawable *pdraw, *pread; - __DRIdrawable *dri_draw = NULL, *dri_read = NULL; + struct dri_drawable *dri_draw = NULL, *dri_read = NULL; pdraw = driFetchDrawable(context, draw); pread = driFetchDrawable(context, read); diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index d4fd21f6c32..26f7569a5c7 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -142,7 +142,7 @@ XDestroyDrawable(struct drisw_drawable * pdp, Display * dpy, XID drawable) */ static void -swrastGetDrawableInfo(__DRIdrawable * draw, +swrastGetDrawableInfo(struct dri_drawable * draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { @@ -184,7 +184,7 @@ bytes_per_line(unsigned pitch_bits, unsigned mul) } static void -swrastXPutImage(__DRIdrawable * draw, int op, +swrastXPutImage(struct dri_drawable * draw, int op, int srcx, int srcy, int x, int y, int w, int h, int stride, int shmid, char *data, void *loaderPrivate) @@ -219,7 +219,7 @@ swrastXPutImage(__DRIdrawable * draw, int op, } static void -swrastPutImageShm(__DRIdrawable * draw, int op, +swrastPutImageShm(struct dri_drawable * draw, int op, int x, int y, int w, int h, int stride, int shmid, char *shmaddr, unsigned offset, void *loaderPrivate) @@ -235,7 +235,7 @@ swrastPutImageShm(__DRIdrawable * draw, int op, } static void -swrastPutImageShm2(__DRIdrawable * draw, int op, +swrastPutImageShm2(struct dri_drawable * draw, int op, int x, int y, int w, int h, int stride, int shmid, char *shmaddr, unsigned offset, @@ -252,7 +252,7 @@ swrastPutImageShm2(__DRIdrawable * draw, int op, } static void -swrastPutImage2(__DRIdrawable * draw, int op, +swrastPutImage2(struct dri_drawable * draw, int op, int x, int y, int w, int h, int stride, char *data, void *loaderPrivate) { @@ -264,7 +264,7 @@ swrastPutImage2(__DRIdrawable * draw, int op, } static void -swrastPutImage(__DRIdrawable * draw, int op, +swrastPutImage(struct dri_drawable * draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { @@ -276,7 +276,7 @@ swrastPutImage(__DRIdrawable * draw, int op, } static void -swrastGetImage2(__DRIdrawable * read, +swrastGetImage2(struct dri_drawable * read, int x, int y, int w, int h, int stride, char *data, void *loaderPrivate) { @@ -305,7 +305,7 @@ swrastGetImage2(__DRIdrawable * read, } static void -swrastGetImage(__DRIdrawable * read, +swrastGetImage(struct dri_drawable * read, int x, int y, int w, int h, char *data, void *loaderPrivate) { @@ -313,7 +313,7 @@ swrastGetImage(__DRIdrawable * read, } static GLboolean -swrastGetImageShm2(__DRIdrawable * read, +swrastGetImageShm2(struct dri_drawable * read, int x, int y, int w, int h, int shmid, void *loaderPrivate) { @@ -343,7 +343,7 @@ swrastGetImageShm2(__DRIdrawable * read, } static void -swrastGetImageShm(__DRIdrawable * read, +swrastGetImageShm(struct dri_drawable * read, int x, int y, int w, int h, int shmid, void *loaderPrivate) { diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index dcf66da8068..9bf99be204f 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -1003,7 +1003,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) do { - /* FIXME: Maybe delay __DRIdrawable creation until the drawable + /* FIXME: Maybe delay struct dri_drawable creation until the drawable * is actually bound to a context... */ struct glx_screen *psc = GetGLXScreenConfigs(dpy, vis->screen); diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index 90caade8bd0..c0e188d09d9 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -129,7 +129,7 @@ struct __GLXDRIdrawableRec unsigned long eventMask; int refcount; - __DRIdrawable *dri_drawable; + struct dri_drawable *dri_drawable; }; /* diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index fd69f7f2fa4..57674108cc8 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -37,12 +37,12 @@ #if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE)) /** - * Get the __DRIdrawable for the drawable associated with a GLXContext + * Get the struct dri_drawable for the drawable associated with a GLXContext * * \param dpy The display associated with \c drawable. - * \param drawable GLXDrawable whose __DRIdrawable part is to be retrieved. + * \param drawable GLXDrawable whose struct dri_drawable part is to be retrieved. * \param scrn_num If non-NULL, the drawables screen is stored there - * \returns A pointer to the context's __DRIdrawable on success, or NULL if + * \returns A pointer to the context's struct dri_drawable on success, or NULL if * the drawable is not associated with a direct-rendering context. */ _X_HIDDEN __GLXDRIdrawable *