From: Brian Paul Date: Fri, 10 Jul 2009 22:26:09 +0000 (-0600) Subject: tgsi: update some assertions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cff2126f522bb511216f64427b3060467e266f8a;p=mesa.git tgsi: update some assertions --- diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index 18c448a2c77..d272533d63c 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 );