gallium/u_blit: drop not-very-useful wrapper around util_blit_pixels_writemask
authorMarek Olšák <maraeo@gmail.com>
Sun, 8 Jul 2012 23:20:11 +0000 (01:20 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 12 Jul 2012 00:08:30 +0000 (02:08 +0200)
just rename it to util_blit_pixels

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/auxiliary/postprocess/pp_mlaa.c
src/gallium/auxiliary/postprocess/pp_run.c
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_blit.h
src/mesa/state_tracker/st_cb_blit.c
src/mesa/state_tracker/st_cb_texture.c

index b61cbaafb5e9529582bd8703e23528ec2033e90a..80db86227fffee5e282a0880376440eb52240734 100644 (file)
@@ -178,7 +178,8 @@ pp_jimenezmlaa_run(struct pp_queue_t *ppq, struct pipe_resource *in,
    /* Blit the input to the output */
    util_blit_pixels(p->blitctx, in, 0, 0, 0,
                     w, h, 0, p->framebuffer.cbufs[0],
-                    0, 0, w, h, 0, PIPE_TEX_MIPFILTER_NEAREST);
+                    0, 0, w, h, 0, PIPE_TEX_MIPFILTER_NEAREST,
+                    TGSI_WRITEMASK_XYZW);
 
    u_sampler_view_default_template(&v_tmp, in, in->format);
    arr[0] = p->pipe->create_sampler_view(p->pipe, in, &v_tmp);
index 89b88a5214c393d201d897b1cbad57c55c20afc0..9d0bfdf81ffd2dea147e8df10d04916df1a9b115 100644 (file)
@@ -59,7 +59,8 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in,
 
       util_blit_pixels(ppq->p->blitctx, in, 0, 0, 0,
                        w, h, 0, ppq->tmps[0],
-                       0, 0, w, h, 0, PIPE_TEX_MIPFILTER_NEAREST);
+                       0, 0, w, h, 0, PIPE_TEX_MIPFILTER_NEAREST,
+                       TGSI_WRITEMASK_XYZW);
 
       in = ppq->tmp[0];
    }
index 9a3ff7a24f68b81867de93f27caf33a59403a2cf..469f24918fd4a4ab53d6373ecad8ab5a07340c94 100644 (file)
@@ -367,17 +367,17 @@ formats_compatible(enum pipe_format src_format,
  * XXX need some control over blitting stencil.
  */
 void
-util_blit_pixels_writemask(struct blit_state *ctx,
-                           struct pipe_resource *src_tex,
-                           unsigned src_level,
-                           int srcX0, int srcY0,
-                           int srcX1, int srcY1,
-                           int srcZ0,
-                           struct pipe_surface *dst,
-                           int dstX0, int dstY0,
-                           int dstX1, int dstY1,
-                           float z, uint filter,
-                           uint writemask)
+util_blit_pixels(struct blit_state *ctx,
+                 struct pipe_resource *src_tex,
+                 unsigned src_level,
+                 int srcX0, int srcY0,
+                 int srcX1, int srcY1,
+                 int srcZ0,
+                 struct pipe_surface *dst,
+                 int dstX0, int dstY0,
+                 int dstX1, int dstY1,
+                 float z, uint filter,
+                 uint writemask)
 {
    struct pipe_context *pipe = ctx->pipe;
    struct pipe_screen *screen = pipe->screen;
@@ -660,31 +660,6 @@ util_blit_pixels_writemask(struct blit_state *ctx,
 }
 
 
-void
-util_blit_pixels(struct blit_state *ctx,
-                 struct pipe_resource *src_tex,
-                 unsigned src_level,
-                 int srcX0, int srcY0,
-                 int srcX1, int srcY1,
-                 int srcZ,
-                 struct pipe_surface *dst,
-                 int dstX0, int dstY0,
-                 int dstX1, int dstY1,
-                 float z, uint filter )
-{
-   util_blit_pixels_writemask( ctx, src_tex,
-                               src_level,
-                               srcX0, srcY0,
-                               srcX1, srcY1,
-                               srcZ,
-                               dst,
-                               dstX0, dstY0,
-                               dstX1, dstY1,
-                               z, filter,
-                               TGSI_WRITEMASK_XYZW );
-}
-
-
 /**
  * Copy pixel block from src texture to dst surface.
  * The sampler view's first_level field indicates the source
index 810d01b0486607c9bf96c09c6dbcc6217f6209f3..f26d429ace735947da82eeb158100a446d0fef08 100644 (file)
@@ -31,6 +31,8 @@
 
 
 #include "pipe/p_compiler.h"
+/* for TGSI_WRITEMASK_* specification in util_blit_pixels */
+#include "pipe/p_shader_tokens.h"
 
 
 #ifdef __cplusplus
@@ -61,20 +63,8 @@ util_blit_pixels(struct blit_state *ctx,
                  struct pipe_surface *dst,
                  int dstX0, int dstY0,
                  int dstX1, int dstY1,
-                 float z, uint filter);
-
-void
-util_blit_pixels_writemask(struct blit_state *ctx,
-                           struct pipe_resource *src_tex,
-                           unsigned src_level,
-                           int srcX0, int srcY0,
-                           int srcX1, int srcY1,
-                           int srcZ0,
-                           struct pipe_surface *dst,
-                           int dstX0, int dstY0,
-                           int dstX1, int dstY1,
-                           float z, uint filter,
-                           uint writemask);
+                 float z, uint filter,
+                 uint writemask);
 
 extern void
 util_blit_pixels_tex(struct blit_state *ctx,
index 27da2c6330acbd7b1a9acdb953e1736a313c3aaa..4547ba7936fd43edb90cee2c334df03dbec89c0c 100644 (file)
@@ -242,7 +242,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
                           srcX0, srcY0, srcX1, srcY1,
                           srcAtt->Zoffset + srcAtt->CubeMapFace,
                           dstSurf, dstX0, dstY0, dstX1, dstY1,
-                          0.0, pFilter);
+                          0.0, pFilter, TGSI_WRITEMASK_XYZW);
       }
       else {
          struct st_renderbuffer *srcRb =
@@ -257,7 +257,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
                           srcX0, srcY0, srcX1, srcY1,
                           srcSurf->u.tex.first_layer,
                           dstSurf, dstX0, dstY0, dstX1, dstY1,
-                          0.0, pFilter);
+                          0.0, pFilter, TGSI_WRITEMASK_XYZW);
       }
    }
 
@@ -294,7 +294,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
                           srcX0, srcY0, srcX1, srcY1,
                           srcDepthRb->surface->u.tex.first_layer,
                           dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
-                          0.0, pFilter);
+                          0.0, pFilter, TGSI_WRITEMASK_XYZW);
       }
       else {
          /* blitting depth and stencil separately */
@@ -305,7 +305,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
                              srcX0, srcY0, srcX1, srcY1,
                              srcDepthRb->surface->u.tex.first_layer,
                              dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
-                             0.0, pFilter);
+                             0.0, pFilter, TGSI_WRITEMASK_XYZW);
          }
 
          if (mask & GL_STENCIL_BUFFER_BIT) {
index 67c3f9590123d9d943d197f577c70839e105ba0e..a1d6951c1a287ea6a2dab0843aa979601c5296cb 100644 (file)
@@ -1066,17 +1066,17 @@ st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
 
    dest_surface = pipe->create_surface(pipe, stImage->pt,
                                        &surf_tmpl);
-   util_blit_pixels_writemask(st->blit,
-                              strb->texture,
-                              strb->surface->u.tex.level,
-                              srcX, srcY0,
-                              srcX + width, srcY1,
-                              strb->surface->u.tex.first_layer,
-                              dest_surface,
-                              destX, destY,
-                              destX + width, destY + height,
-                              0.0, PIPE_TEX_MIPFILTER_NEAREST,
-                              format_writemask);
+   util_blit_pixels(st->blit,
+                    strb->texture,
+                    strb->surface->u.tex.level,
+                    srcX, srcY0,
+                    srcX + width, srcY1,
+                    strb->surface->u.tex.first_layer,
+                    dest_surface,
+                    destX, destY,
+                    destX + width, destY + height,
+                    0.0, PIPE_TEX_MIPFILTER_NEAREST,
+                    format_writemask);
    pipe_surface_reference(&dest_surface, NULL);
 
    /* Restore conditional rendering state. */