summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_blit.c4
-rw-r--r--src/gallium/drivers/cell/ppu/cell_surface.c14
-rw-r--r--src/gallium/drivers/i915simple/i915_surface.c3
-rw-r--r--src/gallium/drivers/i965simple/brw_surface.c13
-rw-r--r--src/gallium/drivers/nv04/nv04_surface.c11
-rw-r--r--src/gallium/drivers/nv10/nv10_surface.c11
-rw-r--r--src/gallium/drivers/nv20/nv20_surface.c11
-rw-r--r--src/gallium/drivers/nv30/nv30_surface.c11
-rw-r--r--src/gallium/drivers/nv40/nv40_surface.c11
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c12
-rw-r--r--src/gallium/drivers/r300/r300_surface.c3
-rw-r--r--src/gallium/drivers/softpipe/sp_surface.c13
-rw-r--r--src/gallium/drivers/trace/tr_context.c4
-rw-r--r--src/gallium/include/pipe/p_context.h1
-rw-r--r--src/gallium/state_trackers/egl/egl_surface.c1
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c1
-rw-r--r--src/gallium/state_trackers/python/p_context.i5
-rw-r--r--src/gallium/state_trackers/xorg/xorg_dri2.c2
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c2
-rw-r--r--src/gallium/winsys/drm/nouveau/dri/nouveau_swapbuffers.c2
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c2
21 files changed, 49 insertions, 88 deletions
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index 813e41f1b11..3b3777b8730 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -328,7 +328,7 @@ util_blit_pixels(struct blit_state *ctx,
if(dst->format == src->format && (dstX1 - dstX0) == srcW && (dstY1 - dstY0) == srcH) {
/* FIXME: this will most surely fail for overlapping rectangles */
- pipe->surface_copy(pipe, FALSE,
+ pipe->surface_copy(pipe,
dst, dstX0, dstY0, /* dest */
src, srcX0, srcY0, /* src */
srcW, srcH); /* size */
@@ -362,7 +362,7 @@ util_blit_pixels(struct blit_state *ctx,
PIPE_BUFFER_USAGE_GPU_WRITE);
/* load temp texture */
- pipe->surface_copy(pipe, FALSE,
+ pipe->surface_copy(pipe,
texSurf, 0, 0, /* dest */
src, srcLeft, srcTop, /* src */
srcW, srcH); /* size */
diff --git a/src/gallium/drivers/cell/ppu/cell_surface.c b/src/gallium/drivers/cell/ppu/cell_surface.c
index c9203fee087..ffb8595d828 100644
--- a/src/gallium/drivers/cell/ppu/cell_surface.c
+++ b/src/gallium/drivers/cell/ppu/cell_surface.c
@@ -30,9 +30,21 @@
#include "cell_surface.h"
+static void
+cell_surface_copy(struct pipe_context *pipe,
+ struct pipe_surface *dest, unsigned destx, unsigned desty,
+ struct pipe_surface *src, unsigned srcx, unsigned srcy,
+ unsigned width, unsigned height)
+{
+ util_surface_copy(pipe, FALSE,
+ dest, destx, desty,
+ src, srcx, srcy,
+ width, height);
+}
+
void
cell_init_surface_functions(struct cell_context *cell)
{
- cell->pipe.surface_copy = util_surface_copy;
+ cell->pipe.surface_copy = cell_surface_copy;
cell->pipe.surface_fill = util_surface_fill;
}
diff --git a/src/gallium/drivers/i915simple/i915_surface.c b/src/gallium/drivers/i915simple/i915_surface.c
index 7eec649906c..09b2c499b8f 100644
--- a/src/gallium/drivers/i915simple/i915_surface.c
+++ b/src/gallium/drivers/i915simple/i915_surface.c
@@ -41,7 +41,6 @@
*/
static void
i915_surface_copy(struct pipe_context *pipe,
- boolean do_flip,
struct pipe_surface *dst,
unsigned dstx, unsigned dsty,
struct pipe_surface *src,
@@ -58,7 +57,7 @@ i915_surface_copy(struct pipe_context *pipe,
assert( dst_tex->base.block.height == 1 );
i915_copy_blit( i915_context(pipe),
- do_flip,
+ FALSE,
dst_tex->base.block.size,
(unsigned short) src_tex->stride, src_tex->buffer, src->offset,
(unsigned short) dst_tex->stride, dst_tex->buffer, dst->offset,
diff --git a/src/gallium/drivers/i965simple/brw_surface.c b/src/gallium/drivers/i965simple/brw_surface.c
index 0a95dce1940..511779dbfa0 100644
--- a/src/gallium/drivers/i965simple/brw_surface.c
+++ b/src/gallium/drivers/i965simple/brw_surface.c
@@ -41,7 +41,6 @@
*/
static void
brw_surface_copy(struct pipe_context *pipe,
- boolean do_flip,
struct pipe_surface *dst,
unsigned dstx, unsigned dsty,
struct pipe_surface *src,
@@ -64,11 +63,11 @@ brw_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,
- srcx, do_flip ? height - 1 - srcy : srcy);
+ dstx, dsty,
+ width, height,
+ src_map,
+ src->stride,
+ srcx, srcy);
pipe->screen->surface_unmap(pipe->screen, src);
pipe->screen->surface_unmap(pipe->screen, dst);
@@ -79,7 +78,7 @@ brw_surface_copy(struct pipe_context *pipe,
assert(dst->block.width == 1);
assert(dst->block.height == 1);
brw_copy_blit(brw_context(pipe),
- do_flip,
+ FALSE,
dst->block.size,
(short) src->stride/src->block.size, src_tex->buffer, src->offset, FALSE,
(short) dst->stride/dst->block.size, dst_tex->buffer, dst->offset, FALSE,
diff --git a/src/gallium/drivers/nv04/nv04_surface.c b/src/gallium/drivers/nv04/nv04_surface.c
index 14abf166798..0387ff4e78b 100644
--- a/src/gallium/drivers/nv04/nv04_surface.c
+++ b/src/gallium/drivers/nv04/nv04_surface.c
@@ -33,7 +33,7 @@
#include "util/u_tile.h"
static void
-nv04_surface_copy(struct pipe_context *pipe, boolean do_flip,
+nv04_surface_copy(struct pipe_context *pipe,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -41,15 +41,6 @@ nv04_surface_copy(struct pipe_context *pipe, boolean do_flip,
struct nv04_context *nv04 = nv04_context(pipe);
struct nv04_surface_2d *eng2d = nv04->screen->eng2d;
- if (do_flip) {
- desty += height;
- while (height--) {
- eng2d->copy(eng2d, dest, destx, desty--, src,
- srcx, srcy++, width, 1);
- }
- return;
- }
-
eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
diff --git a/src/gallium/drivers/nv10/nv10_surface.c b/src/gallium/drivers/nv10/nv10_surface.c
index 25381510638..5b52246a9ca 100644
--- a/src/gallium/drivers/nv10/nv10_surface.c
+++ b/src/gallium/drivers/nv10/nv10_surface.c
@@ -33,7 +33,7 @@
#include "util/u_tile.h"
static void
-nv10_surface_copy(struct pipe_context *pipe, boolean do_flip,
+nv10_surface_copy(struct pipe_context *pipe,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -41,15 +41,6 @@ nv10_surface_copy(struct pipe_context *pipe, boolean do_flip,
struct nv10_context *nv10 = nv10_context(pipe);
struct nv04_surface_2d *eng2d = nv10->screen->eng2d;
- if (do_flip) {
- desty += height;
- while (height--) {
- eng2d->copy(eng2d, dest, destx, desty--, src,
- srcx, srcy++, width, 1);
- }
- return;
- }
-
eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
diff --git a/src/gallium/drivers/nv20/nv20_surface.c b/src/gallium/drivers/nv20/nv20_surface.c
index 6cd607583cf..4224bdd6afa 100644
--- a/src/gallium/drivers/nv20/nv20_surface.c
+++ b/src/gallium/drivers/nv20/nv20_surface.c
@@ -33,7 +33,7 @@
#include "util/u_tile.h"
static void
-nv20_surface_copy(struct pipe_context *pipe, boolean do_flip,
+nv20_surface_copy(struct pipe_context *pipe,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -41,15 +41,6 @@ nv20_surface_copy(struct pipe_context *pipe, boolean do_flip,
struct nv20_context *nv20 = nv20_context(pipe);
struct nv04_surface_2d *eng2d = nv20->screen->eng2d;
- if (do_flip) {
- desty += height;
- while (height--) {
- eng2d->copy(eng2d, dest, destx, desty--, src,
- srcx, srcy++, width, 1);
- }
- return;
- }
-
eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
diff --git a/src/gallium/drivers/nv30/nv30_surface.c b/src/gallium/drivers/nv30/nv30_surface.c
index 0f8dc12045a..5e237e13eb5 100644
--- a/src/gallium/drivers/nv30/nv30_surface.c
+++ b/src/gallium/drivers/nv30/nv30_surface.c
@@ -33,7 +33,7 @@
#include "util/u_tile.h"
static void
-nv30_surface_copy(struct pipe_context *pipe, boolean do_flip,
+nv30_surface_copy(struct pipe_context *pipe,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -41,15 +41,6 @@ nv30_surface_copy(struct pipe_context *pipe, boolean do_flip,
struct nv30_context *nv30 = nv30_context(pipe);
struct nv04_surface_2d *eng2d = nv30->screen->eng2d;
- if (do_flip) {
- desty += height;
- while (height--) {
- eng2d->copy(eng2d, dest, destx, desty--, src,
- srcx, srcy++, width, 1);
- }
- return;
- }
-
eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
diff --git a/src/gallium/drivers/nv40/nv40_surface.c b/src/gallium/drivers/nv40/nv40_surface.c
index c4a5fb20d97..1a849da32d7 100644
--- a/src/gallium/drivers/nv40/nv40_surface.c
+++ b/src/gallium/drivers/nv40/nv40_surface.c
@@ -33,7 +33,7 @@
#include "util/u_tile.h"
static void
-nv40_surface_copy(struct pipe_context *pipe, boolean do_flip,
+nv40_surface_copy(struct pipe_context *pipe,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -41,15 +41,6 @@ nv40_surface_copy(struct pipe_context *pipe, boolean do_flip,
struct nv40_context *nv40 = nv40_context(pipe);
struct nv04_surface_2d *eng2d = nv40->screen->eng2d;
- if (do_flip) {
- desty += height;
- while (height--) {
- eng2d->copy(eng2d, dest, destx, desty--, src,
- srcx, srcy++, width, 1);
- }
- return;
- }
-
eng2d->copy(eng2d, dest, destx, desty, src, srcx, srcy, width, height);
}
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index b0936518b03..0cc5168144d 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -144,7 +144,7 @@ nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst,
}
static void
-nv50_surface_copy(struct pipe_context *pipe, boolean flip,
+nv50_surface_copy(struct pipe_context *pipe,
struct pipe_surface *dest, unsigned destx, unsigned desty,
struct pipe_surface *src, unsigned srcx, unsigned srcy,
unsigned width, unsigned height)
@@ -154,16 +154,8 @@ nv50_surface_copy(struct pipe_context *pipe, boolean flip,
assert(src->format == dest->format);
- if (flip) {
- desty += height;
- while (height--) {
- nv50_surface_do_copy(screen, dest, destx, desty--, src,
- srcx, srcy++, width, 1);
- }
- } else {
- nv50_surface_do_copy(screen, dest, destx, desty, src, srcx,
+ nv50_surface_do_copy(screen, dest, destx, desty, src, srcx,
srcy, width, height);
- }
}
static void
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index 938a521b877..a49bec99101 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -253,7 +253,6 @@ static void r300_surface_fill(struct pipe_context* pipe,
}
static void r300_surface_copy(struct pipe_context* pipe,
- boolean do_flip,
struct pipe_surface* dest,
unsigned destx, unsigned desty,
struct pipe_surface* src,
@@ -272,7 +271,7 @@ static void r300_surface_copy(struct pipe_context* pipe,
if (TRUE) {
debug_printf("r300: Falling back on surface_copy\n");
- return util_surface_copy(pipe, do_flip, dest, destx, desty, src,
+ return util_surface_copy(pipe, FALSE, dest, destx, desty, src,
srcx, srcy, w, h);
}
#if 0
diff --git a/src/gallium/drivers/softpipe/sp_surface.c b/src/gallium/drivers/softpipe/sp_surface.c
index 6ade7326982..ef04843f172 100644
--- a/src/gallium/drivers/softpipe/sp_surface.c
+++ b/src/gallium/drivers/softpipe/sp_surface.c
@@ -29,10 +29,21 @@
#include "sp_context.h"
+static void
+sp_surface_copy(struct pipe_context *pipe,
+ struct pipe_surface *dest, unsigned destx, unsigned desty,
+ struct pipe_surface *src, unsigned srcx, unsigned srcy,
+ unsigned width, unsigned height)
+{
+ util_surface_copy(pipe, FALSE,
+ dest, destx, desty,
+ src, srcx, srcy,
+ width, height);
+}
void
sp_init_surface_functions(struct softpipe_context *sp)
{
- sp->pipe.surface_copy = util_surface_copy;
+ sp->pipe.surface_copy = sp_surface_copy;
sp->pipe.surface_fill = util_surface_fill;
}
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 9dcd13f114d..c5bae0eed20 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -911,7 +911,6 @@ trace_context_set_vertex_elements(struct pipe_context *_pipe,
static INLINE void
trace_context_surface_copy(struct pipe_context *_pipe,
- boolean do_flip,
struct pipe_surface *dest,
unsigned destx, unsigned desty,
struct pipe_surface *src,
@@ -927,7 +926,6 @@ trace_context_surface_copy(struct pipe_context *_pipe,
trace_dump_call_begin("pipe_context", "surface_copy");
trace_dump_arg(ptr, pipe);
- trace_dump_arg(bool, do_flip);
trace_dump_arg(ptr, dest);
trace_dump_arg(uint, destx);
trace_dump_arg(uint, desty);
@@ -937,7 +935,7 @@ trace_context_surface_copy(struct pipe_context *_pipe,
trace_dump_arg(uint, width);
trace_dump_arg(uint, height);
- pipe->surface_copy(pipe, do_flip,
+ pipe->surface_copy(pipe,
dest, destx, desty,
src, srcx, srcy, width, height);
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 9454cc87db3..2452bf3522b 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -193,7 +193,6 @@ struct pipe_context {
*/
/*@{*/
void (*surface_copy)(struct pipe_context *pipe,
- boolean do_flip,/**< flip surface contents vertically */
struct pipe_surface *dest,
unsigned destx, unsigned desty,
struct pipe_surface *src, /* don't make this const -
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c
index b8d5f4217f9..e6e80b985aa 100644
--- a/src/gallium/state_trackers/egl/egl_surface.c
+++ b/src/gallium/state_trackers/egl/egl_surface.c
@@ -391,7 +391,6 @@ drm_swap_buffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
if (surf->screen) {
surf->user->pipe->flush(surf->user->pipe, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE, NULL);
surf->user->pipe->surface_copy(surf->user->pipe,
- 0,
surf->screen->surface,
0, 0,
back_surf,
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index c590d5b296d..7f32b460aae 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -1143,7 +1143,6 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height )
return;
pipe->surface_copy(pipe,
- FALSE,
surf_front, x, y, /* dest */
surf_back, x, y, /* src */
width, height);
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 7b8b64b5923..d1729a46871 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -266,13 +266,12 @@ error1:
* Surface functions
*/
- void surface_copy(int do_flip,
- struct pipe_surface *dest,
+ void surface_copy(struct pipe_surface *dest,
unsigned destx, unsigned desty,
struct pipe_surface *src,
unsigned srcx, unsigned srcy,
unsigned width, unsigned height) {
- $self->pipe->surface_copy($self->pipe, do_flip, dest, destx, desty, src, srcx, srcy, width, height);
+ $self->pipe->surface_copy($self->pipe, dest, destx, desty, src, srcx, srcy, width, height);
}
void surface_fill(struct pipe_surface *dst,
diff --git a/src/gallium/state_trackers/xorg/xorg_dri2.c b/src/gallium/state_trackers/xorg/xorg_dri2.c
index b9993b1ea1b..d04204e1bfd 100644
--- a/src/gallium/state_trackers/xorg/xorg_dri2.c
+++ b/src/gallium/state_trackers/xorg/xorg_dri2.c
@@ -173,7 +173,7 @@ driCopyRegion(DrawablePtr pDraw, RegionPtr pRegion,
ms->screen->get_tex_surface(ms->screen, src_priv->tex, 0, 0, 0,
PIPE_BUFFER_USAGE_GPU_READ);
- ms->ctx->surface_copy(ms->ctx, 0, dst_surf, 0, 0, src_surf,
+ ms->ctx->surface_copy(ms->ctx, dst_surf, 0, 0, src_surf,
0, 0, pDraw->width, pDraw->height);
pipe_surface_reference(&dst_surf, NULL);
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index c5f12939512..56c8fdccb28 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -283,7 +283,7 @@ ExaCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
PIPE_BUFFER_USAGE_GPU_READ |
PIPE_BUFFER_USAGE_GPU_WRITE);
- exa->ctx->surface_copy(exa->ctx, 0, surf, dstX, dstY, priv->src_surf,
+ exa->ctx->surface_copy(exa->ctx, surf, dstX, dstY, priv->src_surf,
srcX, srcY, width, height);
exa->scrn->tex_surface_destroy(surf);
}
diff --git a/src/gallium/winsys/drm/nouveau/dri/nouveau_swapbuffers.c b/src/gallium/winsys/drm/nouveau/dri/nouveau_swapbuffers.c
index 58cb6f7265c..3cac722b4a8 100644
--- a/src/gallium/winsys/drm/nouveau/dri/nouveau_swapbuffers.c
+++ b/src/gallium/winsys/drm/nouveau/dri/nouveau_swapbuffers.c
@@ -39,7 +39,7 @@ nouveau_copy_buffer(__DRIdrawablePrivate *dPriv, struct pipe_surface *surf,
w = pbox->x2 - pbox->x1;
h = pbox->y2 - pbox->y1;
- pipe->surface_copy(pipe, FALSE, nv->base.frontbuffer,
+ pipe->surface_copy(pipe, nv->base.frontbuffer,
dx, dy, surf, sx, sy, w, h);
}
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c
index 864be37871f..77e46a2054b 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c
@@ -31,7 +31,7 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
w = pbox->x2 - pbox->x1;
h = pbox->y2 - pbox->y1;
- pipe->surface_copy(pipe, FALSE, nv->base.frontbuffer,
+ pipe->surface_copy(pipe, nv->base.frontbuffer,
dx, dy, surf, sx, sy, w, h);
}