gallium/util: fix blitter sampler view target initialization
authorRoland Scheidegger <sroland@vmware.com>
Tue, 12 May 2015 15:27:59 +0000 (17:27 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 13 May 2015 20:57:50 +0000 (22:57 +0200)
This was missing, and drivers relying on the target in the view could get
into quite some trouble.

Signed-off-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_blitter.c

index 9d087fe8a66fc9068b5c93a77e50d097e4635a56..24a5b93e1995b610f5b4ed478b94588d96eec27b 100644 (file)
@@ -1306,6 +1306,7 @@ void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ,
                                       unsigned srclevel)
 {
     memset(src_templ, 0, sizeof(*src_templ));
+    src_templ->target = src->target;
     src_templ->format = util_format_linear(src->format);
     src_templ->u.tex.first_level = srclevel;
     src_templ->u.tex.last_level = srclevel;