From f500f3a72c6be61ff9b8e1166f734e408d00aded Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 13 Mar 2009 10:38:41 +0000 Subject: gallium: Remove do_flip argument from surface_copy I should have gotten most uses and implementation correctly fixed, but things might break. Feel free to blame me. --- src/mesa/state_tracker/st_atom_framebuffer.c | 1 - src/mesa/state_tracker/st_cb_drawpixels.c | 1 - src/mesa/state_tracker/st_cb_texture.c | 9 +++------ src/mesa/state_tracker/st_texture.c | 1 - 4 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index 625efdd66b..b32009c19b 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -154,7 +154,6 @@ update_framebuffer_state( struct st_context *st ) (void) st_get_framebuffer_surface(stfb, ST_SURFACE_BACK_LEFT, &surf_back); st->pipe->surface_copy(st->pipe, - FALSE, surf_front, 0, 0, /* dest */ surf_back, 0, 0, /* src */ fb->Width, fb->Height); diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index f666eb4ae8..821ea67ce4 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -916,7 +916,6 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, struct pipe_surface *psTex = screen->get_tex_surface(screen, pt, 0, 0, 0, PIPE_BUFFER_USAGE_GPU_WRITE ); pipe->surface_copy(pipe, - FALSE, psTex, /* dest */ 0, 0, /* destx/y */ psRead, diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index c805e399de..71640d78f7 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1089,21 +1089,19 @@ st_copy_texsubimage(GLcontext *ctx, if (matching_base_formats && ctx->_ImageTransferState == 0x0) { /* try potential hardware path */ struct pipe_surface *dest_surface = NULL; + boolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP); - if (src_format == dest_format) { + if (src_format == dest_format && !do_flip) { /* use surface_copy() / blit */ - boolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP); + dest_surface = screen->get_tex_surface(screen, stImage->pt, stImage->face, stImage->level, destZ, PIPE_BUFFER_USAGE_GPU_WRITE); - if (do_flip) - srcY = strb->surface->height - srcY - height; /* for surface_copy(), y=0=top, always */ pipe->surface_copy(pipe, - do_flip, /* dest */ dest_surface, destX, destY, @@ -1123,7 +1121,6 @@ st_copy_texsubimage(GLcontext *ctx, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) { /* draw textured quad to do the copy */ - boolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP); int srcY0, srcY1; dest_surface = screen->get_tex_surface(screen, stImage->pt, diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 20c34cd80a..30b95bebab 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -342,7 +342,6 @@ st_texture_image_copy(struct pipe_context *pipe, PIPE_BUFFER_USAGE_GPU_READ); pipe->surface_copy(pipe, - FALSE, dst_surface, 0, 0, /* destX, Y */ src_surface, -- cgit v1.2.3