OSDN Git Service

panfrost: Specify 3D in texture descriptor
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 14 Jun 2019 23:07:15 +0000 (16:07 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 17 Jun 2019 15:28:13 +0000 (08:28 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/include/panfrost-job.h
src/gallium/drivers/panfrost/pan_context.c

index 4b8272f..17a5d8f 100644 (file)
@@ -1131,6 +1131,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)
 
index 7004fb1..d7591ea 100644 (file)
@@ -2107,7 +2107,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