swr: [rasterizer common] fix assert index
authorEric Engestrom <eric@engestrom.ch>
Wed, 12 Oct 2016 21:13:29 +0000 (22:13 +0100)
committerTim Rowley <timothy.o.rowley@intel.com>
Fri, 14 Oct 2016 02:37:20 +0000 (21:37 -0500)
Fixes: b3bd8bb611bb465d2e5e ("swr: [rasterizer core] add support
       for "RAW" surface format")
CovID: 1373647
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/rasterizer/common/formats.h

index 539e37afb342144a02e2ffbb369a6100070ba37b..dd5b4999e395a70e5469fe04908aa2dd04d3750c 100644 (file)
@@ -248,7 +248,7 @@ extern const SWR_FORMAT_INFO gFormatInfo[NUM_SWR_FORMATS];
 /// @param format - SWR format
 INLINE const SWR_FORMAT_INFO& GetFormatInfo(SWR_FORMAT format)
 {
-    SWR_ASSERT(format <= NUM_SWR_FORMATS, "Invalid Surface Format: %d", format);
+    SWR_ASSERT(format < NUM_SWR_FORMATS, "Invalid Surface Format: %d", format);
     SWR_ASSERT(gFormatInfo[format].name != nullptr, "Invalid Surface Format: %d", format);
     return gFormatInfo[format];
 }