diff options
author | Boris Brezillon <[email protected]> | 2019-11-04 11:57:22 +0100 |
---|---|---|
committer | Boris Brezillon <[email protected]> | 2019-11-04 16:14:09 +0100 |
commit | 28440820eff55d412fbce3243c24bc9f58c3b8e6 (patch) | |
tree | 150ae1f0d7853ca41f6e6cad9a9ee3fc6a8dd383 /src/panfrost | |
parent | 71634b10032d48dd43941390e556a89fe5d858f6 (diff) |
panfrost: MALI_DEPTH_TEST is actually MALI_DEPTH_WRITEMASK
MALI_DEPTH_TEST should only be set when depth->writemask is true,
not when the depth test is enabled. Let's rename the flag and patch
panfrost_bind_depth_stencil_state() to do the right thing.
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/include/panfrost-job.h | 2 | ||||
-rw-r--r-- | src/panfrost/pandecode/decode.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index 2e766a0c56f..286c663e41e 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -123,7 +123,7 @@ enum mali_alt_func { #define MALI_GET_DEPTH_FUNC(flags) ((flags >> 8) & 0x7) #define MALI_DEPTH_FUNC_MASK MALI_DEPTH_FUNC(0x7) -#define MALI_DEPTH_TEST (1 << 11) +#define MALI_DEPTH_WRITEMASK (1 << 11) /* Next flags to unknown2_4 */ #define MALI_STENCIL_TEST (1 << 0) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 9beb1049a69..a310582ebe8 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -223,7 +223,7 @@ static const struct pandecode_flag_info u3_flag_info[] = { FLAG_INFO(HAS_MSAA), FLAG_INFO(CAN_DISCARD), FLAG_INFO(HAS_BLEND_SHADER), - FLAG_INFO(DEPTH_TEST), + FLAG_INFO(DEPTH_WRITEMASK), {} }; @@ -2141,7 +2141,7 @@ pandecode_vertex_tiler_postfix_pre( /* We're not quite sure what these flags mean without the depth test, if anything */ - if (unknown2_3 & (MALI_DEPTH_TEST | MALI_DEPTH_FUNC_MASK)) { + if (unknown2_3 & (MALI_DEPTH_WRITEMASK | MALI_DEPTH_FUNC_MASK)) { const char *func = pandecode_func(MALI_GET_DEPTH_FUNC(unknown2_3)); unknown2_3 &= ~MALI_DEPTH_FUNC_MASK; |