i915: Fix the last of the stride/pitch changes
authorJakob Bornecrantz <jakob@tungstengraphics.com>
Fri, 27 Jun 2008 12:16:42 +0000 (14:16 +0200)
committerJakob Bornecrantz <jakob@tungstengraphics.com>
Fri, 27 Jun 2008 12:33:02 +0000 (14:33 +0200)
src/gallium/drivers/i915simple/i915_surface.c
src/gallium/winsys/dri/intel/intel_screen.c
src/gallium/winsys/dri/intel/intel_swapbuffers.c

index 0061b22f2688ff114efd4f7969452ead8fe32489..4430e8162635ba836a8d7c6f994f5de1e1e83939 100644 (file)
@@ -64,10 +64,10 @@ i915_surface_copy(struct pipe_context *pipe,
       pipe_copy_rect(dst_map,
                      &dst->block,
                      dst->stride,
-                     dstx, dsty, 
-                     width, height, 
-                     src_map, 
-                     do_flip ? -(int) src->stride : src->stride, 
+                     dstx, dsty,
+                     width, height,
+                     src_map,
+                     do_flip ? -(int) src->stride : src->stride,
                      srcx, do_flip ? height - 1 - srcy : srcy);
 
       pipe->screen->surface_unmap(pipe->screen, src);
@@ -79,8 +79,8 @@ i915_surface_copy(struct pipe_context *pipe,
       i915_copy_blit( i915_context(pipe),
                       do_flip,
                       dst->block.size,
-                     (short) src->stride/src->block.size, src->buffer, src->offset,
-                     (short) dst->stride/dst->block.size, dst->buffer, dst->offset,
+                     (short) src->stride, src->buffer, src->offset,
+                     (short) dst->stride, dst->buffer, dst->offset,
                      (short) srcx, (short) srcy, (short) dstx, (short) dsty, (short) width, (short) height );
    }
 }
@@ -106,10 +106,10 @@ i915_surface_fill(struct pipe_context *pipe,
       assert(dst->block.height == 1);
       i915_fill_blit( i915_context(pipe),
                      dst->block.size,
-                     (short) dst->stride/dst->block.size, 
+                     (short) dst->stride,
                      dst->buffer, dst->offset,
-                     (short) dstx, (short) dsty, 
-                     (short) width, (short) height, 
+                     (short) dstx, (short) dsty,
+                     (short) width, (short) height,
                      value );
    }
 }
index 18427a4586fcd3bff9f358561ab266f4dfebc609..89de188ada84333ccad8fafc1a351a7d6fa46de2 100644 (file)
@@ -78,10 +78,10 @@ intelCreateSurface(struct intel_screen *intelScreen, struct pipe_winsys *winsys,
    templat.last_level = 0;
    templat.depth[0] = 1;
    templat.format = PIPE_FORMAT_A8R8G8B8_UNORM;
-   templat.cpp = intelScreen->front.cpp;
    templat.width[0] = intelScreen->front.width;
    templat.height[0] = intelScreen->front.height;
-   pitch = intelScreen->front.pitch / intelScreen->front.cpp;
+   pf_get_block(templat.format, &templat.block);
+   pitch = intelScreen->front.pitch;
 
    texture = screen->texture_blanket(screen,
                                      &templat,
index 7f3babd98ef8f2d3410070f9670d5bab0af05826..f58da97c64a2a2449cf91b904188cbcc163fe56f 100644 (file)
@@ -89,7 +89,7 @@ intelDisplaySurface(__DRIdrawablePrivate *dPriv,
       const drm_clip_rect_t *pbox = dPriv->pClipRects;
       const int pitch = intelScreen->front.pitch / intelScreen->front.cpp;
       const int cpp = intelScreen->front.cpp;
-      const int srcpitch = surf->pitch;
+      const int srcpitch = surf->stride / cpp;
       int BR13, CMD;
       int i;