egl: inline fallback for create_pbuffer_surface
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5861>
This commit is contained in:
committed by
Marge Bot
parent
179e442f7a
commit
43e2d80849
@@ -1906,6 +1906,8 @@ dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf, const EGLint *attrib_list)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
if (!dri2_dpy->vtbl->create_pbuffer_surface)
|
||||
return NULL;
|
||||
return dri2_dpy->vtbl->create_pbuffer_surface(drv, disp, conf, attrib_list);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ struct dri2_egl_display_vtbl {
|
||||
void *native_pixmap,
|
||||
const EGLint *attrib_list);
|
||||
|
||||
/* optional */
|
||||
_EGLSurface* (*create_pbuffer_surface)(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *config,
|
||||
const EGLint *attrib_list);
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
|
||||
struct wl_buffer;
|
||||
|
||||
static inline _EGLSurface *
|
||||
dri2_fallback_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLConfig *conf,
|
||||
const EGLint *attrib_list)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline _EGLImage*
|
||||
dri2_fallback_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
|
||||
_EGLContext *ctx, EGLenum target,
|
||||
|
||||
@@ -675,7 +675,6 @@ static const struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
|
||||
.authenticate = dri2_drm_authenticate,
|
||||
.create_window_surface = dri2_drm_create_window_surface,
|
||||
.create_pixmap_surface = dri2_drm_create_pixmap_surface,
|
||||
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
|
||||
.destroy_surface = dri2_drm_destroy_surface,
|
||||
.create_image = dri2_drm_create_image_khr,
|
||||
.swap_buffers = dri2_drm_swap_buffers,
|
||||
|
||||
@@ -1383,7 +1383,6 @@ static const struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
|
||||
.authenticate = dri2_wl_authenticate,
|
||||
.create_window_surface = dri2_wl_create_window_surface,
|
||||
.create_pixmap_surface = dri2_wl_create_pixmap_surface,
|
||||
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
|
||||
.destroy_surface = dri2_wl_destroy_surface,
|
||||
.create_image = dri2_create_image_khr,
|
||||
.swap_buffers = dri2_wl_swap_buffers,
|
||||
@@ -2003,7 +2002,6 @@ static const struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
|
||||
.authenticate = NULL,
|
||||
.create_window_surface = dri2_wl_create_window_surface,
|
||||
.create_pixmap_surface = dri2_wl_create_pixmap_surface,
|
||||
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
|
||||
.destroy_surface = dri2_wl_destroy_surface,
|
||||
.create_image = dri2_create_image_khr,
|
||||
.swap_buffers = dri2_wl_swrast_swap_buffers,
|
||||
|
||||
Reference in New Issue
Block a user