nvc0: use correct resource target to select blit shader
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Mon, 7 Jan 2013 21:12:28 +0000 (22:12 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 8 Jan 2013 15:13:52 +0000 (16:13 +0100)
src/gallium/drivers/nvc0/nvc0_surface.c

index 2f81cf5c61ecc35ca4acb200090c348bc57791cb..591f67c07dc1990877a7c61d6de7c9d6ade6c22c 100644 (file)
@@ -544,7 +544,7 @@ nvc0_blit_select_fp(struct nvc0_blitctx *ctx, const struct pipe_blit_info *info)
    struct nvc0_blitter *blitter = ctx->nvc0->screen->blitter;
 
    const enum pipe_texture_target ptarg =
-      nv50_blit_reinterpret_pipe_texture_target(info->dst.resource->target);
+      nv50_blit_reinterpret_pipe_texture_target(info->src.resource->target);
 
    const unsigned targ = nv50_blit_texture_type(ptarg);
    const unsigned mode = ctx->mode;
@@ -553,7 +553,7 @@ nvc0_blit_select_fp(struct nvc0_blitctx *ctx, const struct pipe_blit_info *info)
       pipe_mutex_lock(blitter->mutex);
       if (!blitter->fp[targ][mode])
          blitter->fp[targ][mode] =
-            nv50_blitter_make_fp(&ctx->nvc0->base.pipe, mode, targ);
+            nv50_blitter_make_fp(&ctx->nvc0->base.pipe, mode, ptarg);
       pipe_mutex_unlock(blitter->mutex);
    }
    ctx->fp = blitter->fp[targ][mode];