diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-29 14:07:19 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-30 10:01:19 -0700 |
commit | 07144818941900f03865a067ac78d01929106d68 (patch) | |
tree | 18da3c02f3ff700d7f97fbb042fcf1d5a8f775bd /src/panfrost | |
parent | a094928abcbab7f7e1d81704b616605a4521dc1a (diff) |
pan/midgard: Add support for disassembling derivatives
They're just texture ops.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/disassemble.c | 2 | ||||
-rw-r--r-- | src/panfrost/midgard/midgard.h | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c index acc1f408e98..eb6b98a94bd 100644 --- a/src/panfrost/midgard/disassemble.c +++ b/src/panfrost/midgard/disassemble.c @@ -1074,6 +1074,8 @@ print_texture_op(unsigned op, bool gather) DEFINE_CASE(TEXTURE_OP_NORMAL, "texture"); DEFINE_CASE(TEXTURE_OP_LOD, "textureLod"); DEFINE_CASE(TEXTURE_OP_TEXEL_FETCH, "texelFetch"); + DEFINE_CASE(TEXTURE_OP_DFDX, "dFdx"); + DEFINE_CASE(TEXTURE_OP_DFDY, "dFdy"); default: printf("tex_%d", op); diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h index 84b9aa2fe08..d0e15ce86d1 100644 --- a/src/panfrost/midgard/midgard.h +++ b/src/panfrost/midgard/midgard.h @@ -541,6 +541,16 @@ midgard_tex_register_select; #define TEXTURE_OP_LOD 0x12 /* textureLod */ #define TEXTURE_OP_TEXEL_FETCH 0x14 /* texelFetch */ +/* Computes horizontal and vertical derivatives respectively. Use with a float + * sampler and a "2D" texture. Leave texture/sampler IDs as zero; they ought + * to be ignored. Only works for fp32 on 64-bit at a time, so derivatives of a + * vec4 require 2 texture ops. For some reason, the blob computes both X and Y + * derivatives at the same time and just throws out whichever is unused; it's + * not known if this is a quirk of the hardware or just of the blob. */ + +#define TEXTURE_OP_DFDX 0x0D +#define TEXTURE_OP_DFDY 0x1D + enum mali_sampler_type { MALI_SAMPLER_UNK = 0x0, MALI_SAMPLER_FLOAT = 0x1, /* sampler */ |