i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero is in integer format
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 18 Jul 2012 18:41:15 +0000 (11:41 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Wed, 18 Jul 2012 18:54:12 +0000 (11:54 -0700)
commitcd5cd85a43dc43f62274be72d3252503dfc88bab
tree7f60ee5c17420a73aacc6d7e1315f9607dc69096
parentfb18ec4f2775f96982a39247efd1c70cccbc46fc
i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero is in integer format

OpenGL specification 3.3 (page 196), section 4.1.3 says:
If drawbuffer zero is not NONE and the buffer it references has an
integer format, the SAMPLE_ALPHA_TO_COVERAGE and SAMPLE_ALPHA_TO_ONE
operations are skipped."
This should work properly even if there are other draw buffers that
are not in integer format.

This patch makes following piglit tests pass on mesa:
int-draw-buffers-alpha-to-coverage
int-draw-buffers-alpha-to-one

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/gen6_cc.c