i965: Fix gl_SampleMaskIn[] in per-sample shading mode.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 6 Apr 2016 03:14:22 +0000 (20:14 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Apr 2016 23:18:47 +0000 (16:18 -0700)
commit447d3eec6a869200612e5010f47335cb26789a3a
treecbb2ede0c9779bd4b201021313b9c86c79992a5e
parent66a725570c9f93ab0341e9479390c9d042d7cd00
i965: Fix gl_SampleMaskIn[] in per-sample shading mode.

The coverage mask is not sufficient - in per-sample mode, we also need
to AND with a mask representing the samples being processed by the
current fragment shader invocation.

Fixes 18 dEQP-GLES31.functional.shaders.sample_variables tests:

sample_mask_in.bit_count_per_sample.multisample_{rbo,texture}_{1,2,4,8}
sample_mask_in.bit_count_per_two_samples.multisample_{rbo,texture}_{4,8}
sample_mask_in.bits_unique_per_sample.multisample_{rbo,texture}_{1,2,4,8}
sample_mask_in.bits_unique_per_two_samples.multisample_{rbo,texture}_{4,8}

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp