i965/gs: implement EndPrimitive() functionality in the visitor.
[mesa.git] / src / mesa / drivers / dri / nouveau / nv04_surface.c
index 239d77039b36a70dc8eee0f93e5a72aa4cf8caa4..103453f1b9ad5fe630a83935492e13478c5bf406 100644 (file)
@@ -267,7 +267,6 @@ nv04_surface_copy_swizzle(struct gl_context *ctx,
        if (context_chipset(ctx) < 0x10) {
                BEGIN_NV04(push, NV01_SUBC(SURF, OBJECT), 1);
                PUSH_DATA (push, hw->surf3d->handle);
-               PUSH_KICK(push);
        }
 }
 
@@ -312,9 +311,6 @@ nv04_surface_copy_m2mf(struct gl_context *ctx,
                dst_offset += dst->pitch * count;
                h -= count;
        }
-
-       if (context_chipset(ctx) < 0x10)
-               PUSH_KICK(push);
 }
 
 typedef unsigned (*get_offset_t)(struct nouveau_surface *s,
@@ -397,6 +393,15 @@ nv04_surface_copy(struct gl_context *ctx,
                  int dx, int dy, int sx, int sy,
                  int w, int h)
 {
+       if (_mesa_is_format_compressed(src->format)) {
+               sx = get_format_blocksx(src->format, sx);
+               sy = get_format_blocksy(src->format, sy);
+               dx = get_format_blocksx(dst->format, dx);
+               dy = get_format_blocksy(dst->format, dy);
+               w = get_format_blocksx(src->format, w);
+               h = get_format_blocksy(src->format, h);
+       }
+
        /* Linear texture copy. */
        if ((src->layout == LINEAR && dst->layout == LINEAR) ||
            dst->width <= 2 || dst->height <= 1) {
@@ -453,9 +458,6 @@ nv04_surface_fill(struct gl_context *ctx,
        BEGIN_NV04(push, NV04_GDI(UNCLIPPED_RECTANGLE_POINT(0)), 2);
        PUSH_DATA (push, (dx << 16) | dy);
        PUSH_DATA (push, ( w << 16) |  h);
-
-       if (context_chipset(ctx) < 0x10)
-               PUSH_KICK(push);
 }
 
 void