diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index ad461dbe24c..ca072971f01 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -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. */ diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index 9f4129870e1..eb4e692464b 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -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; }; diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c index 499215454c0..a1a10a5f8f7 100644 --- a/src/broadcom/compiler/vir.c +++ b/src/broadcom/compiler/vir.c @@ -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; }