OSDN Git Service

i965/msaa: Add sample-alpha-to-coverage support for multiple render targets
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 1 Aug 2012 23:32:06 +0000 (16:32 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Thu, 23 Aug 2012 20:30:54 +0000 (13:30 -0700)
commite592f7df0361eb8b5c75944f0151c4e6b3f839dd
tree7a723da63fe271a673d1da74b8a62579c8f117bd
parentff996cafce511dd8a6c4e066e409c23e147a670c
i965/msaa: Add sample-alpha-to-coverage support for multiple render targets

Render Target Write message should include source zero alpha value when
sample-alpha-to-coverage is enabled for an FBO with  multiple render targets.
Source zero alpha value is used as fragment coverage for all the render
targets.

This patch makes piglit tests draw-buffers-alpha-to-coverage and
alpha-to-coverage-no-draw-buffer-zero to pass on Sandybridge. No
regressions are observed with piglit all.tests.

V2: Revert all the changes made in emit_color_write() function to
include src0 alpha for targets > 0. Now handling this case in a if
block.

V3: Correctly calculate the instruction length for buffer zero.
Properly handle the case of dual_src_blend when alpha-to-coverage
is enabled.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_emit.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/brw_wm.h