From 661123bb19d4f17c895a3fe166b3f87ddb2191eb Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 28 Aug 2020 08:53:44 -0400 Subject: [PATCH] pan/mdg: Add disassembly for shadow gathers By applying `textureGather` to a `sampler2DShadow`, the blob produces (under the old disassembly): tex_22.vtx.2d.shadow.cont.last r29, texture0, fsampler0.zwyx, r29, The op 0x22 is 10|0010 in binary, the old shadow parameter is 1, and old gather parameter is 0, so we get 0110|0010 in binary, or an op of textureLod with a mod of 0110 = 6. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/midgard/disassemble.c | 1 + src/panfrost/midgard/midgard.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c index 5568fa03663..e872ea9923c 100644 --- a/src/panfrost/midgard/disassemble.c +++ b/src/panfrost/midgard/disassemble.c @@ -1385,6 +1385,7 @@ texture_mode(enum mali_texture_mode mode) switch (mode) { case TEXTURE_NORMAL: return ""; case TEXTURE_SHADOW: return ".shadow"; + case TEXTURE_GATHER_SHADOW: return ".gather.shadow"; case TEXTURE_GATHER_X: return ".gatherX"; case TEXTURE_GATHER_Y: return ".gatherY"; case TEXTURE_GATHER_Z: return ".gatherZ"; diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h index 6308e89e916..656881c7ff3 100644 --- a/src/panfrost/midgard/midgard.h +++ b/src/panfrost/midgard/midgard.h @@ -651,6 +651,7 @@ enum mali_sampler_type { enum mali_texture_mode { TEXTURE_NORMAL = 1, TEXTURE_SHADOW = 5, + TEXTURE_GATHER_SHADOW = 6, TEXTURE_GATHER_X = 8, TEXTURE_GATHER_Y = 9, TEXTURE_GATHER_Z = 10, -- 2.30.2