svga: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS
authorBrian Paul <brianp@vmware.com>
Fri, 17 Jan 2014 02:32:47 +0000 (18:32 -0800)
committerBrian Paul <brianp@vmware.com>
Tue, 21 Jan 2014 18:53:51 +0000 (10:53 -0800)
commitb9f68d927ea5e114b6019c807ce65674d9fa1d1d
tree66516d8234dc8bbf843ddc500d047bbeed94964c
parent384fd64ab1533df8256600733a1fc8413af3514a
svga: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS

Fixes several colorbuffer tests, including piglit "fbo-drawbuffers-none"
for "gl_FragColor" and "glDrawPixels" cases.

v2: rework patch to only avoid creating extra shader variants when
TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS is not specified.  Per Jose.
Use a write_color0_to_n_cbufs key field to replicate color0 to N
color buffers only when N > 0 and WRITES_ALL_CBUFS is set.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_state_fs.c
src/gallium/drivers/svga/svga_tgsi.h
src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
src/gallium/drivers/svga/svga_tgsi_insn.c