summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_tgsi_emit.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-22 18:01:32 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-22 21:47:15 +0000
commit7384cdf651dc69098f4d988dd3b217879ec63336 (patch)
treed51aa4e9553fde948ffbe0f44ab48474557c222f /src/gallium/drivers/svga/svga_tgsi_emit.h
parent28e80aa0b85aac3ed3d34ee13b6412be4d9d5773 (diff)
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.
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi_emit.h')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi_emit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h
index e8f75485d55..48eced2ecea 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;
}