wayland: Support EGL_WIDTH and EGL_HEIGHT queries for wl_buffer
[mesa.git] / src / gallium / state_trackers / egl / common / native_helper.c
index 6f2097c61a6c7de64bf6740bf197b1e349af88a2..ebe5144b36799819fab79c5b712f05c37c38ee76 100644 (file)
@@ -282,9 +282,9 @@ resource_surface_copy_swap(struct resource_surface *rsurf,
                              btex, 0, &src_box);
    ret = TRUE;
 
- out_no_ftex:
-   pipe_resource_reference(&btex, NULL);
  out_no_btex:
+   pipe_resource_reference(&btex, NULL);
+ out_no_ftex:
    pipe_resource_reference(&ftex, NULL);
 
    return ret;
@@ -393,12 +393,16 @@ native_display_copy_to_pixmap(struct native_display *ndpy,
    dst = tmp[natt];
 
    if (dst && dst->format == src->format) {
+      struct native_present_control ctrl;
       struct pipe_box src_box;
 
       u_box_origin_2d(src->width0, src->height0, &src_box);
       pipe->resource_copy_region(pipe, dst, 0, 0, 0, 0, src, 0, &src_box);
       pipe->flush(pipe, NULL);
-      nsurf->present(nsurf, natt, FALSE, 0);
+
+      memset(&ctrl, 0, sizeof(ctrl));
+      ctrl.natt = natt;
+      nsurf->present(nsurf, &ctrl);
    }
 
    if (dst)