aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/memory
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/memory')
-rw-r--r--src/gallium/drivers/swr/rasterizer/memory/Convert.h10
-rw-r--r--src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp8
-rw-r--r--src/gallium/drivers/swr/rasterizer/memory/StoreTile.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h6
-rw-r--r--src/gallium/drivers/swr/rasterizer/memory/tilingtraits.h20
5 files changed, 23 insertions, 23 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/memory/Convert.h b/src/gallium/drivers/swr/rasterizer/memory/Convert.h
index 527324ca6cb..de4986c2732 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/Convert.h
+++ b/src/gallium/drivers/swr/rasterizer/memory/Convert.h
@@ -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,7 +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);
+ SWR_INVALID("Invalid format: %d", format);
break;
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp b/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp
index 1bc6ac22dfd..7d8b32a82bf 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp
+++ b/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp
@@ -92,7 +92,7 @@ void LoadHotTile(
pfnLoadTiles = LoadMacroTile<TilingTraits<SWR_TILE_MODE_WMAJOR, 8>, R8_UINT, R8_UINT>::Load;
break;
default:
- SWR_ASSERT(0, "Unsupported tiling mode");
+ SWR_INVALID("Unsupported tiling mode");
break;
}
}
@@ -108,7 +108,7 @@ void LoadHotTile(
pfnLoadTiles = sLoadTilesDepthTable_SWR_TILE_MODE_YMAJOR[pSrcSurface->format];
break;
default:
- SWR_ASSERT(0, "Unsupported tiling mode");
+ SWR_INVALID("Unsupported tiling mode");
break;
}
}
@@ -125,14 +125,14 @@ void LoadHotTile(
pfnLoadTiles = LoadMacroTile<TilingTraits<SWR_TILE_MODE_WMAJOR, 8>, R8_UINT, R8_UINT>::Load;
break;
default:
- SWR_ASSERT(0, "Unsupported tiling mode");
+ SWR_INVALID("Unsupported tiling mode");
break;
}
}
if (pfnLoadTiles == nullptr)
{
- SWR_ASSERT(false, "Unsupported format for load tile");
+ SWR_INVALID("Unsupported format for load tile");
return;
}
diff --git a/src/gallium/drivers/swr/rasterizer/memory/StoreTile.cpp b/src/gallium/drivers/swr/rasterizer/memory/StoreTile.cpp
index c46dc8876e9..446bca4e8d5 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/StoreTile.cpp
+++ b/src/gallium/drivers/swr/rasterizer/memory/StoreTile.cpp
@@ -93,7 +93,7 @@ void StoreHotTileToSurface(
if(nullptr == pfnStoreTiles)
{
- SWR_ASSERT(false, "Invalid pixel format / tile mode for store tiles");
+ SWR_INVALID("Invalid pixel format / tile mode for store tiles");
return;
}
diff --git a/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h b/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h
index 350e44b37b5..9222d3edfb8 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h
+++ b/src/gallium/drivers/swr/rasterizer/memory/TilingFunctions.h
@@ -622,7 +622,7 @@ uint32_t TileSwizzle2D(uint32_t xOffsetBytes, uint32_t yOffsetRows, const SWR_SU
case SWR_TILE_MODE_XMAJOR: return ComputeTileSwizzle2D<TilingTraits<SWR_TILE_MODE_XMAJOR, 8> >(xOffsetBytes, yOffsetRows, pState);
case SWR_TILE_MODE_YMAJOR: return ComputeTileSwizzle2D<TilingTraits<SWR_TILE_MODE_YMAJOR, 32> >(xOffsetBytes, yOffsetRows, pState);
case SWR_TILE_MODE_WMAJOR: return ComputeTileSwizzle2D<TilingTraits<SWR_TILE_MODE_WMAJOR, 8> >(xOffsetBytes, yOffsetRows, pState);
- default: SWR_ASSERT(0, "Unsupported tiling mode");
+ default: SWR_INVALID("Unsupported tiling mode");
}
return (uint32_t) NULL;
}
@@ -642,7 +642,7 @@ uint32_t TileSwizzle3D(uint32_t xOffsetBytes, uint32_t yOffsetRows, uint32_t zOf
case SWR_TILE_NONE: return ComputeTileSwizzle3D<TilingTraits<SWR_TILE_NONE, 32> >(xOffsetBytes, yOffsetRows, zOffsetSlices, pState);
case SWR_TILE_SWRZ: return ComputeTileSwizzle3D<TilingTraits<SWR_TILE_SWRZ, 32> >(xOffsetBytes, yOffsetRows, zOffsetSlices, pState);
case SWR_TILE_MODE_YMAJOR: return ComputeTileSwizzle3D<TilingTraits<SWR_TILE_MODE_YMAJOR, 32> >(xOffsetBytes, yOffsetRows, zOffsetSlices, pState);
- default: SWR_ASSERT(0, "Unsupported tiling mode");
+ default: SWR_INVALID("Unsupported tiling mode");
}
return (uint32_t) NULL;
}
@@ -674,7 +674,7 @@ uint32_t ComputeSurfaceOffset(uint32_t x, uint32_t y, uint32_t z, uint32_t array
ComputeSurfaceOffset2D<UseCachedOffsets>(x, y, array, sampleNum, lod, pState, offsetX, offsetY);
return TileSwizzle2D(offsetX, offsetY, pState);
break;
- default: SWR_ASSERT(0, "Unsupported format");
+ default: SWR_INVALID("Unsupported format");
}
return (uint32_t) NULL;
diff --git a/src/gallium/drivers/swr/rasterizer/memory/tilingtraits.h b/src/gallium/drivers/swr/rasterizer/memory/tilingtraits.h
index 381ac89a7b8..226d7dc66b7 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/tilingtraits.h
+++ b/src/gallium/drivers/swr/rasterizer/memory/tilingtraits.h
@@ -34,14 +34,14 @@ template<SWR_TILE_MODE mode, int>
struct TilingTraits
{
static const SWR_TILE_MODE TileMode{ mode };
- static UINT GetCu() { SWR_ASSERT(0); return 0; }
- static UINT GetCv() { SWR_ASSERT(0); return 0; }
- static UINT GetCr() { SWR_ASSERT(0); return 0; }
- static UINT GetTileIDShift() { SWR_ASSERT(0); return 0; }
+ static UINT GetCu() { SWR_NOT_IMPL; return 0; }
+ static UINT GetCv() { SWR_NOT_IMPL; return 0; }
+ static UINT GetCr() { SWR_NOT_IMPL; return 0; }
+ static UINT GetTileIDShift() { SWR_NOT_IMPL; return 0; }
/// @todo correct pdep shifts for all rastertile dims. Unused for now
- static UINT GetPdepX() { SWR_ASSERT(0); return 0x37; }
- static UINT GetPdepY() { SWR_ASSERT(0); return 0xC8; }
+ static UINT GetPdepX() { SWR_NOT_IMPL; return 0x37; }
+ static UINT GetPdepY() { SWR_NOT_IMPL; return 0xC8; }
};
template<int X> struct TilingTraits <SWR_TILE_NONE, X>
@@ -64,8 +64,8 @@ template<> struct TilingTraits <SWR_TILE_SWRZ, 8>
static UINT GetTileIDShift() { return KNOB_TILE_X_DIM_SHIFT + KNOB_TILE_Y_DIM_SHIFT; }
/// @todo correct pdep shifts for all rastertile dims. Unused for now
- static UINT GetPdepX() { SWR_ASSERT(0); return 0x00; }
- static UINT GetPdepY() { SWR_ASSERT(0); return 0x00; }
+ static UINT GetPdepX() { SWR_NOT_IMPL; return 0x00; }
+ static UINT GetPdepY() { SWR_NOT_IMPL; return 0x00; }
};
template<> struct TilingTraits <SWR_TILE_SWRZ, 32>
@@ -89,8 +89,8 @@ template<> struct TilingTraits <SWR_TILE_SWRZ, 128>
static UINT GetTileIDShift() { return KNOB_TILE_X_DIM_SHIFT + KNOB_TILE_Y_DIM_SHIFT + 4; }
/// @todo correct pdep shifts for all rastertile dims. Unused for now
- static UINT GetPdepX() { SWR_ASSERT(0); return 0x37; }
- static UINT GetPdepY() { SWR_ASSERT(0); return 0xC8; }
+ static UINT GetPdepX() { SWR_NOT_IMPL; return 0x37; }
+ static UINT GetPdepY() { SWR_NOT_IMPL; return 0xC8; }
};
// y-major tiling layout unaffected by element size