gallium: adapt all code to the renamed depth/stencil formats
authorRoland Scheidegger <sroland@vmware.com>
Mon, 29 Mar 2010 23:35:49 +0000 (01:35 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 29 Mar 2010 23:35:49 +0000 (01:35 +0200)
46 files changed:
src/gallium/auxiliary/gallivm/lp_bld_depth.c
src/gallium/auxiliary/util/u_pack_color.h
src/gallium/auxiliary/util/u_tile.c
src/gallium/drivers/cell/ppu/cell_gen_fragment.c
src/gallium/drivers/cell/ppu/cell_screen.c
src/gallium/drivers/cell/spu/spu_command.c
src/gallium/drivers/cell/spu/spu_per_fragment_op.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/i915/i915_state_emit.c
src/gallium/drivers/i915/i915_state_sampler.c
src/gallium/drivers/i965/brw_misc_state.c
src/gallium/drivers/i965/brw_pipe_clear.c
src/gallium/drivers/i965/brw_screen.c
src/gallium/drivers/i965/brw_screen_texture.c
src/gallium/drivers/nv50/nv50_miptree.c
src/gallium/drivers/nv50/nv50_screen.c
src/gallium/drivers/nv50/nv50_state_validate.c
src/gallium/drivers/nv50/nv50_surface.c
src/gallium/drivers/nv50/nv50_tex.c
src/gallium/drivers/nvfx/nv04_surface_2d.c
src/gallium/drivers/nvfx/nv30_fragtex.c
src/gallium/drivers/nvfx/nv40_fragtex.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/nvfx/nvfx_state_fb.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/softpipe/sp_quad_depth_test.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/drivers/svga/svga_pipe_clear.c
src/gallium/drivers/svga/svga_pipe_misc.c
src/gallium/drivers/svga/svga_screen.c
src/gallium/drivers/svga/svga_screen_texture.c
src/gallium/drivers/svga/svga_state_framebuffer.c
src/gallium/state_trackers/dri/common/dri_screen.c
src/gallium/state_trackers/egl/kms/native_kms.c
src/gallium/state_trackers/egl/x11/native_dri2.c
src/gallium/state_trackers/egl/x11/native_ximage.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/vega/vg_tracker.c
src/gallium/state_trackers/wgl/stw_pixelformat.c
src/gallium/state_trackers/xorg/xorg_dri2.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_cb_readpixels.c
src/mesa/state_tracker/st_extensions.c
src/mesa/state_tracker/st_format.c

index 4ce1a27a061efb628471c923f79b5a07491093c4..c6d0e4bc04e1b42191ae6514d96c864c892fcb7b 100644 (file)
@@ -495,8 +495,8 @@ lp_build_depth_stencil_test(LLVMBuilderRef builder,
       assert(format_desc->block.height == 1);
 
       if (stencil[0].enabled) {
-         assert(format_desc->format == PIPE_FORMAT_Z24S8_UNORM ||
-                format_desc->format == PIPE_FORMAT_S8Z24_UNORM);
+         assert(format_desc->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
+                format_desc->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM);
       }
 
       assert(z_swizzle < 4);
index c5fd7a6783e256977b25c60d66c6b63d885a47a6..ad4a06dc77081e5ef3b7cc38e2e69542e634d0b8 100644 (file)
@@ -446,17 +446,17 @@ util_pack_z(enum pipe_format format, double z)
       return (uint) (z * 0xffffffff);
    case PIPE_FORMAT_Z32_FLOAT:
       return (uint)z;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_Z24X8_UNORM:
       if (z == 1.0)
          return 0xffffff;
       return (uint) (z * 0xffffff);
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
    case PIPE_FORMAT_X8Z24_UNORM:
       if (z == 1.0)
          return 0xffffff00;
       return ((uint) (z * 0xffffff)) << 8;
-   case PIPE_FORMAT_S8_UNORM:
+   case PIPE_FORMAT_S8_USCALED:
       /* this case can get it via util_pack_z_stencil() */
       return 0;
    default:
@@ -477,13 +477,13 @@ util_pack_z_stencil(enum pipe_format format, double z, uint s)
    unsigned packed = util_pack_z(format, z);
 
    switch (format) {
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       packed |= s << 24;
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       packed |= s;
       break;
-   case PIPE_FORMAT_S8_UNORM:
+   case PIPE_FORMAT_S8_USCALED:
       packed |= s;
       break;
    default:
index 09b2382733d2c20651ee48b883b71114d12e7a5c..e03ee9b8bd6462403b3881a3f6ff989d7f89227e 100644 (file)
@@ -1036,7 +1036,7 @@ z32_get_tile_rgba(const unsigned *src,
 }
 
 
-/*** PIPE_FORMAT_Z24S8_UNORM ***/
+/*** PIPE_FORMAT_Z24_UNORM_S8_USCALED ***/
 
 /**
  * Return Z component as four float in [0,1].  Stencil part ignored.
@@ -1063,7 +1063,7 @@ s8z24_get_tile_rgba(const unsigned *src,
 }
 
 
-/*** PIPE_FORMAT_S8Z24_UNORM ***/
+/*** PIPE_FORMAT_S8_USCALED_Z24_UNORM ***/
 
 /**
  * Return Z component as four float in [0,1].  Stencil part ignored.
@@ -1271,11 +1271,11 @@ pipe_tile_raw_to_rgba(enum pipe_format format,
    case PIPE_FORMAT_Z32_UNORM:
       z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
       break;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_Z24X8_UNORM:
       s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
    case PIPE_FORMAT_X8Z24_UNORM:
       z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
       break;
@@ -1468,11 +1468,11 @@ pipe_put_tile_rgba(struct pipe_context *pipe,
    case PIPE_FORMAT_Z32_UNORM:
       /*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
       break;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_Z24X8_UNORM:
       /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
    case PIPE_FORMAT_X8Z24_UNORM:
       /*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
       break;
@@ -1525,7 +1525,7 @@ pipe_get_tile_z(struct pipe_context *pipe,
          }
       }
       break;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_Z24X8_UNORM:
       {
          const uint *ptrc
@@ -1540,7 +1540,7 @@ pipe_get_tile_z(struct pipe_context *pipe,
          }
       }
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
    case PIPE_FORMAT_X8Z24_UNORM:
       {
          const uint *ptrc
@@ -1609,7 +1609,7 @@ pipe_put_tile_z(struct pipe_context *pipe,
          }
       }
       break;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       {
          uint *pDest = (uint *) (map + y * pt->stride + x*4);
          assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);
@@ -1636,7 +1636,7 @@ pipe_put_tile_z(struct pipe_context *pipe,
          }
       }
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       {
          uint *pDest = (uint *) (map + y * pt->stride + x*4);
          assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);
index c54576b3c32099b63c8af130086ca443a3c1fa87..628bc1c694b44f98576256f6a2533a0d10ccd049 100644 (file)
@@ -1859,7 +1859,7 @@ gen_depth_stencil(struct cell_context *cell,
    spe_comment(f, 0, "Fetch Z/stencil quad from tile");
 
    switch(zs_format) {
-   case PIPE_FORMAT_Z24S8_UNORM: /* fall through */
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED: /* fall through */
    case PIPE_FORMAT_Z24X8_UNORM:
       /* prepare mask to extract Z vals from ZS vals */
       spe_load_uint(f, zmask_reg, 0x00ffffff);
@@ -1880,7 +1880,7 @@ gen_depth_stencil(struct cell_context *cell,
       spe_rotmi(f, fbS_reg, fbZS_reg, -24);
       break;
 
-   case PIPE_FORMAT_S8Z24_UNORM: /* fall through */
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM: /* fall through */
    case PIPE_FORMAT_X8Z24_UNORM:
       /* convert fragment Z from [0,1] to 32-bit ints */
       spe_cfltu(f, fragZ_reg, fragZ_reg, 32);
@@ -1969,12 +1969,12 @@ gen_depth_stencil(struct cell_context *cell,
        * fbS_reg has four 8-bit Z values in bits [7..0].
        */
       spe_comment(f, 0, "Store quad's depth/stencil values in tile");
-      if (zs_format == PIPE_FORMAT_Z24S8_UNORM ||
+      if (zs_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
           zs_format == PIPE_FORMAT_Z24X8_UNORM) {
          spe_shli(f, fbS_reg, fbS_reg, 24); /* fbS = fbS << 24 */
          spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
       }
-      else if (zs_format == PIPE_FORMAT_S8Z24_UNORM ||
+      else if (zs_format == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
                zs_format == PIPE_FORMAT_X8Z24_UNORM) {
          spe_shli(f, fbZ_reg, fbZ_reg, 8); /* fbZ = fbZ << 8 */
          spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
@@ -1985,7 +1985,7 @@ gen_depth_stencil(struct cell_context *cell,
       else if (zs_format == PIPE_FORMAT_Z16_UNORM) {
          spe_move(f, fbZS_reg, fbZ_reg); /* fbZS = fbZ */
       }
-      else if (zs_format == PIPE_FORMAT_S8_UNORM) {
+      else if (zs_format == PIPE_FORMAT_S8_USCALED) {
          ASSERT(0);   /* XXX to do */
       }
       else {
@@ -2015,7 +2015,7 @@ gen_depth_stencil(struct cell_context *cell,
  * code before the fragment shader to cull fragments/quads that are
  * totally occluded/discarded.
  *
- * XXX we only support PIPE_FORMAT_S8Z24_UNORM z/stencil buffer right now.
+ * XXX we only support PIPE_FORMAT_S8_USCALED_Z24_UNORM z/stencil buffer right now.
  *
  * See the spu_default_fragment_ops() function to see how the per-fragment
  * operations would be done with ordinary C code.
index 42045744060a09f420f6b0e09c7f3286c87e2f8d..363d1e65e7f5ae1dba201f0e4e04c68de5fda38b 100644 (file)
@@ -147,7 +147,7 @@ cell_is_format_supported( struct pipe_screen *screen,
 
    /* only a few formats are known to work at this time */
    switch (format) {
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_Z24X8_UNORM:
    case PIPE_FORMAT_B8G8R8A8_UNORM:
    case PIPE_FORMAT_I8_UNORM:
index 79f1fb7fb28cd8813339993d4cd086b61aa12115..f16cabc027094d62e704091095d78d759d74a8e6 100644 (file)
@@ -337,8 +337,8 @@ cmd_state_framebuffer(const struct cell_command_framebuffer *cmd)
       spu.fb.zsize = 4;
       spu.fb.zscale = (float) 0xffffffffu;
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_X8Z24_UNORM:
    case PIPE_FORMAT_Z24X8_UNORM:
       spu.fb.zsize = 4;
index 2c9e7458afe38ee5ef168e53c2d66bdb052d7ab7..3b9566042a1d1369f19c6f819b6dedecd7666251 100644 (file)
@@ -138,13 +138,13 @@ spu_fallback_fragment_ops(uint x, uint y,
 
       if (spu.depth_stencil_alpha.stencil[0].enabled) {
          /* do stencil test */
-         ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24S8_UNORM);
+         ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED);
 
       }
       else if (spu.depth_stencil_alpha.depth.enabled) {
          /* do depth test */
 
-         ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24S8_UNORM ||
+         ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
                 spu.fb.depth_format == PIPE_FORMAT_Z24X8_UNORM);
 
          vector unsigned int ifragZ;
index 53ef6e50f6c9ea373b7a619fba01408c5222fa60..4ccc66b0373ca98390880702b17bcac0ab0b91ec 100644 (file)
@@ -178,13 +178,13 @@ i915_is_format_supported(struct pipe_screen *screen,
       PIPE_FORMAT_L8A8_UNORM,
       PIPE_FORMAT_UYVY,
       PIPE_FORMAT_YUYV,
-      PIPE_FORMAT_Z24S8_UNORM,
+      PIPE_FORMAT_Z24_UNORM_S8_USCALED,
       PIPE_FORMAT_NONE  /* list terminator */
    };
    static const enum pipe_format surface_supported[] = {
       PIPE_FORMAT_B8G8R8A8_UNORM,
       PIPE_FORMAT_B5G6R5_UNORM,
-      PIPE_FORMAT_Z24S8_UNORM,
+      PIPE_FORMAT_Z24_UNORM_S8_USCALED,
       PIPE_FORMAT_NONE  /* list terminator */
    };
    const enum pipe_format *list;
index 04a3924aaf711031f3e4512dca6ddde2d5355396..2d212abfb9dd0c1d777419130128af863b1a9675 100644 (file)
@@ -50,7 +50,7 @@ static unsigned translate_format( enum pipe_format format )
 static unsigned translate_depth_format( enum pipe_format zformat )
 {
    switch (zformat) {
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       return DEPTH_FRMT_24_FIXED_8_OTHER;
    case PIPE_FORMAT_Z16_UNORM:
       return DEPTH_FRMT_16_FIXED;
index 4c326561cb9ab860348a9469d83106928251a6a7..270d4f21e10db225428b08099892ce913cac9f2c 100644 (file)
@@ -220,7 +220,7 @@ translate_texture_format(enum pipe_format pipeFormat)
    case PIPE_FORMAT_RGBA_DXT5:
       return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
 #endif
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       return (MAPSURF_32BIT | MT_32BIT_xI824);
    default:
       debug_printf("i915: translate_texture_format() bad image format %x\n",
index e3f25bdf622c4d570de7aeb9221a7ed5768e0e92..b5029ceb69fcb87e6d64acccd1406a8144b294e9 100644 (file)
@@ -266,7 +266,7 @@ static int emit_depthbuffer(struct brw_context *brw)
         cpp = 2;
         break;
       case PIPE_FORMAT_Z24X8_UNORM:
-      case PIPE_FORMAT_Z24S8_UNORM:
+      case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
         format = BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
         cpp = 4;
         break;
index d7048f769b2fde495fd4078d2ee18b3d2f0b5dbc..abf507991e2b56c662e71308590626e2b9b087e2 100644 (file)
@@ -140,7 +140,7 @@ static void zstencil_clear(struct brw_context *brw,
 
    switch (bsurface->base.format) {
    case PIPE_FORMAT_Z24X8_UNORM:
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       value = ((unsigned)(depth * MASK24) & MASK24);
       break;
    case PIPE_FORMAT_Z16_UNORM:
@@ -153,7 +153,7 @@ static void zstencil_clear(struct brw_context *brw,
 
    switch (bsurface->base.format) {
    case PIPE_FORMAT_Z24X8_UNORM:
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       value = value | (stencil << 24);
       break;
 
index cef83ffea80e60d62e35d63d80a3ea490dcb8f41..ba30e63f20ce1ffc2601a6b9b34fd999ce884497 100644 (file)
@@ -252,7 +252,7 @@ brw_is_format_supported(struct pipe_screen *screen,
       /* depth */
       PIPE_FORMAT_Z32_FLOAT,
       PIPE_FORMAT_Z24X8_UNORM,
-      PIPE_FORMAT_Z24S8_UNORM,
+      PIPE_FORMAT_Z24_UNORM_S8_USCALED,
       PIPE_FORMAT_Z16_UNORM,
       /* signed */
       PIPE_FORMAT_R8G8_SNORM,
@@ -268,7 +268,7 @@ brw_is_format_supported(struct pipe_screen *screen,
    static const enum pipe_format depth_supported[] = {
       PIPE_FORMAT_Z32_FLOAT,
       PIPE_FORMAT_Z24X8_UNORM,
-      PIPE_FORMAT_Z24S8_UNORM,
+      PIPE_FORMAT_Z24_UNORM_S8_USCALED,
       PIPE_FORMAT_Z16_UNORM,
       PIPE_FORMAT_NONE  /* list terminator */
    };
index cadcb7cee2a33142cb84a2c8cc9f3be5abc2a4ca..613ac7842073445da8af9a16e5d61fe1d9b8803e 100644 (file)
@@ -158,7 +158,7 @@ static GLuint translate_tex_format( enum pipe_format pf )
    case PIPE_FORMAT_Z16_UNORM:
          return BRW_SURFACEFORMAT_I16_UNORM;
 
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
    case PIPE_FORMAT_Z24X8_UNORM:
          return BRW_SURFACEFORMAT_I24X8_UNORM;
 
index e091cae602423023ac2f960805b8336aeedf0db5..85b0aef20cc2b7c07ae467ef2bb8be83b23e8d06 100644 (file)
@@ -89,14 +89,14 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
        case PIPE_FORMAT_Z32_FLOAT:
                tile_flags = 0x4800;
                break;
-       case PIPE_FORMAT_S8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                tile_flags = 0x1800;
                break;
        case PIPE_FORMAT_Z16_UNORM:
                tile_flags = 0x6c00;
                break;
        case PIPE_FORMAT_Z24X8_UNORM:
-       case PIPE_FORMAT_Z24S8_UNORM:
+       case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                tile_flags = 0x2800;
                break;
        case PIPE_FORMAT_R32G32B32A32_FLOAT:
index 1a4606d9e25fa4d5863e999db8ffc255372e6641..801548d8a1b0cafc7f136cf8091fe08ac54dbf94 100644 (file)
@@ -51,9 +51,9 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
        if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL) {
                switch (format) {
                case PIPE_FORMAT_Z32_FLOAT:
-               case PIPE_FORMAT_S8Z24_UNORM:
+               case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                case PIPE_FORMAT_Z24X8_UNORM:
-               case PIPE_FORMAT_Z24S8_UNORM:
+               case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                        return TRUE;
                default:
                        break;
@@ -75,8 +75,8 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
                case PIPE_FORMAT_DXT1_RGBA:
                case PIPE_FORMAT_DXT3_RGBA:
                case PIPE_FORMAT_DXT5_RGBA:
-               case PIPE_FORMAT_S8Z24_UNORM:
-               case PIPE_FORMAT_Z24S8_UNORM:
+               case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+               case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                case PIPE_FORMAT_Z32_FLOAT:
                case PIPE_FORMAT_R16G16B16A16_SNORM:
                case PIPE_FORMAT_R16G16B16A16_UNORM:
index b7e355283c8ae8fe4910eef5e81a2ec7d2e6fe69..402045416c668f422f2cd39c175678dddfd1cdea 100644 (file)
@@ -122,13 +122,13 @@ validate_fb(struct nv50_context *nv50)
                so_reloc (so, bo, fb->zsbuf->offset, NOUVEAU_BO_VRAM |
                              NOUVEAU_BO_LOW | NOUVEAU_BO_RDWR, 0, 0);
                switch (fb->zsbuf->format) {
-               case PIPE_FORMAT_Z24S8_UNORM:
+               case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                        so_data(so, NV50TCL_ZETA_FORMAT_S8Z24_UNORM);
                        break;
                case PIPE_FORMAT_Z24X8_UNORM:
                        so_data(so, NV50TCL_ZETA_FORMAT_X8Z24_UNORM);
                        break;
-               case PIPE_FORMAT_S8Z24_UNORM:
+               case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                        so_data(so, NV50TCL_ZETA_FORMAT_Z24S8_UNORM);
                        break;
                case PIPE_FORMAT_Z32_FLOAT:
index 6467c48a32a55f80340dc8b7f11d61bdc00a3bdd..7a9dada531b55a451bd19fe2ef7f5293ced9914a 100644 (file)
@@ -60,8 +60,8 @@ nv50_format(enum pipe_format format)
        /* only because we require src format == dst format: */
        case PIPE_FORMAT_R16G16_SNORM:
        case PIPE_FORMAT_R16G16_UNORM:
-       case PIPE_FORMAT_S8Z24_UNORM:
-       case PIPE_FORMAT_Z24S8_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+       case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                return NV50_2D_DST_FORMAT_A8R8G8B8_UNORM;
        case PIPE_FORMAT_L8A8_UNORM:
        case PIPE_FORMAT_B4G4R4A4_UNORM:
index 85ab947c0063eae6afb15cf51f4246e0db618100..d094b490edbc3316e3055db21b317b07f85d9e60 100644 (file)
@@ -62,8 +62,8 @@ static const uint32_t nv50_texture_formats[PIPE_FORMAT_COUNT] =
        _(DXT3_RGBA, UNORM, C0, C1, C2, C3, DXT3),
        _(DXT5_RGBA, UNORM, C0, C1, C2, C3, DXT5),
 
-       _MIXED(S8Z24_UNORM, UINT, UNORM, UINT, UINT, C1, C1, C1, ONE, 24_8),
-       _MIXED(Z24S8_UNORM, UNORM, UINT, UINT, UINT, C0, C0, C0, ONE, 8_24),
+       _MIXED(S8_USCALED_Z24_UNORM, UINT, UNORM, UINT, UINT, C1, C1, C1, ONE, 24_8),
+       _MIXED(Z24_UNORM_S8_USCALED, UNORM, UINT, UINT, UINT, C0, C0, C0, ONE, 8_24),
 
        _(R16G16B16A16_SNORM, UNORM, C0, C1, C2, C3, 16_16_16_16),
        _(R16G16B16A16_UNORM, SNORM, C0, C1, C2, C3, 16_16_16_16),
index ed18c9f24dc911583fa22cace89c279a4b051c53..6784170c00e74dd35f3015bae6840814120f838e 100644 (file)
@@ -25,7 +25,7 @@ nv04_surface_format(enum pipe_format format)
        case PIPE_FORMAT_B8G8R8X8_UNORM:
        case PIPE_FORMAT_B8G8R8A8_UNORM:
                return NV04_CONTEXT_SURFACES_2D_FORMAT_A8R8G8B8;
-       case PIPE_FORMAT_S8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
        case PIPE_FORMAT_X8Z24_UNORM:
                return NV04_CONTEXT_SURFACES_2D_FORMAT_Y32;
        default:
@@ -45,7 +45,7 @@ nv04_rect_format(enum pipe_format format)
                return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5;
        case PIPE_FORMAT_B8G8R8X8_UNORM:
        case PIPE_FORMAT_B8G8R8A8_UNORM:
-       case PIPE_FORMAT_S8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
        case PIPE_FORMAT_X8Z24_UNORM:
                return NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8;
        default:
index 54e47574c4de5e27d1999e83ee1afb69fc2eb51b..d3f3edb3278b8c1a5de86cbb25e52a85969f682d 100644 (file)
@@ -63,7 +63,7 @@ nv30_texture_formats[] = {
        _(I8_UNORM      , L8      ,   S1,   S1,   S1,   S1, X, X, X, X),
        _(L8A8_UNORM    , A8L8    ,   S1,   S1,   S1,   S1, X, X, X, Y),
        _(Z16_UNORM     , R5G6B5  ,   S1,   S1,   S1,  ONE, X, X, X, X),
-       _(S8Z24_UNORM   , A8R8G8B8,   S1,   S1,   S1,  ONE, X, X, X, X),
+       _(S8_USCALED_Z24_UNORM   , A8R8G8B8,   S1,   S1,   S1,  ONE, X, X, X, X),
        _(DXT1_RGB      , DXT1    ,   S1,   S1,   S1,  ONE, X, Y, Z, W),
        _(DXT1_RGBA     , DXT1    ,   S1,   S1,   S1,   S1, X, Y, Z, W),
        _(DXT3_RGBA     , DXT3    ,   S1,   S1,   S1,   S1, X, Y, Z, W),
index 05506e2809916d1335125beb038c256f6afbc818..fe87cebbb68ca7e3ef89b8577920fa9ba33b13ef 100644 (file)
@@ -81,7 +81,7 @@ nv40_texture_formats[] = {
        _(I8_UNORM      , L8      ,   S1,   S1,   S1,   S1, X, X, X, X, 0, 0, 0, 0),
        _(L8A8_UNORM    , A8L8    ,   S1,   S1,   S1,   S1, X, X, X, Y, 0, 0, 0, 0),
        _(Z16_UNORM     , Z16     ,   S1,   S1,   S1,  ONE, X, X, X, X, 0, 0, 0, 0),
-       _(S8Z24_UNORM   , Z24     ,   S1,   S1,   S1,  ONE, X, X, X, X, 0, 0, 0, 0),
+       _(S8_USCALED_Z24_UNORM   , Z24     ,   S1,   S1,   S1,  ONE, X, X, X, X, 0, 0, 0, 0),
        _(DXT1_RGB      , DXT1    ,   S1,   S1,   S1,  ONE, X, Y, Z, W, 0, 0, 0, 0),
        _(DXT1_RGBA     , DXT1    ,   S1,   S1,   S1,   S1, X, Y, Z, W, 0, 0, 0, 0),
        _(DXT3_RGBA     , DXT3    ,   S1,   S1,   S1,   S1, X, Y, Z, W, 0, 0, 0, 0),
index f7f39218944b7dbd87d9fb8cf4c67ac1d1a5f1b4..1a103520a3c396f6b6cfa7aa84d9dc33232f9dca 100644 (file)
@@ -133,7 +133,7 @@ nvfx_screen_surface_format_supported(struct pipe_screen *pscreen,
        } else
        if (tex_usage & PIPE_TEXTURE_USAGE_DEPTH_STENCIL) {
                switch (format) {
-               case PIPE_FORMAT_S8Z24_UNORM:
+               case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                case PIPE_FORMAT_X8Z24_UNORM:
                        return TRUE;
                case PIPE_FORMAT_Z16_UNORM:
@@ -155,7 +155,7 @@ nvfx_screen_surface_format_supported(struct pipe_screen *pscreen,
                case PIPE_FORMAT_I8_UNORM:
                case PIPE_FORMAT_L8A8_UNORM:
                case PIPE_FORMAT_Z16_UNORM:
-               case PIPE_FORMAT_S8Z24_UNORM:
+               case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                case PIPE_FORMAT_DXT1_RGB:
                case PIPE_FORMAT_DXT1_RGBA:
                case PIPE_FORMAT_DXT3_RGBA:
index dd64ba4193c3c0078958b450cf1052665b49d590..1923184163bc40e89405c1b992957b0347ab9b24 100644 (file)
@@ -102,7 +102,7 @@ nvfx_state_framebuffer_validate(struct nvfx_context *nvfx)
                rt_format |= NV34TCL_RT_FORMAT_ZETA_Z16;
                zeta_bits = 16;
                break;
-       case PIPE_FORMAT_S8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
        case PIPE_FORMAT_X8Z24_UNORM:
        case 0:
                rt_format |= NV34TCL_RT_FORMAT_ZETA_Z24S8;
index e46f836dd2c0601e5f1b2d5f8aef8b46376e9258..090964b0254744b52c3b21739b21caf7c13a4e14 100644 (file)
@@ -208,7 +208,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
     uint32_t retval = 0;
     boolean is_r500 = r300_screen(screen)->caps->is_r500;
     boolean is_z24 = format == PIPE_FORMAT_X8Z24_UNORM ||
-                     format == PIPE_FORMAT_S8Z24_UNORM;
+                     format == PIPE_FORMAT_S8_USCALED_Z24_UNORM;
     boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM;
 
     if (target >= PIPE_MAX_TEXTURE_TYPES) {
index 7c86bdb4bdc9b6c8f694134ae625c2ad55903e2e..bc7e6060636324a1b95d81327435a40a10589a6b 100644 (file)
@@ -104,7 +104,7 @@ static uint32_t r300_translate_texformat(enum pipe_format format)
                 case PIPE_FORMAT_Z16_UNORM:
                     return R300_EASY_TX_FORMAT(X, X, X, X, X16);
                 case PIPE_FORMAT_X8Z24_UNORM:
-                case PIPE_FORMAT_S8Z24_UNORM:
+                case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                     return R300_EASY_TX_FORMAT(X, X, X, X, W24_FP);
                 default:
                     return ~0; /* Unsupported. */
@@ -372,7 +372,7 @@ static uint32_t r300_translate_zsformat(enum pipe_format format)
         /* 24-bit depth, ignored stencil */
         case PIPE_FORMAT_X8Z24_UNORM:
         /* 24-bit depth, 8-bit stencil */
-        case PIPE_FORMAT_S8Z24_UNORM:
+        case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
             return R300_DEPTHFORMAT_24BIT_INT_Z_8BIT_STENCIL;
         default:
             return ~0; /* Unsupported. */
index 17cd5b82072e698c091317095ae1bf170d78a4bc..4ee31969e6b2af34a826454d34608b4fe617efd4 100644 (file)
@@ -75,7 +75,7 @@ get_depth_stencil_values( struct depth_data *data,
       }
       break;
    case PIPE_FORMAT_Z24X8_UNORM:
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       for (j = 0; j < QUAD_SIZE; j++) {
          int x = quad->input.x0 % TILE_SIZE + (j & 1);
          int y = quad->input.y0 % TILE_SIZE + (j >> 1);
@@ -84,7 +84,7 @@ get_depth_stencil_values( struct depth_data *data,
       }
    break;
    case PIPE_FORMAT_X8Z24_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       for (j = 0; j < QUAD_SIZE; j++) {
          int x = quad->input.x0 % TILE_SIZE + (j & 1);
          int y = quad->input.y0 % TILE_SIZE + (j >> 1);
@@ -153,7 +153,7 @@ convert_quad_depth( struct depth_data *data,
       }
       break;
    case PIPE_FORMAT_Z24X8_UNORM:
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       {
          float scale = (float) ((1 << 24) - 1);
 
@@ -163,7 +163,7 @@ convert_quad_depth( struct depth_data *data,
       }
       break;
    case PIPE_FORMAT_X8Z24_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       {
          float scale = (float) ((1 << 24) - 1);
 
@@ -206,14 +206,14 @@ write_depth_stencil_values( struct depth_data *data,
          tile->data.depth32[y][x] = data->bzzzz[j];
       }
       break;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       for (j = 0; j < QUAD_SIZE; j++) {
          int x = quad->input.x0 % TILE_SIZE + (j & 1);
          int y = quad->input.y0 % TILE_SIZE + (j >> 1);
          tile->data.depth32[y][x] = (data->stencilVals[j] << 24) | data->bzzzz[j];
       }
       break;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       for (j = 0; j < QUAD_SIZE; j++) {
          int x = quad->input.x0 % TILE_SIZE + (j & 1);
          int y = quad->input.y0 % TILE_SIZE + (j >> 1);
index 1c3c2667d732499796f1a7ae6a278999f5044116..7551b923fb7607fbc8a55a05be22926a2682b63a 100644 (file)
@@ -158,13 +158,13 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc,
                                               PIPE_TRANSFER_READ_WRITE,
                                               0, 0, ps->width, ps->height);
 
-      tc->depth_stencil = (ps->format == PIPE_FORMAT_Z24S8_UNORM ||
+      tc->depth_stencil = (ps->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
                            ps->format == PIPE_FORMAT_Z24X8_UNORM ||
-                           ps->format == PIPE_FORMAT_S8Z24_UNORM ||
+                           ps->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
                            ps->format == PIPE_FORMAT_X8Z24_UNORM ||
                            ps->format == PIPE_FORMAT_Z16_UNORM ||
                            ps->format == PIPE_FORMAT_Z32_UNORM ||
-                           ps->format == PIPE_FORMAT_S8_UNORM);
+                           ps->format == PIPE_FORMAT_S8_USCALED);
    }
 }
 
index 8483a3fad74c1af22c1558a91a6aec92427101e1..bb1664fbed90d15ce0c4a904d6eaf14bcfe14e2f 100644 (file)
@@ -63,7 +63,7 @@ try_clear(struct svga_context *svga,
    if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && fb->zsbuf) {
       flags |= SVGA3D_CLEAR_DEPTH;
 
-      if (svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_S8Z24_UNORM)
+      if (svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM)
          flags |= SVGA3D_CLEAR_STENCIL;
 
       rect.w = MAX2(rect.w, fb->zsbuf->width);
index 95bf0e6f91bad3630fdaed7214b6dfceda6ac19e..2c43f9a24f47dc81c38cbe07c8cabd05444c838e 100644 (file)
@@ -118,9 +118,9 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
       case PIPE_FORMAT_Z16_UNORM:
          svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D16;
          break;
-      case PIPE_FORMAT_Z24S8_UNORM:
+      case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       case PIPE_FORMAT_Z24X8_UNORM:
-      case PIPE_FORMAT_S8Z24_UNORM:
+      case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       case PIPE_FORMAT_X8Z24_UNORM:
          svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8;
          break;
index 6022c38cfca016180089e862528f93cb46d11f5d..9a2e7c6f5b0da27d632a80a6177a53e4d94d06d4 100644 (file)
@@ -210,7 +210,7 @@ svga_translate_format_cap(enum pipe_format format)
 
    case PIPE_FORMAT_Z16_UNORM:
       return SVGA3D_DEVCAP_SURFACEFMT_Z_D16;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       return SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8;
    case PIPE_FORMAT_X8Z24_UNORM:
       return SVGA3D_DEVCAP_SURFACEFMT_Z_D24X8;
index 4a058eda885a129c636f4198148cc108cc764aab..41f88eed72c4052bae422e470b64b5520c7e269b 100644 (file)
@@ -81,7 +81,7 @@ svga_translate_format(enum pipe_format format)
     */
    case PIPE_FORMAT_Z16_UNORM:
       return SVGA3D_Z_D16;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       return SVGA3D_Z_D24S8;
    case PIPE_FORMAT_X8Z24_UNORM:
       return SVGA3D_Z_D24X8;
@@ -114,7 +114,7 @@ svga_translate_format_render(enum pipe_format format)
    case PIPE_FORMAT_B5G5R5A1_UNORM:
    case PIPE_FORMAT_B4G4R4A4_UNORM:
    case PIPE_FORMAT_B5G6R5_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
    case PIPE_FORMAT_X8Z24_UNORM:
    case PIPE_FORMAT_Z32_UNORM:
    case PIPE_FORMAT_Z16_UNORM:
index b710914acda7e8767717b4bf970c063281ac797f..bd92f003432b06c2feed805b59d4d50030b0c9d5 100644 (file)
@@ -70,7 +70,7 @@ static int emit_framebuffer( struct svga_context *svga,
          return ret;
 
       if (curr->zsbuf &&
-          curr->zsbuf->format == PIPE_FORMAT_S8Z24_UNORM) {
+          curr->zsbuf->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM) {
          ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, curr->zsbuf);
          if (ret != PIPE_OK)
             return ret;
index 821c1dea626ae3ea4dbd268946f97fce55bdbd25..6fc7487071b3b6f55db8bc868e0aa466e336d9a8 100644 (file)
@@ -97,10 +97,10 @@ dri_fill_in_modes(struct dri_screen *screen,
    pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM,
                                            PIPE_TEXTURE_2D,
                                            PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
-   pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24S8_UNORM,
+   pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
                                            PIPE_TEXTURE_2D,
                                            PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
-   pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8Z24_UNORM,
+   pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
                                            PIPE_TEXTURE_2D,
                                            PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
    pf_a8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
@@ -241,8 +241,8 @@ dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
                                           PIPE_FORMAT_X8Z24_UNORM;
       } else {
         stvis->depth_stencil_format = (screen->sd_depth_bits_last) ?
-                                          PIPE_FORMAT_Z24S8_UNORM:
-                                          PIPE_FORMAT_S8Z24_UNORM;
+                                          PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+                                          PIPE_FORMAT_S8_USCALED_Z24_UNORM;
       }
       break;
    case 32:
index 73222408565cb752a4a79237542ad95160ed26b2..31747744907924bc63bd1096fc51fcb4f14fef27 100644 (file)
@@ -631,9 +631,9 @@ kms_display_get_configs(struct native_display *ndpy, int *num_configs)
       nconf->mode.alphaBits = 8;
       nconf->mode.rgbBits = 32;
 
-      format = PIPE_FORMAT_Z24S8_UNORM;
+      format = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
       if (!kms_display_is_format_supported(&kdpy->base, format, FALSE)) {
-         format = PIPE_FORMAT_S8Z24_UNORM;
+         format = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
          if (!kms_display_is_format_supported(&kdpy->base, format, FALSE))
             format = PIPE_FORMAT_NONE;
       }
index 98399792311218bb7b74cdad6bbd10c3bb36148a..8c0553ce0d5739f9f1a4ea8d739d7a519bd0004b 100644 (file)
@@ -558,8 +558,8 @@ choose_depth_stencil_format(const __GLcontextModes *mode,
       break;
    case 24:
       if (mode->stencilBits) {
-         formats[count++] = PIPE_FORMAT_Z24S8_UNORM;
-         formats[count++] = PIPE_FORMAT_S8Z24_UNORM;
+         formats[count++] = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+         formats[count++] = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
       }
       else {
          formats[count++] = PIPE_FORMAT_Z24X8_UNORM;
index c6b16354f9bb67efbae05e63567d4baf5319d77b..d69011ac5eec6a6dde45cf607854a52f7dd20d94 100644 (file)
@@ -526,8 +526,8 @@ ximage_display_get_configs(struct native_display *ndpy, int *num_configs)
             xconf->base.stencil_format = PIPE_FORMAT_NONE;
             /* create the second config with depth/stencil buffer */
             if (j == 1) {
-               xconf->base.depth_format = PIPE_FORMAT_Z24S8_UNORM;
-               xconf->base.stencil_format = PIPE_FORMAT_Z24S8_UNORM;
+               xconf->base.depth_format = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+               xconf->base.stencil_format = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
                mode->depthBits = 24;
                mode->stencilBits = 8;
                mode->haveDepthBuffer = TRUE;
index 3022d45157a1a14f1ee422a82b0a2da4a1204391..919497be5f5a5a469e15f5991d126f975f1ac4ba 100644 (file)
@@ -356,8 +356,8 @@ choose_depth_stencil_format(XMesaDisplay xmdpy, int depth, int stencil)
       formats[count++] = PIPE_FORMAT_Z24X8_UNORM;
    }
    if (depth <= 24 && stencil <= 8) {
-      formats[count++] = PIPE_FORMAT_S8Z24_UNORM;
-      formats[count++] = PIPE_FORMAT_Z24S8_UNORM;
+      formats[count++] = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
+      formats[count++] = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
    }
    if (depth <= 32 && stencil == 0) {
       formats[count++] = PIPE_FORMAT_Z32_UNORM;
index f438e34087e71a87ad674fb6d957ffddedd50b2b..108dd6a97513b765552b7f0ce400de5adf52e0c3 100644 (file)
@@ -208,7 +208,7 @@ struct st_framebuffer * st_create_framebuffer(const void *visual,
       if (stencilFormat == depthFormat)
          stfb->dsrb = st_new_renderbuffer_fb(stencilFormat);
       else
-         stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_Z24S8_UNORM);
+         stfb->dsrb = st_new_renderbuffer_fb(PIPE_FORMAT_Z24_UNORM_S8_USCALED);
 
       /*### currently we always allocate it but it's possible it's
         not necessary if EGL_ALPHA_MASK_SIZE was 0
index bc28f31ed1cf7e77c25adba20a3b74a0e261e56f..02ff89a388b360c4ebf80bfe2a49f1c288bd7c39 100644 (file)
@@ -96,8 +96,8 @@ stw_pf_depth_stencil[] = {
    { PIPE_FORMAT_Z24X8_UNORM, {24, 0} },
    { PIPE_FORMAT_Z16_UNORM,   {16, 0} },
    /* combined depth-stencil */
-   { PIPE_FORMAT_Z24S8_UNORM, {24, 8} },
-   { PIPE_FORMAT_S8Z24_UNORM, {24, 8} }
+   { PIPE_FORMAT_Z24_UNORM_S8_USCALED, {24, 8} },
+   { PIPE_FORMAT_S8_USCALED_Z24_UNORM, {24, 8} }
 };
 
 
index f23e4c6cc7ca9f9b033d8f69bc92ae53e1bccac0..91c251bb4ff92e9dffdd59df676502cdbef4cb4e 100644 (file)
@@ -122,7 +122,7 @@ dri2_do_create_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, unsigned int form
                }
             } else {
                template.format = ms->ds_depth_bits_last ?
-                                 PIPE_FORMAT_Z24S8_UNORM : PIPE_FORMAT_S8Z24_UNORM;
+                                 PIPE_FORMAT_Z24_UNORM_S8_USCALED : PIPE_FORMAT_S8_USCALED_Z24_UNORM;
             }
            template.width0 = pDraw->width;
            template.height0 = pDraw->height;
@@ -439,7 +439,7 @@ xorg_dri2_init(ScreenPtr pScreen)
                                         PIPE_TEXTURE_2D,
                                         PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
     ms->ds_depth_bits_last =
-        ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24S8_UNORM,
+        ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
                                         PIPE_TEXTURE_2D,
                                         PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0);
 
index c9d1e9c6c4b2b15796405e12a5342c2556b11ca1..85570541ef0084d2f739794157f5691106bfca61 100644 (file)
@@ -735,14 +735,14 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
 
             /* now pack the stencil (and Z) values in the dest format */
             switch (pt->texture->format) {
-            case PIPE_FORMAT_S8_UNORM:
+            case PIPE_FORMAT_S8_USCALED:
                {
                   ubyte *dest = stmap + spanY * pt->stride + spanX;
                   assert(usage == PIPE_TRANSFER_WRITE);
                   memcpy(dest, sValues, spanWidth);
                }
                break;
-            case PIPE_FORMAT_Z24S8_UNORM:
+            case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                if (format == GL_DEPTH_STENCIL) {
                   uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4);
                   GLint k;
@@ -760,7 +760,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
                   }
                }
                break;
-            case PIPE_FORMAT_S8Z24_UNORM:
+            case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
                if (format == GL_DEPTH_STENCIL) {
                   uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4);
                   GLint k;
@@ -913,7 +913,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
       src = buffer + i * width;
 
       switch (ptDraw->texture->format) {
-      case PIPE_FORMAT_Z24S8_UNORM:
+      case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
          {
             uint *dst4 = (uint *) dst;
             int j;
@@ -924,7 +924,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
             }
          }
          break;
-      case PIPE_FORMAT_S8Z24_UNORM:
+      case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
          {
             uint *dst4 = (uint *) dst;
             int j;
@@ -935,7 +935,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
             }
          }
          break;
-      case PIPE_FORMAT_S8_UNORM:
+      case PIPE_FORMAT_S8_USCALED:
          assert(usage == PIPE_TRANSFER_WRITE);
          memcpy(dst, src, width);
          break;
index 84c2474038d0a7194c81ccc3982831c1b8bf469d..542ab38a50e324d0540d94db9231814da3c2c050 100644 (file)
@@ -255,13 +255,13 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
    case PIPE_FORMAT_Z32_UNORM:
       strb->Base.InternalFormat = GL_DEPTH_COMPONENT32;
       break;
-   case PIPE_FORMAT_Z24S8_UNORM:
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
    case PIPE_FORMAT_Z24X8_UNORM:
    case PIPE_FORMAT_X8Z24_UNORM:
       strb->Base.InternalFormat = GL_DEPTH24_STENCIL8_EXT;
       break;
-   case PIPE_FORMAT_S8_UNORM:
+   case PIPE_FORMAT_S8_USCALED:
       strb->Base.InternalFormat = GL_STENCIL_INDEX8_EXT;
       break;
    case PIPE_FORMAT_R16G16B16A16_SNORM:
index 7afb275fe2fa11fc96108b1bebbda9f77d704788..10795ee9e4ad307c7fd772aba4ac38f77330e463 100644 (file)
@@ -103,13 +103,13 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
 
       /* get stencil (and Z) values */
       switch (pt->texture->format) {
-      case PIPE_FORMAT_S8_UNORM:
+      case PIPE_FORMAT_S8_USCALED:
          {
             const ubyte *src = stmap + srcY * pt->stride;
             memcpy(sValues, src, width);
          }
          break;
-      case PIPE_FORMAT_Z24S8_UNORM:
+      case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
          if (format == GL_DEPTH_STENCIL) {
             const uint *src = (uint *) (stmap + srcY * pt->stride);
             const GLfloat scale = 1.0f / (0xffffff);
@@ -127,7 +127,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
             }
          }
          break;
-      case PIPE_FORMAT_S8Z24_UNORM:
+      case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
          if (format == GL_DEPTH_STENCIL) {
             const uint *src = (uint *) (stmap + srcY * pt->stride);
             const GLfloat scale = 1.0f / (0xffffff);
@@ -437,7 +437,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
       const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
                                                      format, type);
 
-      if (trans->texture->format == PIPE_FORMAT_Z24S8_UNORM ||
+      if (trans->texture->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
           trans->texture->format == PIPE_FORMAT_Z24X8_UNORM) {
          if (format == GL_DEPTH_COMPONENT) {
             for (i = 0; i < height; i++) {
@@ -469,7 +469,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
             }
          }
       }
-      else if (trans->texture->format == PIPE_FORMAT_S8Z24_UNORM ||
+      else if (trans->texture->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
                trans->texture->format == PIPE_FORMAT_X8Z24_UNORM) {
          if (format == GL_DEPTH_COMPONENT) {
             for (i = 0; i < height; i++) {
index 290ee36b0fe58c3c21841c496e4dd4119729846c..0118c600f09d31871391b8fa70dd844c3fbe19f2 100644 (file)
@@ -281,18 +281,18 @@ void st_init_extensions(struct st_context *st)
    /* GL_EXT_packed_depth_stencil requires both the ability to render to
     * a depth/stencil buffer and texture from depth/stencil source.
     */
-   if (screen->is_format_supported(screen, PIPE_FORMAT_S8Z24_UNORM,
+   if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
                                    PIPE_TEXTURE_2D, 
                                    PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0) &&
-       screen->is_format_supported(screen, PIPE_FORMAT_S8Z24_UNORM,
+       screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
                                    PIPE_TEXTURE_2D, 
                                    PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
       ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
    }
-   else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
+   else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
                                         PIPE_TEXTURE_2D, 
                                         PIPE_TEXTURE_USAGE_DEPTH_STENCIL, 0) &&
-            screen->is_format_supported(screen, PIPE_FORMAT_Z24S8_UNORM,
+            screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
                                         PIPE_TEXTURE_2D, 
                                         PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
       ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
index 9ae0c9f9babe8dbda5e224ff6d5ee9bcb890fc8e..ecc08762bb26369e09c51d78399c8b6f4d149290 100644 (file)
@@ -76,8 +76,8 @@ st_format_datatype(enum pipe_format format)
           format == PIPE_FORMAT_B5G6R5_UNORM) {
          return GL_UNSIGNED_SHORT;
       }
-      else if (format == PIPE_FORMAT_Z24S8_UNORM ||
-               format == PIPE_FORMAT_S8Z24_UNORM) {
+      else if (format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
+               format == PIPE_FORMAT_S8_USCALED_Z24_UNORM) {
          return GL_UNSIGNED_INT_24_8;
       }
       else {
@@ -151,9 +151,9 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
    case MESA_FORMAT_Z32:
       return PIPE_FORMAT_Z32_UNORM;
    case MESA_FORMAT_Z24_S8:
-      return PIPE_FORMAT_S8Z24_UNORM;
+      return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
    case MESA_FORMAT_S8_Z24:
-      return PIPE_FORMAT_Z24S8_UNORM;
+      return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
    case MESA_FORMAT_YCBCR:
       return PIPE_FORMAT_UYVY;
 #if FEATURE_texture_s3tc
@@ -224,7 +224,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
       return MESA_FORMAT_L8;
    case PIPE_FORMAT_I8_UNORM:
       return MESA_FORMAT_I8;
-   case PIPE_FORMAT_S8_UNORM:
+   case PIPE_FORMAT_S8_USCALED:
       return MESA_FORMAT_S8;
 
    case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -234,13 +234,13 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
       return MESA_FORMAT_Z16;
    case PIPE_FORMAT_Z32_UNORM:
       return MESA_FORMAT_Z32;
-   case PIPE_FORMAT_S8Z24_UNORM:
+   case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
       return MESA_FORMAT_Z24_S8;
    case PIPE_FORMAT_X8Z24_UNORM:
       return MESA_FORMAT_Z24_X8;
    case PIPE_FORMAT_Z24X8_UNORM:
       return MESA_FORMAT_X8_Z24;
-   case PIPE_FORMAT_Z24S8_UNORM:
+   case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
       return MESA_FORMAT_S8_Z24;
 
    case PIPE_FORMAT_UYVY:
@@ -393,8 +393,8 @@ default_depth_format(struct pipe_screen *screen,
    static const enum pipe_format zFormats[] = {
       PIPE_FORMAT_Z16_UNORM,
       PIPE_FORMAT_Z32_UNORM,
-      PIPE_FORMAT_Z24S8_UNORM,
-      PIPE_FORMAT_S8Z24_UNORM
+      PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+      PIPE_FORMAT_S8_USCALED_Z24_UNORM
    };
    uint i;
    for (i = 0; i < Elements(zFormats); i++) {
@@ -546,10 +546,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
          return PIPE_FORMAT_Z16_UNORM;
       /* fall-through */
    case GL_DEPTH_COMPONENT24:
-      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_Z24S8_UNORM;
-      if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_S8Z24_UNORM;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
       /* fall-through */
    case GL_DEPTH_COMPONENT32:
       if (screen->is_format_supported( screen, PIPE_FORMAT_Z32_UNORM, target, tex_usage, geom_flags ))
@@ -563,20 +563,20 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
    case GL_STENCIL_INDEX4_EXT:
    case GL_STENCIL_INDEX8_EXT:
    case GL_STENCIL_INDEX16_EXT:
-      if (screen->is_format_supported( screen, PIPE_FORMAT_S8_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_S8_UNORM;
-      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_Z24S8_UNORM;
-      if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_S8Z24_UNORM;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_S8_USCALED;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
       return PIPE_FORMAT_NONE;
 
    case GL_DEPTH_STENCIL_EXT:
    case GL_DEPTH24_STENCIL8_EXT:
-      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24S8_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_Z24S8_UNORM;
-      if (screen->is_format_supported( screen, PIPE_FORMAT_S8Z24_UNORM, target, tex_usage, geom_flags ))
-         return PIPE_FORMAT_S8Z24_UNORM;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+      if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, target, tex_usage, geom_flags ))
+         return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
       return PIPE_FORMAT_NONE;
 
    case GL_SRGB_EXT: