OSDN Git Service

nvc0: apply first_layer offset to all resources with array_size
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Tue, 11 Oct 2011 09:41:47 +0000 (11:41 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 21 Oct 2011 21:00:39 +0000 (23:00 +0200)
Makes CUBE arrays work with d3d1x.

src/gallium/drivers/nvc0/nvc0_tex.c

index 143363f..a4573d7 100644 (file)
@@ -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;