summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-05-02 17:57:43 -0600
committerBrian Paul <brianp@vmware.com>2016-05-03 15:40:48 -0600
commitb94f73c15066d434e44b60ddddb1d837b841c08f (patch)
tree49b01ccbcd4c2c8c32f3b0daf5d87ad2201a9b25 /src/gallium/drivers/svga
parent8842be1132ccbcf45ebf65bfd048e20d0b7fff92 (diff)
svga: clean up svga_pipe_blit.c
Remove dead code. Fix formatting. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_blit.c81
1 files changed, 13 insertions, 68 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c
index 2b34f964096..925f9729f0a 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -36,21 +36,17 @@
#define FILE_DEBUG_FLAG DEBUG_BLIT
-/* XXX still have doubts about this... */
-static void svga_surface_copy(struct pipe_context *pipe,
- struct pipe_resource* dst_tex,
- unsigned dst_level,
- unsigned dstx, unsigned dsty, unsigned dstz,
- struct pipe_resource* src_tex,
- unsigned src_level,
- const struct pipe_box *src_box)
+static void
+svga_surface_copy(struct pipe_context *pipe,
+ struct pipe_resource* dst_tex,
+ unsigned dst_level,
+ unsigned dstx, unsigned dsty, unsigned dstz,
+ struct pipe_resource* src_tex,
+ unsigned src_level,
+ const struct pipe_box *src_box)
{
struct svga_context *svga = svga_context(pipe);
struct svga_texture *stex, *dtex;
-/* struct pipe_screen *screen = pipe->screen;
- SVGA3dCopyBox *box;
- enum pipe_error ret;
- struct pipe_surface *srcsurf, *dstsurf;*/
unsigned dst_face, dst_z, src_face, src_z;
/* Emit buffered drawing commands, and any back copies.
@@ -67,58 +63,6 @@ static void svga_surface_copy(struct pipe_context *pipe,
stex = svga_texture(src_tex);
dtex = svga_texture(dst_tex);
-#if 0
- srcsurf = screen->get_tex_surface(screen, src_tex,
- src_level, src_box->z, src_box->z,
- PIPE_BIND_SAMPLER_VIEW);
-
- dstsurf = screen->get_tex_surface(screen, dst_tex,
- dst_level, dst_box->z, dst_box->z,
- PIPE_BIND_RENDER_TARGET);
-
- SVGA_DBG(DEBUG_DMA, "blit to sid %p (%d,%d), from sid %p (%d,%d) sz %dx%d\n",
- svga_surface(dstsurf)->handle,
- dstx, dsty,
- svga_surface(srcsurf)->handle,
- src_box->x, src_box->y,
- width, height);
-
- ret = SVGA3D_BeginSurfaceCopy(svga->swc,
- srcsurf,
- dstsurf,
- &box,
- 1);
- if(ret != PIPE_OK) {
-
- svga_context_flush(svga, NULL);
-
- ret = SVGA3D_BeginSurfaceCopy(svga->swc,
- srcsurf,
- dstsurf,
- &box,
- 1);
- assert(ret == PIPE_OK);
- }
-
- box->x = dstx;
- box->y = dsty;
- box->z = 0;
- box->w = width;
- box->h = height;
- box->d = 1;
- box->srcx = src_box->x;
- box->srcy = src_box->y;
- box->srcz = 0;
-
- SVGA_FIFOCommitAll(svga->swc);
-
- svga_surface(dstsurf)->dirty = TRUE;
- svga_propagate_surface(pipe, dstsurf);
-
- pipe_surface_reference(&srcsurf, NULL);
- pipe_surface_reference(&dstsurf, NULL);
-
-#else
if (src_tex->target == PIPE_TEXTURE_CUBE) {
src_face = src_box->z;
src_z = 0;
@@ -128,6 +72,7 @@ static void svga_surface_copy(struct pipe_context *pipe,
src_face = 0;
src_z = src_box->z;
}
+
/* different src/dst type???*/
if (dst_tex->target == PIPE_TEXTURE_CUBE) {
dst_face = dstz;
@@ -138,6 +83,7 @@ static void svga_surface_copy(struct pipe_context *pipe,
dst_face = 0;
dst_z = dstz;
}
+
svga_texture_copy_handle(svga,
stex->handle,
src_box->x, src_box->y, src_z,
@@ -147,15 +93,14 @@ static void svga_surface_copy(struct pipe_context *pipe,
dst_level, dst_face,
src_box->width, src_box->height, src_box->depth);
-#endif
-
/* Mark the destination image as being defined */
svga_define_texture_level(dtex, dst_face, dst_level);
}
-static void svga_blit(struct pipe_context *pipe,
- const struct pipe_blit_info *blit_info)
+static void
+svga_blit(struct pipe_context *pipe,
+ const struct pipe_blit_info *blit_info)
{
struct svga_context *svga = svga_context(pipe);
struct pipe_blit_info info = *blit_info;