summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-06-24 14:53:54 -0700
committerAlyssa Rosenzweig <[email protected]>2019-06-25 13:39:18 -0700
commitb96f119d853203945c4174145679669afabc1edf (patch)
treeb77899bd75746cf2d007f4908534160947eaeaee /src
parent0ad17f56ae2357af585766367d62cefd75429383 (diff)
panfrost: Honour first_layer...last_layer when sampling
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index c8d41326150..f20caaad07d 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -831,6 +831,8 @@ panfrost_upload_tex(
assert(pview->target != PIPE_BUFFER);
unsigned first_level = pview->u.tex.first_level;
unsigned last_level = pview->u.tex.last_level;
+ unsigned first_layer = pview->u.tex.first_layer;
+ unsigned last_layer = pview->u.tex.last_layer;
/* Inject the addresses in, interleaving mip levels, cube faces, and
* strides in that order */
@@ -838,7 +840,7 @@ panfrost_upload_tex(
unsigned idx = 0;
for (unsigned l = first_level; l <= last_level; ++l) {
- for (unsigned f = 0; f < pview->texture->array_size; ++f) {
+ for (unsigned f = first_layer; f <= last_layer; ++f) {
view->hw.payload[idx++] =
panfrost_get_texture_address(rsrc, l, f);