Mesa (master): tgsi: update some assertions
Brian Paul
brianp at kemper.freedesktop.org
Mon Jul 13 14:53:29 UTC 2009
Module: Mesa
Branch: master
Commit: cff2126f522bb511216f64427b3060467e266f8a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cff2126f522bb511216f64427b3060467e266f8a
Author: Brian Paul <brianp at vmware.com>
Date: Fri Jul 10 16:26:09 2009 -0600
tgsi: update some assertions
---
src/gallium/auxiliary/tgsi/tgsi_build.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 18c448a..d272533 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -139,8 +139,8 @@ tgsi_build_declaration(
{
struct tgsi_declaration declaration;
- assert( file <= TGSI_FILE_IMMEDIATE );
- assert( interpolate <= TGSI_INTERPOLATE_PERSPECTIVE );
+ assert( file < TGSI_FILE_COUNT );
+ assert( interpolate < TGSI_INTERPOLATE_COUNT );
declaration = tgsi_default_declaration();
declaration.File = file;
@@ -996,7 +996,7 @@ tgsi_build_src_register(
{
struct tgsi_src_register src_register;
- assert( file <= TGSI_FILE_IMMEDIATE );
+ assert( file < TGSI_FILE_COUNT );
assert( swizzle_x <= TGSI_SWIZZLE_W );
assert( swizzle_y <= TGSI_SWIZZLE_W );
assert( swizzle_z <= TGSI_SWIZZLE_W );
@@ -1224,7 +1224,7 @@ tgsi_build_dst_register(
{
struct tgsi_dst_register dst_register;
- assert( file <= TGSI_FILE_IMMEDIATE );
+ assert( file < TGSI_FILE_COUNT );
assert( mask <= TGSI_WRITEMASK_XYZW );
assert( index >= -32768 && index <= 32767 );
More information about the mesa-commit
mailing list