diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-07 16:00:49 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-17 08:22:37 -0700 |
commit | 8d1adc091bf4e722fed93d8d8d826a80768eca59 (patch) | |
tree | 6aa6d142f5005b39d18f3d5c24321aac072a0d4a /src/gallium/drivers/panfrost/include | |
parent | 0219b995003516aa6d2f8bb5ce6e0b02df2e835b (diff) |
panfrost: Enable helper invocations when texturing
it turns out we have explicit control over helper invocations; if a
particular bit in the fragment shader descriptor is set, helper
invocations are launched; if it clear, they are not. Helper invocations
are required whenever computing derivatives, whether explicitly
(dFdx/dFdy) *or* implicitly (any texturing). Accordingly, we set this
bit when texturing to fix edge case behaviour (literally, haha).
Thank you to Jason Ekstrand and Ilia Mirkin for pointing out the
representative dEQP test failed along triangle edges and for suggesting
helper invocations / derivatives as a list of suspect pieces (which led
to discovering the helper invocations enable bit in the first place).
Ideally we would use the new NIR analysis pass for this, but that hasn't
landed quite yet.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/include')
-rw-r--r-- | src/gallium/drivers/panfrost/include/panfrost-job.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h index e320785542b..4b8272fd959 100644 --- a/src/gallium/drivers/panfrost/include/panfrost-job.h +++ b/src/gallium/drivers/panfrost/include/panfrost-job.h @@ -403,7 +403,19 @@ enum mali_format { #define MALI_GET_ALPHA_COVERAGE(nibble) ((float) nibble / 15.0f) /* Applies to unknown1 */ -#define MALI_NO_ALPHA_TO_COVERAGE (1 << 10) + +/* Should the hardware perform early-Z testing? Normally should be set + * for performance reasons. Clear if you use: discard, + * alpha-to-coverage... * It's also possible this disables + * forward-pixel kill; we're not quite sure which bit is which yet. + * TODO: How does this interact with blending?*/ + +#define MALI_EARLY_Z (1 << 10) + +/* Should the hardware calculate derivatives (via helper invocations)? Set in a + * fragment shader that uses texturing or derivative functions */ + +#define MALI_HELPER_INVOCATIONS (1 << 11) /* Flags denoting the fragment shader's use of tilebuffer readback. If the * shader might read any part of the tilebuffer, set MALI_READS_TILEBUFFER. If |