Merge branch 'mesa_7_7_branch'
[mesa.git] / src / gallium / state_trackers / xorg / xorg_dri2.c
index 468563e34c55b8903d09a8cdd2814cb7db05255d..e6a89c764510ef029a0a6f6c5ac4da229f74d017 100644 (file)
@@ -40,6 +40,8 @@
 #include "pipe/p_state.h"
 #include "pipe/p_inlines.h"
 
+#include "util/u_format.h"
+#include "util/u_rect.h"
 
 /* Make all the #if cases in the code esier to read */
 #ifndef DRI2INFOREC_VERSION
@@ -94,7 +96,7 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
     case 9:
 #endif
        if (exa_priv->depth_stencil_tex &&
-           !pf_is_depth_stencil(exa_priv->depth_stencil_tex->format))
+           !util_format_is_depth_or_stencil(exa_priv->depth_stencil_tex->format))
            exa_priv->depth_stencil_tex = NULL;
         /* Fall through */
     case DRI2BufferDepth:
@@ -110,10 +112,9 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
            else
                template.format = ms->ds_depth_bits_last ?
                    PIPE_FORMAT_S8Z24_UNORM : PIPE_FORMAT_Z24S8_UNORM;
-           pf_get_block(template.format, &template.block);
-           template.width[0] = pDraw->width;
-           template.height[0] = pDraw->height;
-           template.depth[0] = 1;
+           template.width0 = pDraw->width;
+           template.height0 = pDraw->height;
+           template.depth0 = 1;
            template.last_level = 0;
            template.tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL |
                PIPE_TEXTURE_USAGE_DISPLAY_TARGET;