summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-10-11 11:41:47 +0200
committerChristoph Bumiller <[email protected]>2011-10-21 23:00:39 +0200
commit8828004e674b2036c23dd6b4a26cf94b98327792 (patch)
treee1bcf578d0e717d15a64666b5d2fd9823be42f77 /src/gallium/drivers/nvc0
parent840bc04b43a3799eb4fce004672c765e0278fd31 (diff)
nvc0: apply first_layer offset to all resources with array_size
Makes CUBE arrays work with d3d1x.
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_tex.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_tex.c b/src/gallium/drivers/nvc0/nvc0_tex.c
index 143363f9e7f..a4573d7dbf4 100644
--- a/src/gallium/drivers/nvc0/nvc0_tex.c
+++ b/src/gallium/drivers/nvc0/nvc0_tex.c
@@ -113,9 +113,7 @@ nvc0_create_sampler_view(struct pipe_context *pipe,
depth = MAX2(mt->base.base.array_size, mt->base.base.depth0);
- if (mt->base.base.target == PIPE_TEXTURE_1D_ARRAY ||
- /* mt->base.base.target == PIPE_TEXTURE_2D_ARRAY_MS || */
- mt->base.base.target == PIPE_TEXTURE_2D_ARRAY) {
+ if (mt->base.base.array_size > 1) {
/* there doesn't seem to be a base layer field in TIC */
tic[1] = view->pipe.u.tex.first_layer * mt->layer_stride;
depth = view->pipe.u.tex.last_layer - view->pipe.u.tex.first_layer + 1;