panfrost: Set depth for 3D textures on Bifrost

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>
This commit is contained in:
Boris Brezillon 2020-11-17 19:09:26 +01:00
parent 05880bc285
commit 9e3d2a7d9b
2 changed files with 3 additions and 0 deletions

View file

@ -730,6 +730,7 @@
<field name="Maximum LOD" size="13" start="3:16" type="uint" default="0"/>
<field name="Surfaces" size="64" start="4:0" type="address"/>
<field name="Array size" size="16" start="6:0" type="uint" modifier="minus(1)" default="1"/>
<field name="Depth" size="16" start="7:0" type="uint" modifier="minus(1)" default="1"/>
</struct>
<enum name="FP Mode">

View file

@ -474,6 +474,8 @@ panfrost_new_texture_bifrost(
cfg.width = u_minify(width, first_level);
cfg.height = u_minify(height, first_level);
if (dim == MALI_TEXTURE_DIMENSION_3D)
cfg.depth = u_minify(depth, first_level);
cfg.swizzle = swizzle;
cfg.texel_ordering = panfrost_modifier_to_layout(modifier);
cfg.levels = last_level - first_level;