diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-06-08 18:05:21 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-12 14:45:50 +0000 |
commit | f1de952b695b8f2053d576d3e8093427e598bd4f (patch) | |
tree | 0b1e166ab6295997f0eed368157abed52a9e1590 /src/gallium/drivers | |
parent | 3cc425e27df6b14b6b9fb5363861d83e53d0b362 (diff) |
panfrost: Use shader_info harder
We already have this metadata..
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_assemble.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/gallium/drivers/panfrost/pan_assemble.c b/src/gallium/drivers/panfrost/pan_assemble.c index dfda97f9463..7d0f07a0dd1 100644 --- a/src/gallium/drivers/panfrost/pan_assemble.c +++ b/src/gallium/drivers/panfrost/pan_assemble.c @@ -231,11 +231,14 @@ panfrost_shader_compile(struct panfrost_context *ctx, } state->can_discard = s->info.fs.uses_discard; - state->writes_point_size = program.writes_point_size; - state->reads_point_coord = false; state->helper_invocations = s->info.fs.needs_helper_invocations; state->stack_size = program.tls_size; + state->reads_frag_coord = s->info.inputs_read & (1 << VARYING_SLOT_POS); + state->reads_point_coord = s->info.inputs_read & (1 << VARYING_SLOT_PNTC); + state->reads_face = s->info.inputs_read & (1 << VARYING_SLOT_FACE); + state->writes_point_size = s->info.outputs_written & (1 << VARYING_SLOT_PSIZ); + if (outputs_written) *outputs_written = s->info.outputs_written; @@ -263,17 +266,4 @@ panfrost_shader_compile(struct panfrost_context *ctx, state->varyings[loc + c] = pan_format_from_glsl(var->type, var->data.location_frac); } } - - for (unsigned i = 0; i < state->varying_count; ++i) { - unsigned location = state->varyings_loc[i]; - - if (location == VARYING_SLOT_POS && stage == MESA_SHADER_FRAGMENT) - state->reads_frag_coord = true; - else if (location == VARYING_SLOT_PSIZ) - state->writes_point_size = true; - else if (location == VARYING_SLOT_PNTC) - state->reads_point_coord = true; - else if (location == VARYING_SLOT_FACE) - state->reads_face = true; - } } |