diff --git a/src/panfrost/lib/pan_shader.c b/src/panfrost/lib/pan_shader.c index e1f87bc5538..0c809abc4d4 100644 --- a/src/panfrost/lib/pan_shader.c +++ b/src/panfrost/lib/pan_shader.c @@ -241,7 +241,6 @@ GENX(pan_shader_compile)(nir_shader *s, info->fs.outputs_read; info->fs.can_discard = s->info.fs.uses_discard; - info->fs.helper_invocations = s->info.fs.needs_quad_helper_invocations; info->fs.early_fragment_tests = s->info.fs.early_fragment_tests; /* List of reasons we need to execute frag shaders when things @@ -266,6 +265,11 @@ GENX(pan_shader_compile)(nir_shader *s, !info->fs.can_discard && !info->fs.outputs_read; + /* Requires the same hardware guarantees, so grouped as one bit + * in the hardware. + */ + info->contains_barrier |= s->info.fs.needs_quad_helper_invocations; + info->fs.reads_frag_coord = (s->info.inputs_read & (1 << VARYING_SLOT_POS)) || BITSET_TEST(s->info.system_values_read, SYSTEM_VALUE_FRAG_COORD); diff --git a/src/panfrost/lib/pan_shader.h b/src/panfrost/lib/pan_shader.h index 9e48ee856d6..2764d2587bf 100644 --- a/src/panfrost/lib/pan_shader.h +++ b/src/panfrost/lib/pan_shader.h @@ -255,8 +255,6 @@ pan_shader_prepare_rsd(const struct pan_shader_info *shader_info, rsd->properties.uniform_buffer_count = shader_info->ubo_count; if (shader_info->stage == MESA_SHADER_FRAGMENT) { - rsd->properties.shader_contains_barrier |= - shader_info->fs.helper_invocations; rsd->properties.stencil_from_shader = shader_info->fs.writes_stencil; rsd->properties.depth_source = diff --git a/src/panfrost/util/pan_ir.h b/src/panfrost/util/pan_ir.h index 63a458684fa..b22feafd70c 100644 --- a/src/panfrost/util/pan_ir.h +++ b/src/panfrost/util/pan_ir.h @@ -256,7 +256,6 @@ struct pan_shader_info { bool reads_frag_coord; bool reads_point_coord; bool reads_face; - bool helper_invocations; bool can_discard; bool writes_depth; bool writes_stencil; @@ -295,8 +294,13 @@ struct pan_shader_info { } vs; }; - bool separable; + /* Does the shader contains a barrier? or (for fragment shaders) does it + * require helper invocations, which demand the same ordering guarantees + * of the hardware? These notions are unified in the hardware, so we + * unify them here as well. + */ bool contains_barrier; + bool separable; bool writes_global; uint64_t outputs_written;