diff options
author | Eric Anholt <[email protected]> | 2020-04-14 16:34:00 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-01 16:26:32 +0000 |
commit | 8c1c21890969ce0f6e0df28522f04cdcd7dd482f (patch) | |
tree | 7b7f7c094094fee0284dc8585463d4895fd66c0f /src/compiler/shader_enums.h | |
parent | 6f1e3235f246048061d3126757d875d1ec05cccc (diff) |
freedreno/ir3: Improve shader key normalization.
We can remove a bunch of conditional code at key comparison time by
computing a bitmask of used key bits at ir3_shader creation time. This
also gives us a nice place to put additional key simplification to reduce
how many variants we create (like skipping rastflat if we don't read
colors in the FS, or skipping vclamp_color if we don't write colors).
It does mean walking the whole key to AND it, but the key is just 28 bytes
so far so that seems pretty fine.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4562>
Diffstat (limited to 'src/compiler/shader_enums.h')
-rw-r--r-- | src/compiler/shader_enums.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 56062894a94..b33a91727a1 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -329,6 +329,10 @@ const char *gl_varying_slot_name(gl_varying_slot slot); #define VARYING_BIT_PSIZ BITFIELD64_BIT(VARYING_SLOT_PSIZ) #define VARYING_BIT_BFC0 BITFIELD64_BIT(VARYING_SLOT_BFC0) #define VARYING_BIT_BFC1 BITFIELD64_BIT(VARYING_SLOT_BFC1) +#define VARYING_BITS_COLOR (VARYING_BIT_COL0 | \ + VARYING_BIT_COL1 | \ + VARYING_BIT_BFC0 | \ + VARYING_BIT_BFC1) #define VARYING_BIT_EDGE BITFIELD64_BIT(VARYING_SLOT_EDGE) #define VARYING_BIT_CLIP_VERTEX BITFIELD64_BIT(VARYING_SLOT_CLIP_VERTEX) #define VARYING_BIT_CLIP_DIST0 BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST0) |