panfrost: Document MALI_WRITES_GLOBAL bit

We've been setting this unconditionally -- oops!

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>
This commit is contained in:
Alyssa Rosenzweig 2020-06-02 14:05:34 -04:00 committed by Marge Bot
parent ee59d1ad77
commit 2447b3b9d3
3 changed files with 9 additions and 1 deletions

View file

@ -353,7 +353,7 @@ panfrost_shader_meta_init(struct panfrost_context *ctx,
/* TODO: This is not conformant on ES3 */
meta->midgard1.flags_hi = MALI_SUPPRESS_INF_NAN;
meta->midgard1.flags_lo = 0x220;
meta->midgard1.flags_lo = MALI_WRITES_GLOBAL | 0x20;
meta->midgard1.uniform_buffer_count = panfrost_ubo_count(ctx, st);
}
}

View file

@ -408,6 +408,13 @@ enum mali_format {
* it might read depth/stencil in particular, also set MALI_READS_ZS */
#define MALI_READS_ZS (1 << 8)
/* The shader might write to global memory (via OpenCL, SSBOs, or images).
* Reading is okay, as are ordinary writes to the tilebuffer/varyings. Setting
* incurs a performance penalty. On a fragment shader, this bit implies there
* are side effects, hence it interacts with early-z. */
#define MALI_WRITES_GLOBAL (1 << 9)
#define MALI_READS_TILEBUFFER (1 << 12)
/* Applies to midgard1.flags_hi */

View file

@ -274,6 +274,7 @@ static const struct pandecode_flag_info shader_midgard1_flag_lo_info [] = {
FLAG_INFO(WRITES_Z),
FLAG_INFO(EARLY_Z),
FLAG_INFO(READS_TILEBUFFER),
FLAG_INFO(WRITES_GLOBAL),
FLAG_INFO(READS_ZS),
{}
};