st/xa: remove unneeded args
authorRob Clark <robclark@freedesktop.org>
Tue, 8 Apr 2014 20:48:49 +0000 (16:48 -0400)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 17 Apr 2014 07:40:42 +0000 (09:40 +0200)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/state_trackers/xa/xa_composite.c
src/gallium/state_trackers/xa/xa_context.c
src/gallium/state_trackers/xa/xa_priv.h
src/gallium/state_trackers/xa/xa_renderer.c
src/gallium/state_trackers/xa/xa_yuv.c

index abe5be241f1b1eb9c3d88087fd76bd5bb60db9fd..b65f6eb09aababc0525053cd18a2d813cee286df 100644 (file)
@@ -477,8 +477,7 @@ xa_composite_prepare(struct xa_context *ctx,
        return ret;
 
     ctx->dst = dst_srf;
-    renderer_bind_destination(ctx, ctx->srf, ctx->srf->width,
-                             ctx->srf->height);
+    renderer_bind_destination(ctx, ctx->srf);
 
     ret = bind_composite_blend_state(ctx, comp);
     if (ret != XA_ERR_NONE)
index c2dc53bd83a8e52bc533c8d7f6400b5d993e3f9d..ee326762e420ed2deb32bf4cd0a83f227fc90a00 100644 (file)
@@ -281,7 +281,6 @@ xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
 {
     unsigned vs_traits, fs_traits;
     struct xa_shader shader;
-    int width, height;
     int ret;
 
     ret = xa_ctx_srf_create(ctx, dst);
@@ -295,8 +294,6 @@ xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
     ctx->has_solid_color = 1;
 
     ctx->dst = dst;
-    width = ctx->srf->width;
-    height = ctx->srf->height;
 
 #if 0
     debug_printf("Color Pixel=(%d, %d, %d, %d), RGBA=(%f, %f, %f, %f)\n",
@@ -309,7 +306,7 @@ xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
     vs_traits = VS_SOLID_FILL;
     fs_traits = FS_SOLID_FILL;
 
-    renderer_bind_destination(ctx, ctx->srf, width, height);
+    renderer_bind_destination(ctx, ctx->srf);
     bind_solid_blend_state(ctx);
     cso_set_samplers(ctx->cso, PIPE_SHADER_FRAGMENT, 0, NULL);
     cso_set_sampler_views(ctx->cso, PIPE_SHADER_FRAGMENT, 0, NULL);
index b99c2144eb41743cb8ab0738a4f063b8a6200526..8b96bf564175e8043ec1532e07e7988a911d547b 100644 (file)
@@ -236,8 +236,7 @@ void renderer_draw_yuv(struct xa_context *r,
                       struct xa_surface *srf[]);
 
 void renderer_bind_destination(struct xa_context *r,
-                              struct pipe_surface *surface, int width,
-                              int height);
+                              struct pipe_surface *surface);
 
 void renderer_init_state(struct xa_context *r);
 void renderer_copy_prepare(struct xa_context *r,
index 8a122dc2182e30a55aa57f07739ee4d776e87fa5..33ae133dacb782d73d8a48e1113b595895d219b0 100644 (file)
@@ -325,8 +325,10 @@ setup_vertex_data_yuv(struct xa_context *r,
  */
 void
 renderer_bind_destination(struct xa_context *r,
-                         struct pipe_surface *surface, int width, int height)
+                         struct pipe_surface *surface)
 {
+    int width = surface->width;
+    int height = surface->height;
 
     struct pipe_framebuffer_state fb;
     struct pipe_viewport_state viewport;
@@ -406,8 +408,7 @@ renderer_copy_prepare(struct xa_context *r,
                                       PIPE_BIND_RENDER_TARGET));
     (void)screen;
 
-    renderer_bind_destination(r, dst_surface,
-                             dst_surface->width, dst_surface->height);
+    renderer_bind_destination(r, dst_surface);
 
     /* set misc state we care about */
     {
index 9c7c4d68781801f5f22f3e557323012d13b8b073..43f56ff05154d13d0d457a92fad148d1b1ea98ad 100644 (file)
@@ -131,7 +131,7 @@ xa_yuv_planar_blit(struct xa_context *r,
     if (ret != XA_ERR_NONE)
        return -XA_ERR_NORES;
 
-    renderer_bind_destination(r, r->srf, r->srf->width, r->srf->height);
+    renderer_bind_destination(r, r->srf);
     xa_yuv_bind_blend_state(r);
     xa_yuv_bind_shaders(r);
     xa_yuv_bind_samplers(r, yuv);