swr: fix build with mingw
[mesa.git] / src / gallium / drivers / swr / rasterizer / memory / Convert.h
index c31459c12f56ff1e7c8090236ec34f7ab8612b37..c8c6b30daff000eed4046ce792d0bc56873e652c 100644 (file)
@@ -27,7 +27,7 @@
 ******************************************************************************/
 #pragma once
 
-#if defined(_WIN32)
+#if defined(_MSC_VER)
 // disable "potential divide by 0"
 #pragma warning(disable: 4723)
 #endif
@@ -362,7 +362,7 @@ static void ConvertPixelFromFloat(
             break;
         }
         default:
-            SWR_ASSERT(0);
+            SWR_INVALID("Invalid type: %d", type);
             break;
         }
     }
@@ -381,7 +381,7 @@ static void ConvertPixelFromFloat(
         pPixel->r = outColor[0];
         break;
     default:
-        SWR_ASSERT(0);
+        SWR_INVALID("Invalid # of comps: %d", FormatTraits<DstFormat>::numComps);
     }
 }
 
@@ -419,7 +419,7 @@ INLINE static void ConvertPixelToFloat(
         srcColor[0] = pPixel->r;
         break;
     default:
-        SWR_ASSERT(0);
+        SWR_INVALID("Invalid # of comps: %d", FormatTraits<SrcFormat>::numComps);
     }
 
     // Convert components
@@ -547,7 +547,7 @@ INLINE static void ConvertPixelToFloat(
             break;
         }
         default:
-            SWR_ASSERT(0);
+            SWR_INVALID("Invalid type: %d", type);
             break;
         }
     }
@@ -724,6 +724,7 @@ INLINE static void ConvertPixelFromFloat(
     case R8G8B8_SINT: ConvertPixelFromFloat<R8G8B8_SINT>(pDst, srcPixel); break;
     case RAW: ConvertPixelFromFloat<RAW>(pDst, srcPixel); break;
     default:
+        SWR_INVALID("Invalid format: %d", format);
         break;
     }
 }