[Mesa-dev] [PATCH] swr: [rasterizer memory] assert when trying to convert an unknown format

Ilia Mirkin imirkin at alum.mit.edu
Wed Nov 30 02:04:59 UTC 2016


Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---

I've been running this for a little while and haven't hit it. I had a theory
at one point that there was a missing format in there which turned out to be
false, but I think this is still good to have rather than silently fail.

 src/gallium/drivers/swr/rasterizer/memory/Convert.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/swr/rasterizer/memory/Convert.h b/src/gallium/drivers/swr/rasterizer/memory/Convert.h
index c31459c..527324c 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/Convert.h
+++ b/src/gallium/drivers/swr/rasterizer/memory/Convert.h
@@ -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_ASSERT(0);
         break;
     }
 }
-- 
2.7.3



More information about the mesa-dev mailing list