gallium: rename ZS stencil type to UINT (v2)
[mesa.git] / src / gallium / auxiliary / util / u_surface.c
index 8e123867da6ec2c3933793b429e35307aeb53ac9..c7fbd3657f960c8abc42c84326ae7f449569db40 100644 (file)
@@ -228,7 +228,7 @@ util_resource_copy_region(struct pipe_context *pipe,
 void
 util_clear_render_target(struct pipe_context *pipe,
                          struct pipe_surface *dst,
-                         const float *rgba,
+                         const union pipe_color_union *color,
                          unsigned dstx, unsigned dsty,
                          unsigned width, unsigned height)
 {
@@ -254,7 +254,7 @@ util_clear_render_target(struct pipe_context *pipe,
    if (dst_map) {
       assert(dst_trans->stride > 0);
 
-      util_pack_color(rgba, dst->texture->format, &uc);
+      util_pack_color(color->f, dst->texture->format, &uc);
       util_fill_rect(dst_map, dst->texture->format,
                      dst_trans->stride,
                      0, 0, width, height, &uc);
@@ -311,7 +311,7 @@ util_clear_depth_stencil(struct pipe_context *pipe,
 
       switch (util_format_get_blocksize(dst->format)) {
       case 1:
-         assert(dst->format == PIPE_FORMAT_S8_USCALED);
+         assert(dst->format == PIPE_FORMAT_S8_UINT);
          if(dst_stride == width)
             memset(dst_map, (ubyte) zstencil, height * width);
          else {
@@ -341,10 +341,10 @@ util_clear_depth_stencil(struct pipe_context *pipe,
          }
          else {
             uint32_t dst_mask;
-            if (dst->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED)
+            if (dst->format == PIPE_FORMAT_Z24_UNORM_S8_UINT)
                dst_mask = 0xffffff00;
             else {
-               assert(dst->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM);
+               assert(dst->format == PIPE_FORMAT_S8_UINT_Z24_UNORM);
                dst_mask = 0xffffff;
             }
             if (clear_flags & PIPE_CLEAR_DEPTH)
@@ -364,7 +364,7 @@ util_clear_depth_stencil(struct pipe_context *pipe,
          uint64_t zstencil = util_pack64_z_stencil(dst->texture->format,
                                                    depth, stencil);
 
-         assert(dst->format == PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED);
+         assert(dst->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT);
 
          if (!need_rmw) {
             for (i = 0; i < height; i++) {