diff options
author | Tomeu Vizoso <[email protected]> | 2019-11-05 11:21:47 +0100 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2019-11-06 16:18:46 +0100 |
commit | afeda06062fef3542ca792ace6a15dc78371658b (patch) | |
tree | 17302fb5bf19b5bfd29cf2552c6aafb9cc352880 | |
parent | 9447a84f69c639cdd84fccec7e9447b88be35e30 (diff) |
panfrost: Take into account texture layers in SFBD
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_sfbd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_sfbd.c b/src/gallium/drivers/panfrost/pan_sfbd.c index 2be48e7155f..9fa806a8a1a 100644 --- a/src/gallium/drivers/panfrost/pan_sfbd.c +++ b/src/gallium/drivers/panfrost/pan_sfbd.c @@ -130,14 +130,15 @@ panfrost_sfbd_set_cbuf( struct panfrost_resource *rsrc = pan_resource(surf->texture); unsigned level = surf->u.tex.level; - assert(surf->u.tex.first_layer == 0); + unsigned first_layer = surf->u.tex.first_layer; + assert(surf->u.tex.last_layer == first_layer); + signed stride = rsrc->slices[level].stride; - fb->format = panfrost_sfbd_format(surf); + mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer); - unsigned offset = rsrc->slices[level].offset; - signed stride = rsrc->slices[level].stride; + fb->format = panfrost_sfbd_format(surf); - fb->framebuffer = rsrc->bo->gpu + offset; + fb->framebuffer = base; fb->stride = stride; if (rsrc->layout == PAN_LINEAR) |