summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-08-20 19:45:10 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2014-09-12 00:54:55 -0400
commitc113095acdcfedb4ad82da67bc7981056efe9e44 (patch)
tree9fca2a38a412dac43b9de31949f11157faca1aaa /src/gallium/auxiliary
parent3c81de58512f0615df1d90aa79a22c9a44c7189e (diff)
gallium: add a texture target to sampler view and a CAP to use it
This allows a sampler view to have a different texture target than the underlying resource. This will be used to implement the type casting between 2d arrays and cube maps as specified in ARB_texture_view. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_sampler.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_sampler.c b/src/gallium/auxiliary/util/u_sampler.c
index 227641bdafc..86799fdd559 100644
--- a/src/gallium/auxiliary/util/u_sampler.c
+++ b/src/gallium/auxiliary/util/u_sampler.c
@@ -45,6 +45,7 @@ default_template(struct pipe_sampler_view *view,
/* XXX: Check if format is compatible with texture->format.
*/
+ view->target = texture->target;
view->format = format;
view->u.tex.first_level = 0;
view->u.tex.last_level = texture->last_level;