panfrost: Fix ->reads_frag_coord assignment

Let's assign ->reads_frag_coord only once to handle the sysval case
(used on Bifrost) correctly.

Fixes: f1de952b69 ("panfrost: Use shader_info harder")
Cc: 20.3 <mesa-stable>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7527>
(cherry picked from commit f23574af2c)
This commit is contained in:
Boris Brezillon 2020-11-10 11:01:50 +01:00 committed by Dylan Baker
parent f3ff1265ba
commit 23f4120491
3 changed files with 3 additions and 6 deletions

View file

@ -15,7 +15,6 @@ dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_
dEQP-GLES2.functional.fbo.completeness.size.distinct,Fail
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz,Fail
dEQP-GLES2.functional.shaders.random.all_features.fragment.88,Fail
dEQP-GLES2.functional.shaders.texture_functions.vertex.texturecubelod,Fail
dEQP-GLES2.functional.texture.mipmap.cube.basic.linear_linear,Fail

View file

@ -1462,7 +1462,7 @@
"description": "panfrost: Fix ->reads_frag_coord assignment",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "f1de952b695b8f2053d576d3e8093427e598bd4f"
},

View file

@ -284,9 +284,6 @@ panfrost_shader_compile(struct panfrost_context *ctx,
bool vertex_id = s->info.system_values_read & (1 << SYSTEM_VALUE_VERTEX_ID);
bool instance_id = s->info.system_values_read & (1 << SYSTEM_VALUE_INSTANCE_ID);
/* On Bifrost it's a sysval, on Midgard it's a varying */
state->reads_frag_coord = s->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD);
state->writes_global = s->info.writes_memory;
switch (stage) {
@ -342,7 +339,8 @@ panfrost_shader_compile(struct panfrost_context *ctx,
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_frag_coord = (s->info.inputs_read & (1 << VARYING_SLOT_POS)) ||
(s->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD));
state->reads_point_coord = s->info.inputs_read & (1 << VARYING_SLOT_PNTC);
state->reads_face = (s->info.inputs_read & (1 << VARYING_SLOT_FACE)) ||
(s->info.system_values_read & (1 << SYSTEM_VALUE_FRONT_FACE));