[mesa3d] Sync all patch files with DDK 1.17.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From 8ea569933388752a39e859989b69ab2f09f68309 Mon Sep 17 00:00:00 2001
|
||||
From 4d19dc5cc9be4f3f25ed8befbfcda70c047065d3 Mon Sep 17 00:00:00 2001
|
||||
From: Brendan King <Brendan.King@imgtec.com>
|
||||
Date: Fri, 21 Aug 2020 12:13:28 +0100
|
||||
Subject: [PATCH 49/50] gbm: add pbuffer support
|
||||
Subject: [PATCH 48/67] gbm: add pbuffer support
|
||||
|
||||
The EGL backend GLX provider for XWayland may get the EGL configs it
|
||||
uses to generate the GLX ones from GBM. That platform doesn't support
|
||||
@@ -18,10 +18,10 @@ isn't supported.
|
||||
2 files changed, 103 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
|
||||
index 9d60d21e8fd..2292f29772d 100644
|
||||
index 13b808bff80..141df1b1732 100644
|
||||
--- a/src/egl/drivers/dri2/egl_dri2.h
|
||||
+++ b/src/egl/drivers/dri2/egl_dri2.h
|
||||
@@ -462,6 +462,9 @@ struct dri2_egl_surface
|
||||
@@ -471,6 +471,9 @@ struct dri2_egl_surface
|
||||
/* surfaceless and device */
|
||||
__DRIimage *front;
|
||||
unsigned int visual;
|
||||
@@ -32,7 +32,7 @@ index 9d60d21e8fd..2292f29772d 100644
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
void *swrast_front;
|
||||
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
|
||||
index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
index 2b329437f88..258e8b6593e 100644
|
||||
--- a/src/egl/drivers/dri2/platform_drm.c
|
||||
+++ b/src/egl/drivers/dri2/platform_drm.c
|
||||
@@ -41,6 +41,38 @@
|
||||
@@ -46,13 +46,13 @@ index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
+ struct dri2_egl_display *dri2_dpy =
|
||||
+ dri2_egl_display(dri2_surf->base.Resource.Display);
|
||||
+
|
||||
+ struct gbm_surface *surf = &dri2_surf->gbm_surf->base;
|
||||
+ struct gbm_dri_surface *surf = dri2_surf->gbm_surf;
|
||||
+
|
||||
+ dri2_surf->front_bo = gbm_bo_create(&dri2_dpy->gbm_dri->base,
|
||||
+ surf->width,
|
||||
+ surf->height,
|
||||
+ surf->format,
|
||||
+ surf->flags);
|
||||
+ surf->base.v0.width,
|
||||
+ surf->base.v0.height,
|
||||
+ surf->base.v0.format,
|
||||
+ surf->base.v0.flags);
|
||||
+ if (!dri2_surf->front_bo) {
|
||||
+ _eglError(EGL_BAD_ALLOC, "failed to allocate front buffer");
|
||||
+ return false;
|
||||
@@ -163,7 +163,7 @@ index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
dri2_fini_surface(surf);
|
||||
free(surf);
|
||||
|
||||
@@ -400,12 +470,27 @@ dri2_drm_image_get_buffers(__DRIdrawable *driDrawable,
|
||||
@@ -402,12 +472,27 @@ dri2_drm_image_get_buffers(__DRIdrawable *driDrawable,
|
||||
struct dri2_egl_surface *dri2_surf = loaderPrivate;
|
||||
struct gbm_dri_bo *bo;
|
||||
|
||||
@@ -196,7 +196,7 @@ index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -423,6 +508,9 @@ dri2_drm_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
|
||||
@@ -425,6 +510,9 @@ dri2_drm_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
|
||||
@@ -206,7 +206,7 @@ index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
if (!dri2_dpy->flush) {
|
||||
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
|
||||
return EGL_TRUE;
|
||||
@@ -646,7 +734,8 @@ drm_add_configs_for_visuals(_EGLDisplay *disp)
|
||||
@@ -648,7 +736,8 @@ drm_add_configs_for_visuals(_EGLDisplay *disp)
|
||||
};
|
||||
|
||||
dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i],
|
||||
@@ -216,7 +216,7 @@ index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
if (dri2_conf) {
|
||||
if (dri2_conf->base.ConfigID == config_count + 1)
|
||||
config_count++;
|
||||
@@ -670,6 +759,7 @@ static const struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
|
||||
@@ -672,6 +761,7 @@ 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,
|
||||
@@ -225,5 +225,5 @@ index 2944a5d7ad4..7fb8d2376d8 100644
|
||||
.create_image = dri2_drm_create_image_khr,
|
||||
.swap_buffers = dri2_drm_swap_buffers,
|
||||
--
|
||||
2.17.1
|
||||
2.25.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user