summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2011-04-06 12:13:33 +0100
committerBrian Paul <[email protected]>2011-09-23 07:58:45 -0600
commit3b32e51cb1e0cb3feba01f5612214bac20c5079b (patch)
treefe17564bbf3de6d3e6ba9a51a606a6a7fc27a0a0 /src/gallium/drivers/svga
parent166e9421c814d859f849b2aa476380725e74b408 (diff)
svga: Fix vPos usage
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_decl_sm30.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
index 6d6c7c27a44..1c385cc7e81 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
@@ -123,6 +123,12 @@ static boolean ps30_input( struct svga_shader_emitter *emit,
if (semantic.Name == TGSI_SEMANTIC_POSITION) {
emit->ps_true_pos = src_register( SVGA3DREG_MISCTYPE,
SVGA3DMISCREG_POSITION );
+
+ emit->ps_true_pos.base.swizzle = TRANSLATE_SWIZZLE( TGSI_SWIZZLE_X,
+ TGSI_SWIZZLE_Y,
+ TGSI_SWIZZLE_Y,
+ TGSI_SWIZZLE_Y );
+
emit->ps_temp_pos = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp );
emit->ps_depth_pos = src_register( SVGA3DREG_INPUT, emit->ps30_input_count++ );
@@ -132,7 +138,7 @@ static boolean ps30_input( struct svga_shader_emitter *emit,
emit->nr_hw_temp++;
reg = writemask( dst(emit->ps_true_pos),
- TGSI_WRITEMASK_XYZW );
+ TGSI_WRITEMASK_XY );
emit->ps_reads_pos = TRUE;
if (!emit_decl( emit, dst(emit->ps_depth_pos),