Merge branch 'lp-offset-twoside'
[mesa.git] / src / gallium / drivers / r300 / r300_blit.c
index 47ffc0cb3c6a83573abdb66e3c74b1419a08a378..0ac4e4c6f128cd4fd5d7a3dec9caf0abeef421bb 100644 (file)
@@ -176,12 +176,12 @@ static void r300_clear(struct pipe_context* pipe,
             fb->zsbuf ? r300_texture(fb->zsbuf->texture) : NULL;
     uint32_t width = fb->width;
     uint32_t height = fb->height;
-    boolean has_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
+    boolean can_hyperz = r300->rws->get_value(r300->rws, R300_CAN_HYPERZ);
     uint32_t hyperz_dcv = hyperz->zb_depthclearvalue;
 
     /* Enable fast Z clear.
      * The zbuffer must be in micro-tiled mode, otherwise it locks up. */
-    if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && has_hyperz) {
+    if ((buffers & PIPE_CLEAR_DEPTHSTENCIL) && can_hyperz) {
         hyperz_dcv = hyperz->zb_depthclearvalue =
             r300_depth_clear_value(fb->zsbuf->format, depth, stencil);
 
@@ -263,10 +263,6 @@ static void r300_clear(struct pipe_context* pipe,
          zstex->hiz_in_use[fb->zsbuf->level])) {
         r300->hyperz_state.dirty = TRUE;
     }
-
-    /* XXX this flush "fixes" a hardlock in the cubestorm xscreensaver */
-    if (r300->flush_counter == 0)
-        pipe->flush(pipe, 0, NULL);
 }
 
 /* Clear a region of a color surface to a constant value. */
@@ -391,9 +387,6 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
         r300_flush_depth_stencil(pipe, src, subsrc, srcz);
     }
     if (old_format != new_format) {
-        dst->format = new_format;
-        src->format = new_format;
-
         r300_texture_reinterpret_format(pipe->screen,
                                         dst, new_format);
         r300_texture_reinterpret_format(pipe->screen,
@@ -404,9 +397,6 @@ static void r300_resource_copy_region(struct pipe_context *pipe,
                         src, subsrc, srcx, srcy, srcz, width, height);
 
     if (old_format != new_format) {
-        dst->format = old_format;
-        src->format = old_format;
-
         r300_texture_reinterpret_format(pipe->screen,
                                         dst, old_format);
         r300_texture_reinterpret_format(pipe->screen,