panfrost: Use NIR helper invocations info
We don't need to guesstimate this ourselves. This will help when we bringup derivatives. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
fb2fe6e7bc
commit
48991c7a1f
|
@ -94,6 +94,7 @@ panfrost_shader_compile(struct panfrost_context *ctx, struct mali_shader_meta *m
|
||||||
state->can_discard = program.can_discard;
|
state->can_discard = program.can_discard;
|
||||||
state->writes_point_size = program.writes_point_size;
|
state->writes_point_size = program.writes_point_size;
|
||||||
state->reads_point_coord = false;
|
state->reads_point_coord = false;
|
||||||
|
state->helper_invocations = s->info.fs.needs_helper_invocations;
|
||||||
|
|
||||||
/* Separate as primary uniform count is truncated */
|
/* Separate as primary uniform count is truncated */
|
||||||
state->uniform_count = program.uniform_count;
|
state->uniform_count = program.uniform_count;
|
||||||
|
|
|
@ -1132,7 +1132,7 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data)
|
||||||
/* Any time texturing is used, derivatives are implicitly
|
/* Any time texturing is used, derivatives are implicitly
|
||||||
* calculated, so we need to enable helper invocations */
|
* calculated, so we need to enable helper invocations */
|
||||||
|
|
||||||
if (ctx->sampler_view_count[PIPE_SHADER_FRAGMENT])
|
if (variant->helper_invocations)
|
||||||
flags |= MALI_HELPER_INVOCATIONS;
|
flags |= MALI_HELPER_INVOCATIONS;
|
||||||
|
|
||||||
ctx->fragment_shader_core.midgard1.flags = flags;
|
ctx->fragment_shader_core.midgard1.flags = flags;
|
||||||
|
|
|
@ -227,6 +227,9 @@ struct panfrost_shader_state {
|
||||||
|
|
||||||
uint16_t point_sprite_mask;
|
uint16_t point_sprite_mask;
|
||||||
unsigned point_sprite_upper_left : 1;
|
unsigned point_sprite_upper_left : 1;
|
||||||
|
|
||||||
|
/* Should we enable helper invocations */
|
||||||
|
bool helper_invocations;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A collection of varyings (the CSO) */
|
/* A collection of varyings (the CSO) */
|
||||||
|
|
Loading…
Reference in New Issue