mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
broadcom: use nir info to keep track of implicit sample shading
It seems NIR is tracking this for us now so we can stop doing this in the backend. Also, new CTS tests seem to add the requirement where in the presence of some builtin's like gl_SampleID in a shader, even if unused, sample shading is expected to be enabled, which is something we can't track in the backend since the variable may have been dropped by then. Fixes 2 failures in: dEQP-VK.draw.renderpass.implicit_sample_shading.sample* Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23984>
This commit is contained in:
parent
59e2760d8f
commit
1f8ecd3ae0
3 changed files with 5 additions and 13 deletions
|
|
@ -4346,13 +4346,6 @@ nir_to_vir(struct v3d_compile *c)
|
|||
c->line_x = emit_fragment_varying(c, NULL, -1, 0, 0);
|
||||
c->uses_implicit_point_line_varyings = true;
|
||||
}
|
||||
|
||||
c->force_per_sample_msaa =
|
||||
c->s->info.fs.uses_sample_qualifier ||
|
||||
BITSET_TEST(c->s->info.system_values_read,
|
||||
SYSTEM_VALUE_SAMPLE_ID) ||
|
||||
BITSET_TEST(c->s->info.system_values_read,
|
||||
SYSTEM_VALUE_SAMPLE_POS);
|
||||
break;
|
||||
case MESA_SHADER_COMPUTE:
|
||||
/* Set up the TSO for barriers, assuming we do some. */
|
||||
|
|
|
|||
|
|
@ -693,11 +693,6 @@ struct v3d_compile {
|
|||
/* True if a fragment shader reads gl_PrimitiveID */
|
||||
bool fs_uses_primitive_id;
|
||||
|
||||
/* If the fragment shader does anything that requires to force
|
||||
* per-sample MSAA, such as reading gl_SampleID.
|
||||
*/
|
||||
bool force_per_sample_msaa;
|
||||
|
||||
/* Whether we are using the fallback scheduler. This will be set after
|
||||
* register allocation has failed once.
|
||||
*/
|
||||
|
|
@ -1051,6 +1046,10 @@ struct v3d_fs_prog_data {
|
|||
bool uses_center_w;
|
||||
bool uses_implicit_point_line_varyings;
|
||||
bool lock_scoreboard_on_first_thrsw;
|
||||
|
||||
/* If the fragment shader does anything that requires to force
|
||||
* per-sample MSAA, such as reading gl_SampleID.
|
||||
*/
|
||||
bool force_per_sample_msaa;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -840,7 +840,7 @@ v3d_fs_set_prog_data(struct v3d_compile *c,
|
|||
c->uses_implicit_point_line_varyings;
|
||||
prog_data->lock_scoreboard_on_first_thrsw =
|
||||
c->lock_scoreboard_on_first_thrsw;
|
||||
prog_data->force_per_sample_msaa = c->force_per_sample_msaa;
|
||||
prog_data->force_per_sample_msaa = c->s->info.fs.uses_sample_shading;
|
||||
prog_data->uses_pid = c->fs_uses_primitive_id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue