summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-01-26 15:52:46 +0000
committerKeith Whitwell <keithw@vmware.com>2010-02-03 10:36:55 +0000
commitfc3efccdc67390847fc544f97dbdb1826442ae9a (patch)
tree0ac08ea72cfccfb5c2c27c2f0e9a8c5041e8bdad /src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
parent9b23e1f9a37a1d98f43673ea9f564b725f1f4283 (diff)
svga: better method for generating white fs color outputs
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi_decl_sm30.c')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_decl_sm30.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
index 43fc0d3235..73102a72a8 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
@@ -194,8 +194,19 @@ static boolean ps30_output( struct svga_shader_emitter *emit,
switch (semantic.Name) {
case TGSI_SEMANTIC_COLOR:
- emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT,
- semantic.Index );
+ if (emit->unit == PIPE_SHADER_FRAGMENT &&
+ emit->key.fkey.white_fragments) {
+
+ emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
+ emit->nr_hw_temp++ );
+ emit->temp_col[idx] = emit->output_map[idx];
+ emit->true_col[idx] = dst_register( SVGA3DREG_COLOROUT,
+ semantic.Index );
+ }
+ else {
+ emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT,
+ semantic.Index );
+ }
break;
case TGSI_SEMANTIC_POSITION:
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,