panfrost: Allow waiting on slots 6/7 during preload
I don't understand the underlying uarch details but ATEST needs to wait on slot 6 and BLEND needs to wait on both, so these bits are used if ATEST/BLEND are in the first clause, which happens if e.g. a constant colour is written, or if the input is preloaded. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>
This commit is contained in:
parent
a5780cdb9b
commit
b1ebe7a19b
|
@ -62,9 +62,9 @@ pan_prepare_midgard_props(struct panfrost_shader_state *state,
|
|||
|
||||
static void
|
||||
pan_prepare_bifrost_props(struct panfrost_shader_state *state,
|
||||
panfrost_program *program,
|
||||
gl_shader_stage stage)
|
||||
{
|
||||
|
||||
switch (stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
pan_prepare(&state->properties, RENDERER_PROPERTIES);
|
||||
|
@ -91,6 +91,8 @@ pan_prepare_bifrost_props(struct panfrost_shader_state *state,
|
|||
}
|
||||
state->properties.uniform_buffer_count = state->ubo_count;
|
||||
state->properties.bifrost.shader_modifies_coverage = state->can_discard;
|
||||
state->properties.bifrost.shader_wait_dependency_6 = program->wait_6;
|
||||
state->properties.bifrost.shader_wait_dependency_7 = program->wait_7;
|
||||
|
||||
pan_prepare(&state->preload, PRELOAD);
|
||||
state->preload.uniform_count = state->uniform_count;
|
||||
|
@ -420,7 +422,7 @@ panfrost_shader_compile(struct panfrost_context *ctx,
|
|||
state->shader.sampler_count = s->info.num_textures;
|
||||
|
||||
if (dev->quirks & IS_BIFROST)
|
||||
pan_prepare_bifrost_props(state, stage);
|
||||
pan_prepare_bifrost_props(state, program, stage);
|
||||
else
|
||||
pan_prepare_midgard_props(state, stage);
|
||||
|
||||
|
|
|
@ -108,6 +108,10 @@ typedef struct {
|
|||
* (register spilling), or zero if no spilling is used */
|
||||
unsigned tls_size;
|
||||
|
||||
/* For Bifrost, should the program wait on dependency slots 6/7 before
|
||||
* starting? For ATEST/BLEND in the first clause, which can occur with
|
||||
* extremely simple shaders */
|
||||
bool wait_6, wait_7;
|
||||
} panfrost_program;
|
||||
|
||||
struct panfrost_compile_inputs {
|
||||
|
|
Loading…
Reference in New Issue