swr/rast: disable buffer overrun warning for Assemble()
authorTim Rowley <timothy.o.rowley@intel.com>
Wed, 26 Apr 2017 18:11:00 +0000 (13:11 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Sat, 29 Apr 2017 00:55:33 +0000 (19:55 -0500)
Disabling buffer overrun warning for Assemble(uint32_t slot,
simdvector *verts) due to what looks like a MSVC compiler bug
when compiling the SIMD16 FE.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/pa.h

index 781c094614362e6c68f1fe83197e67541df44c38..10570f43f0f7525c3c56e1e1da5a03a684863fe7 100644 (file)
@@ -645,7 +645,9 @@ struct PA_STATE_CUT : public PA_STATE
         }
     }
 
-    bool Assemble(uint32_t slot, simdvector verts[])
+// disabling buffer overrun warning for this function for what appears to be a bug in MSVC 2017
+PRAGMA_WARNING_PUSH_DISABLE(4789)
+    bool Assemble(uint32_t slot, simdvector *verts)
     {
         // process any outstanding verts
         ProcessVerts();
@@ -689,9 +691,9 @@ struct PA_STATE_CUT : public PA_STATE
                 pBase += SIMD_WIDTH;
             }
         }
-
         return true;
     }
+PRAGMA_WARNING_POP()
 
 #if ENABLE_AVX512_SIMD16
     bool Assemble_simd16(uint32_t slot, simd16vector verts[])