aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-21 16:20:55 -0400
committerTomeu Vizoso <[email protected]>2020-04-24 06:55:02 +0200
commit36d49b1fb18a9b401c47d53ab75942d496c40e1c (patch)
tree3f4bcf4a2002e0fdddb3360009feffb111f96ea4 /src
parentad4024968eedebc4fd05322c3346c30aa5d4d56d (diff)
panfrost: Identify texture layout field
Signed-off-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4680>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/encoder/pan_texture.c2
-rw-r--r--src/panfrost/include/panfrost-job.h2
-rw-r--r--src/panfrost/pandecode/decode.c11
3 files changed, 6 insertions, 9 deletions
diff --git a/src/panfrost/encoder/pan_texture.c b/src/panfrost/encoder/pan_texture.c
index b0b630c7b93..147cf41c948 100644
--- a/src/panfrost/encoder/pan_texture.c
+++ b/src/panfrost/encoder/pan_texture.c
@@ -271,7 +271,7 @@ panfrost_new_texture_bifrost(
descriptor->width = MALI_POSITIVE(u_minify(width, first_level));
descriptor->height = MALI_POSITIVE(u_minify(height, first_level));
descriptor->swizzle = swizzle;
- descriptor->unk0 = 0x1;
+ descriptor->layout = layout;
descriptor->levels = last_level - first_level;
descriptor->unk1 = 0x0;
descriptor->levels_unk = 0;
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index 5ff3007dbf3..7ab4b4749a8 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -1255,7 +1255,7 @@ struct bifrost_texture_descriptor {
/* OpenGL swizzle */
unsigned swizzle : 12;
- unsigned unk0 : 4; /* 1 */
+ enum mali_texture_layout layout : 4;
uint8_t levels : 8; /* Number of levels-1 if mipmapped, 0 if not */
unsigned unk1 : 4;
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 567da3d13ea..73a5324951b 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -2161,7 +2161,6 @@ pandecode_bifrost_texture(const struct bifrost_texture_descriptor *t, unsigned j
pandecode_prop("width = %" PRId32, t->width);
pandecode_prop("height = %" PRId32, t->height);
pandecode_prop("swizzle = 0x%" PRIx32, t->swizzle);
- pandecode_prop("unk0 = 0x%" PRIx32, t->unk0);
pandecode_prop("levels = %" PRId32, t->levels);
pandecode_prop("unk1 = 0x%" PRIx32, t->unk1);
pandecode_prop("levels_unk = %" PRId32, t->levels_unk);
@@ -2178,19 +2177,17 @@ pandecode_bifrost_texture(const struct bifrost_texture_descriptor *t, unsigned j
bool is_cube = t->type == MALI_TEX_CUBE;
unsigned dimension = is_cube ? 2 : t->type;
-#if 0
/* Print the layout. Default is linear; a modifier can denote AFBC or
* u-interleaved/tiled modes */
- if (f.layout == MALI_TEXTURE_AFBC)
+ if (t->layout == MALI_TEXTURE_AFBC)
pandecode_log_cont("afbc");
- else if (f.layout == MALI_TEXTURE_TILED)
+ else if (t->layout == MALI_TEXTURE_TILED)
pandecode_log_cont("tiled");
- else if (f.layout == MALI_TEXTURE_LINEAR)
+ else if (t->layout == MALI_TEXTURE_LINEAR)
pandecode_log_cont("linear");
else
- pandecode_msg("XXX: invalid texture layout 0x%X\n", f.layout);
-#endif
+ pandecode_msg("XXX: invalid texture layout 0x%X\n", t->layout);
pandecode_swizzle(t->swizzle, t->format);
pandecode_log_cont(" ");