v3dv: enable sample rate shading if fragment shader reads gl_SampleID

According to the spec, if a fragment shader reads gl_SampleID then the
shader must be evaluated per-sample.

Fixes:
dEQP-VK.pipeline.multisample_shader_builtin.write_sample_mask.4_samples

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
Iago Toral Quiroga 2020-08-04 08:39:14 +02:00 committed by Marge Bot
parent 1c4c7d95f7
commit 6ee88f0acd

View file

@ -2528,7 +2528,8 @@ pack_shader_state_record(struct v3dv_pipeline *pipeline)
shader.fragment_shader_uses_real_pixel_centre_w_in_addition_to_centroid_w2 =
prog_data_fs->uses_center_w;
shader.enable_sample_rate_shading = pipeline->sample_rate_shading;
shader.enable_sample_rate_shading = pipeline->sample_rate_shading ||
prog_data_fs->force_per_sample_msaa;
shader.any_shader_reads_hardware_written_primitive_id = false;