summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c9
-rw-r--r--src/gallium/state_trackers/egl/common/egl_g3d_api.c13
2 files changed, 18 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 8d82c19d72f..f86ed0bd5fc 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1414,9 +1414,16 @@ dri2_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *disp,
return EGL_FALSE;
format = buffer->driver_format;
- if (attribute == EGL_TEXTURE_FORMAT) {
+ switch (attribute) {
+ case EGL_TEXTURE_FORMAT:
*value = format->components;
return EGL_TRUE;
+ case EGL_WIDTH:
+ *value = buffer->buffer.width;
+ break;
+ case EGL_HEIGHT:
+ *value = buffer->buffer.height;
+ break;
}
return EGL_FALSE;
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
index b3941f2467b..a73859c0b9d 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -888,7 +888,8 @@ egl_g3d_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *dpy,
if (!wayland_buffer_is_drm(&buffer->buffer))
return EGL_FALSE;
- if (attribute == EGL_TEXTURE_FORMAT) {
+ switch (attribute) {
+ case EGL_TEXTURE_FORMAT:
switch (resource->format) {
case PIPE_FORMAT_B8G8R8A8_UNORM:
*value = EGL_TEXTURE_RGBA;
@@ -899,9 +900,15 @@ egl_g3d_query_wayland_buffer_wl(_EGLDriver *drv, _EGLDisplay *dpy,
default:
return EGL_FALSE;
}
+ case EGL_WIDTH:
+ *value = buffer->buffer.width;
+ return EGL_TRUE;
+ case EGL_HEIGHT:
+ *value = buffer->buffer.height;
+ return EGL_TRUE;
+ default:
+ return EGL_FALSE;
}
-
- return EGL_FALSE;
}
#endif /* EGL_WL_bind_wayland_display */