Mesa (master): panfrost: Specify 3D in texture descriptor
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 17 15:37:42 UTC 2019
Module: Mesa
Branch: master
Commit: 36a7b2b01875ea6bb3ce48244504aa51a43b1f18
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=36a7b2b01875ea6bb3ce48244504aa51a43b1f18
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Jun 14 16:07:15 2019 -0700
panfrost: Specify 3D in texture descriptor
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 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
More information about the mesa-commit
mailing list