mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
panfrost: Use shader_info harder
We already have this metadata.. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
This commit is contained in:
parent
3cc425e27d
commit
f1de952b69
2 changed files with 5 additions and 18 deletions
|
|
@ -231,11 +231,14 @@ panfrost_shader_compile(struct panfrost_context *ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
state->can_discard = s->info.fs.uses_discard;
|
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->helper_invocations = s->info.fs.needs_helper_invocations;
|
||||||
state->stack_size = program.tls_size;
|
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)
|
if (outputs_written)
|
||||||
*outputs_written = s->info.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);
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,9 +95,6 @@ typedef struct {
|
||||||
unsigned sysval_count;
|
unsigned sysval_count;
|
||||||
unsigned sysvals[MAX_SYSVAL_COUNT];
|
unsigned sysvals[MAX_SYSVAL_COUNT];
|
||||||
|
|
||||||
/* Boolean properties of the program */
|
|
||||||
bool writes_point_size;
|
|
||||||
|
|
||||||
int first_tag;
|
int first_tag;
|
||||||
|
|
||||||
struct util_dynarray compiled;
|
struct util_dynarray compiled;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue