[Mesa-dev] [PATCH 3/8] panfrost: Specify 3D in texture descriptor

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Fri Jun 14 23:37:11 UTC 2019


Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/include/panfrost-job.h | 3 +++
 src/gallium/drivers/panfrost/pan_context.c          | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h
index e320785542b..d8a6decdc60 100644
--- a/src/gallium/drivers/panfrost/include/panfrost-job.h
+++ b/src/gallium/drivers/panfrost/include/panfrost-job.h
@@ -1119,6 +1119,9 @@ enum mali_wrap_mode {
 
 /* Corresponds to the type passed to glTexImage2D and so forth */
 
+/* For usage1 */
+#define MALI_TEX_3D (0x04)
+
 /* Flags for usage2 */
 #define MALI_TEX_MANUAL_STRIDE (0x20)
 
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 8dbdc84209d..4541b84754c 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -2099,7 +2099,7 @@ panfrost_create_sampler_view(
                         .swizzle = panfrost_translate_swizzle_4(desc->swizzle),
                         .format = format,
 
-                        .usage1 = 0x0,
+                        .usage1 = (texture->target == PIPE_TEXTURE_3D) ? MALI_TEX_3D : 0,
                         .is_not_cubemap = texture->target != PIPE_TEXTURE_CUBE,
 
                         .usage2 = usage2_layout
-- 
2.20.1



More information about the mesa-dev mailing list