From 7384cdf651dc69098f4d988dd3b217879ec63336 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 22 Feb 2010 18:01:32 +0000 Subject: svga: Don't emit zero writemasks. This fixes a regression with Lightsmark, where more compact TGSI from Mesa was causing a zero mask MOV to be emitted for shadow map compare, causing problems in some backends. Add a few more assertions to catch cases like this. --- src/gallium/drivers/svga/svga_tgsi_emit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/svga/svga_tgsi_emit.h') diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h index e8f75485d5..48eced2ece 100644 --- a/src/gallium/drivers/svga/svga_tgsi_emit.h +++ b/src/gallium/drivers/svga/svga_tgsi_emit.h @@ -138,6 +138,7 @@ static INLINE boolean emit_dst( struct svga_shader_emitter *emit, SVGA3dShaderDestToken dest ) { assert(dest.reserved0); + assert(dest.mask); return svga_shader_emit_dword( emit, dest.value ); } @@ -267,6 +268,7 @@ static INLINE SVGA3dShaderDestToken writemask( SVGA3dShaderDestToken dest, unsigned mask ) { + assert(dest.mask & mask); dest.mask &= mask; return dest; } -- cgit v1.2.3