summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/include/panfrost-job.h3
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h
index 4b8272fd959..17a5d8f0e50 100644
--- a/src/gallium/drivers/panfrost/include/panfrost-job.h
+++ b/src/gallium/drivers/panfrost/include/panfrost-job.h
@@ -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)
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 7004fb14cac..d7591eae7b9 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -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