Update to EGL_MESA_drm_image from mesa master
Woo, running on stock mesa now.
This commit is contained in:
parent
d6a4787ed7
commit
b12fcceeb7
5
TODO
5
TODO
@ -3,6 +3,11 @@ Core wayland protocol
|
||||
- generate pointer_focus (and drag focus) on raise/lower, move
|
||||
windows, all kinds of changes in surface stacking.
|
||||
|
||||
- make a client side circular buffer of pending ping requests with
|
||||
callbacks and data. if buffer fills up, just iterate until an
|
||||
entry becomes available. wl_display_ping(dpy, func, data), basically.
|
||||
func is called when the reply comes in for the ping request.
|
||||
|
||||
- glyph cache
|
||||
|
||||
- dnd, figure out large object transfer: through wayland protocol or
|
||||
|
@ -249,9 +249,9 @@ resize_window(struct gears *gears)
|
||||
EGLint attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
|
||||
EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SHARE_MESA |
|
||||
EGL_IMAGE_USE_SCANOUT_MESA,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SHARE_MESA |
|
||||
EGL_DRM_BUFFER_USE_SCANOUT_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
@ -246,8 +246,8 @@ display_create_surface(struct display *display,
|
||||
EGLint image_attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
|
||||
EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
@ -377,8 +377,8 @@ create_output_for_connector(struct drm_compositor *ec,
|
||||
EGLint handle, stride, attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
|
||||
EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
@ -334,8 +334,8 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
|
||||
EGLint attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_IMAGE_STRIDE_MESA, 0,
|
||||
EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
|
||||
EGL_DRM_BUFFER_STRIDE_MESA, 0,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
@ -413,7 +413,7 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height)
|
||||
attribs[5] = buffers[0].pitch / 4;
|
||||
output->image =
|
||||
eglCreateImageKHR(c->base.display, c->base.context,
|
||||
EGL_DRM_IMAGE_MESA,
|
||||
EGL_DRM_BUFFER_MESA,
|
||||
(EGLClientBuffer) buffers[0].name,
|
||||
attribs);
|
||||
free(reply);
|
||||
|
13
compositor.c
13
compositor.c
@ -224,8 +224,8 @@ create_pointer_images(struct wlsc_compositor *ec)
|
||||
EGLint image_attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
|
||||
EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
@ -1041,7 +1041,11 @@ wl_drag_reset(struct wl_drag *drag)
|
||||
wl_array_init(&drag->types);
|
||||
|
||||
drag->source = NULL;
|
||||
drag->target = NULL;
|
||||
|
||||
/* FIXME: We need to reset drag->target too, but can't right
|
||||
* now because we need it for send/drop.
|
||||
*
|
||||
* drag->target = NULL; */
|
||||
drag->time = 0;
|
||||
drag->pointer_focus = NULL;
|
||||
}
|
||||
@ -1134,7 +1138,8 @@ static void
|
||||
drag_send(struct wl_client *client,
|
||||
struct wl_drag *drag, struct wl_array *contents)
|
||||
{
|
||||
wl_client_post_event(client, &drag->base, WL_DRAG_DROP, contents);
|
||||
wl_client_post_event(drag->target,
|
||||
&drag->base, WL_DRAG_DROP, contents);
|
||||
}
|
||||
|
||||
static void
|
||||
|
6
drm.c
6
drm.c
@ -74,8 +74,8 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base,
|
||||
EGLint attribs[] = {
|
||||
EGL_WIDTH, 0,
|
||||
EGL_HEIGHT, 0,
|
||||
EGL_IMAGE_STRIDE_MESA, 0,
|
||||
EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA,
|
||||
EGL_DRM_BUFFER_STRIDE_MESA, 0,
|
||||
EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
@ -108,7 +108,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base,
|
||||
buffer->visual = visual;
|
||||
buffer->image = eglCreateImageKHR(compositor->display,
|
||||
compositor->context,
|
||||
EGL_DRM_IMAGE_MESA,
|
||||
EGL_DRM_BUFFER_MESA,
|
||||
(EGLClientBuffer) name, attribs);
|
||||
if (buffer->image == NULL) {
|
||||
/* FIXME: Define a real exception event instead of
|
||||
|
Loading…
Reference in New Issue
Block a user