Merge branch 'mesa_7_7_branch'
[mesa.git] / src / gallium / state_trackers / egl / egl_surface.c
index a4493e26379ef9336a4d891ea4421a9b86da0304..d55aa51b82d98b5d776e698d0376e9862bc49fcc 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "state_tracker/drm_api.h"
 
+#include "util/u_format.h"
 #include "util/u_rect.h"
 
 /*
@@ -114,11 +115,10 @@ drm_create_texture(_EGLDisplay *dpy,
        templat.tex_usage |= PIPE_TEXTURE_USAGE_PRIMARY;
        templat.target = PIPE_TEXTURE_2D;
        templat.last_level = 0;
-       templat.depth[0] = 1;
+       templat.depth0 = 1;
        templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
-       templat.width[0] = w;
-       templat.height[0] = h;
-       pf_get_block(templat.format, &templat.block);
+       templat.width0 = w;
+       templat.height0 = h;
 
        texture = screen->texture_create(dev->screen,
                                         &templat);
@@ -171,9 +171,9 @@ drm_takedown_shown_screen(_EGLDisplay *dpy, struct drm_screen *screen)
        drmModeSetCrtc(
                dev->drmFD,
                screen->crtcID,
-               0, // FD
+               0, /* FD */
                0, 0,
-               NULL, 0, // List of output ids
+               NULL, 0, /* List of output ids */
                NULL);
 
        drmModeRmFB(dev->drmFD, screen->fbID);
@@ -186,6 +186,9 @@ drm_takedown_shown_screen(_EGLDisplay *dpy, struct drm_screen *screen)
        screen->shown = 0;
 }
 
+/**
+ * Called by libEGL's eglCreateWindowSurface().
+ */
 _EGLSurface *
 drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, NativeWindowType window, const EGLint *attrib_list)
 {
@@ -193,6 +196,9 @@ drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, N
 }
 
 
+/**
+ * Called by libEGL's eglCreatePixmapSurface().
+ */
 _EGLSurface *
 drm_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, NativePixmapType pixmap, const EGLint *attrib_list)
 {
@@ -200,6 +206,9 @@ drm_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, N
 }
 
 
+/**
+ * Called by libEGL's eglCreatePbufferSurface().
+ */
 _EGLSurface *
 drm_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
                            const EGLint *attrib_list)
@@ -254,6 +263,9 @@ err:
        return NULL;
 }
 
+/**
+ * Called by libEGL's eglCreateScreenSurfaceMESA().
+ */
 _EGLSurface *
 drm_create_screen_surface_mesa(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *cfg,
                                const EGLint *attrib_list)
@@ -263,6 +275,9 @@ drm_create_screen_surface_mesa(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *cf
        return surf;
 }
 
+/**
+ * Called by libEGL's eglShowScreenSurfaceMESA().
+ */
 EGLBoolean
 drm_show_screen_surface_mesa(_EGLDriver *drv, _EGLDisplay *dpy,
                              _EGLScreen *screen,
@@ -359,6 +374,9 @@ err_tex:
        return EGL_FALSE;
 }
 
+/**
+ * Called by libEGL's eglDestroySurface().
+ */
 EGLBoolean
 drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface)
 {
@@ -372,6 +390,9 @@ drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface)
        return EGL_TRUE;
 }
 
+/**
+ * Called by libEGL's eglSwapBuffers().
+ */
 EGLBoolean
 drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw)
 {