summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-02-28 16:56:01 -0800
committerTim Rowley <[email protected]>2017-03-20 18:04:53 -0500
commit8cd8240cfce1e26f2f237f1eb98d46ba47bca626 (patch)
tree2fdc833ce31b4e08d66b89eecababc35aeca9cd0 /src/gallium
parentab032fb436a758743f288da33d9940e8761f134e (diff)
swr: [rasterizer] Convert more SWR_ASSERT(false, ...) to SWR_INVALID(...)
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/simdintrin.h2
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/api.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/backend.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/binner.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/blend.h6
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/clip.cpp4
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/clip.h4
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/frontend.cpp10
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/threads.cpp4
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp2
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp14
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp14
-rw-r--r--src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.h2
-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
18 files changed, 57 insertions, 57 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/simdintrin.h b/src/gallium/drivers/swr/rasterizer/common/simdintrin.h
index 562408db8db..3cf3b180200 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdintrin.h
+++ b/src/gallium/drivers/swr/rasterizer/common/simdintrin.h
@@ -723,7 +723,7 @@ INLINE __m256i _simdemu_srli_epi32(__m256i a, uint32_t i)
INLINE
void _simdvec_transpose(simdvector &v)
{
- SWR_ASSERT(false, "Need to implement 8 wide version");
+ SWR_INVALID("Need to implement 8 wide version");
}
#else
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index e169094787e..ca5a6dd1a23 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -957,7 +957,7 @@ void SetupPipeline(DRAW_CONTEXT *pDC)
case R32_FLOAT: pState->state.pfnQuantizeDepth = QuantizeDepth < R32_FLOAT > ; break;
case R24_UNORM_X8_TYPELESS: pState->state.pfnQuantizeDepth = QuantizeDepth < R24_UNORM_X8_TYPELESS > ; break;
case R16_UNORM: pState->state.pfnQuantizeDepth = QuantizeDepth < R16_UNORM > ; break;
- default: SWR_ASSERT(false, "Unsupported depth format for depth quantiztion.");
+ default: SWR_INVALID("Unsupported depth format for depth quantiztion.");
pState->state.pfnQuantizeDepth = QuantizeDepth < R32_FLOAT > ;
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
index b915e327426..84414d8e721 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
@@ -347,7 +347,7 @@ void ProcessStoreTileBE(DRAW_CONTEXT *pDC, uint32_t workerId, uint32_t macroTile
case SWR_ATTACHMENT_COLOR7: srcFormat = KNOB_COLOR_HOT_TILE_FORMAT; break;
case SWR_ATTACHMENT_DEPTH: srcFormat = KNOB_DEPTH_HOT_TILE_FORMAT; break;
case SWR_ATTACHMENT_STENCIL: srcFormat = KNOB_STENCIL_HOT_TILE_FORMAT; break;
- default: SWR_ASSERT(false, "Unknown attachment: %d", attachment); srcFormat = KNOB_COLOR_HOT_TILE_FORMAT; break;
+ default: SWR_INVALID("Unknown attachment: %d", attachment); srcFormat = KNOB_COLOR_HOT_TILE_FORMAT; break;
}
uint32_t x, y;
diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp
index 88bfede58fb..490a86804fc 100644
--- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp
@@ -555,7 +555,7 @@ void BinTriangles(
case SWR_CULLMODE_FRONT: cullTris = frontWindingTris; break;
// 0 area triangles are marked as backfacing, which is required behavior for conservative rast
case SWR_CULLMODE_BACK: cullTris = ~frontWindingTris; break;
- default: SWR_ASSERT(false, "Invalid cull mode: %d", rastState.cullMode); cullTris = 0x0; break;
+ default: SWR_INVALID("Invalid cull mode: %d", rastState.cullMode); cullTris = 0x0; break;
}
triMask &= ~cullTris;
diff --git a/src/gallium/drivers/swr/rasterizer/core/blend.h b/src/gallium/drivers/swr/rasterizer/core/blend.h
index 626c237d75b..1b98e442fd8 100644
--- a/src/gallium/drivers/swr/rasterizer/core/blend.h
+++ b/src/gallium/drivers/swr/rasterizer/core/blend.h
@@ -161,7 +161,7 @@ void GenerateBlendFactor(SWR_BLEND_FACTOR func, simdvector &constantColor, simdv
result.x = result.y = result.z = result.w = _simd_sub_ps(_simd_set1_ps(1.0f), src1.w);
break;
- default: SWR_ASSERT(false, "Unimplemented blend factor: %d", func);
+ default: SWR_INVALID("Unimplemented blend factor: %d", func);
}
if (Color)
@@ -220,7 +220,7 @@ INLINE void BlendFunc(SWR_BLEND_OP blendOp, simdvector &src, simdvector &srcFact
break;
default:
- SWR_ASSERT(false, "Unimplemented blend function: %d", blendOp);
+ SWR_INVALID("Unimplemented blend function: %d", blendOp);
}
if (Color)
@@ -272,7 +272,7 @@ INLINE void Clamp(simdvector &src)
break;
default:
- SWR_ASSERT(false, "Unimplemented clamp: %d", type);
+ SWR_INVALID("Unimplemented clamp: %d", type);
break;
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.cpp b/src/gallium/drivers/swr/rasterizer/core/clip.cpp
index 0a6afe5909d..9e919d3a252 100644
--- a/src/gallium/drivers/swr/rasterizer/core/clip.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/clip.cpp
@@ -65,7 +65,7 @@ inline void intersect(
case FRUSTUM_BOTTOM: t = ComputeInterpFactor(v1[3] - v1[1], v2[3] - v2[1]); break;
case FRUSTUM_NEAR: t = ComputeInterpFactor(v1[2], v2[2]); break;
case FRUSTUM_FAR: t = ComputeInterpFactor(v1[3] - v1[2], v2[3] - v2[2]); break;
- default: SWR_ASSERT(false, "invalid clipping plane: %d", ClippingPlane);
+ default: SWR_INVALID("invalid clipping plane: %d", ClippingPlane);
};
@@ -104,7 +104,7 @@ inline int inside(const float v[4])
case FRUSTUM_NEAR : return (v[2]>=0.0f);
case FRUSTUM_FAR : return (v[2]<= v[3]);
default:
- SWR_ASSERT(false, "invalid clipping plane: %d", ClippingPlane);
+ SWR_INVALID("invalid clipping plane: %d", ClippingPlane);
return 0;
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/core/clip.h b/src/gallium/drivers/swr/rasterizer/core/clip.h
index 23a768f4832..eec65707e77 100644
--- a/src/gallium/drivers/swr/rasterizer/core/clip.h
+++ b/src/gallium/drivers/swr/rasterizer/core/clip.h
@@ -606,7 +606,7 @@ private:
}
break;
case FRUSTUM_FAR: t = ComputeInterpFactor(_simd_sub_ps(v1[3], v1[2]), _simd_sub_ps(v2[3], v2[2])); break;
- default: SWR_ASSERT(false, "invalid clipping plane: %d", ClippingPlane);
+ default: SWR_INVALID("invalid clipping plane: %d", ClippingPlane);
};
// interpolate position and store
@@ -667,7 +667,7 @@ private:
case FRUSTUM_NEAR: return _simd_cmpge_ps(v[2], this->state.rastState.clipHalfZ ? _simd_setzero_ps() : _simd_mul_ps(v[3], _simd_set1_ps(-1.0f)));
case FRUSTUM_FAR: return _simd_cmple_ps(v[2], v[3]);
default:
- SWR_ASSERT(false, "invalid clipping plane: %d", ClippingPlane);
+ SWR_INVALID("invalid clipping plane: %d", ClippingPlane);
return _simd_setzero_ps();
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
index 2109864b5d8..99d047da420 100644
--- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
@@ -302,7 +302,7 @@ uint32_t GetNumPrims(
case TOP_TRI_STRIP_REVERSE:
case TOP_PATCHLIST_BASE:
case TOP_UNKNOWN:
- SWR_ASSERT(false, "Unsupported topology: %d", mode);
+ SWR_INVALID("Unsupported topology: %d", mode);
return 0;
}
@@ -378,7 +378,7 @@ uint32_t GetNumVerts(
case TOP_TRI_STRIP_REVERSE:
case TOP_PATCHLIST_BASE:
case TOP_UNKNOWN:
- SWR_ASSERT(false, "Unsupported topology: %d", mode);
+ SWR_INVALID("Unsupported topology: %d", mode);
return 0;
}
@@ -455,7 +455,7 @@ INLINE uint32_t NumVertsPerPrim(PRIMITIVE_TOPOLOGY topology, bool includeAdjVert
numVerts = topology - TOP_PATCHLIST_BASE;
break;
default:
- SWR_ASSERT(false, "Unsupported topology: %d", topology);
+ SWR_INVALID("Unsupported topology: %d", topology);
break;
}
@@ -836,7 +836,7 @@ static void GeometryShaderStage(
case TOP_TRIANGLE_STRIP: pfnClipFunc = ClipTriangles; break;
case TOP_LINE_STRIP: pfnClipFunc = ClipLines; break;
case TOP_POINT_LIST: pfnClipFunc = ClipPoints; break;
- default: SWR_ASSERT(false, "Unexpected GS output topology: %d", pState->outputTopology);
+ default: SWR_INVALID("Unexpected GS output topology: %d", pState->outputTopology);
}
}
@@ -1181,7 +1181,7 @@ static void TessellationStages(
case TOP_TRIANGLE_LIST: pfnClipFunc = ClipTriangles; break;
case TOP_LINE_LIST: pfnClipFunc = ClipLines; break;
case TOP_POINT_LIST: pfnClipFunc = ClipPoints; break;
- default: SWR_ASSERT(false, "Unexpected DS output topology: %d", tsState.postDSTopology);
+ default: SWR_INVALID("Unexpected DS output topology: %d", tsState.postDSTopology);
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
index 0f6c94c6550..ea29f66c884 100644
--- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp
@@ -118,7 +118,7 @@ void CalculateProcessorTopology(CPUNumaNodes& out_nodes, uint32_t& out_numThread
// have seen more than 32 HW threads for this procGroup
// Don't use it
#if defined(_WIN64)
- SWR_ASSERT(false, "Shouldn't get here in 64-bit mode");
+ SWR_INVALID("Shouldn't get here in 64-bit mode");
#endif
continue;
}
@@ -288,7 +288,7 @@ void bindThread(SWR_CONTEXT* pContext, uint32_t threadId, uint32_t procGroupId =
if (threadId >= 32)
{
// Hopefully we don't get here. Logic in CreateThreadPool should prevent this.
- SWR_REL_ASSERT(false, "Shouldn't get here");
+ SWR_INVALID("Shouldn't get here");
// In a 32-bit process on Windows it is impossible to bind
// to logical processors 32-63 within a processor group.
diff --git a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
index f3986672275..eb60eb40815 100644
--- a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
@@ -146,7 +146,7 @@ HOTTILE* HotTileMgr::GetHotTile(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC, uint32
case SWR_ATTACHMENT_COLOR7: format = KNOB_COLOR_HOT_TILE_FORMAT; break;
case SWR_ATTACHMENT_DEPTH: format = KNOB_DEPTH_HOT_TILE_FORMAT; break;
case SWR_ATTACHMENT_STENCIL: format = KNOB_STENCIL_HOT_TILE_FORMAT; break;
- default: SWR_ASSERT(false, "Unknown attachment: %d", attachment); format = KNOB_COLOR_HOT_TILE_FORMAT; break;
+ default: SWR_INVALID("Unknown attachment: %d", attachment); format = KNOB_COLOR_HOT_TILE_FORMAT; break;
}
if (hotTile.state == HOTTILE_CLEAR)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
index da1dfbb32fd..cbcc3434a16 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
@@ -137,7 +137,7 @@ struct BlendJit : public Builder
out[0] = out[1] = out[2] = out[3] = FSUB(VIMMED1(1.0f), src1[3]);
break;
default:
- SWR_ASSERT(false, "Unsupported blend factor: %d", factor);
+ SWR_INVALID("Unsupported blend factor: %d", factor);
out[0] = out[1] = out[2] = out[3] = VIMMED1(0.0f);
break;
}
@@ -179,7 +179,7 @@ struct BlendJit : public Builder
src[3] = VMINPS(VMAXPS(src[3], VIMMED1(-1.0f)), VIMMED1(1.0f));
break;
- default: SWR_ASSERT(false, "Unsupport format type: %d", type);
+ default: SWR_INVALID("Unsupport format type: %d", type);
}
}
@@ -231,7 +231,7 @@ struct BlendJit : public Builder
src[swizComp] = VROUND(src[swizComp], C(_MM_FROUND_TO_ZERO));
src[swizComp] = FMUL(src[swizComp], VIMMED1(1.0f /factor));
break;
- default: SWR_ASSERT(false, "Unsupported format type: %d", info.type[c]);
+ default: SWR_INVALID("Unsupported format type: %d", info.type[c]);
}
}
}
@@ -287,7 +287,7 @@ struct BlendJit : public Builder
break;
default:
- SWR_ASSERT(false, "Unsupported blend operation: %d", blendOp);
+ SWR_INVALID("Unsupported blend operation: %d", blendOp);
out[0] = out[1] = out[2] = out[3] = VIMMED1(0.0f);
break;
}
@@ -437,7 +437,7 @@ struct BlendJit : public Builder
break;
default:
- SWR_ASSERT(false, "Unsupported logic operation: %d", logicOp);
+ SWR_INVALID("Unsupported logic operation: %d", logicOp);
result[0] = result[1] = result[2] = result[3] = VIMMED1(0.0f);
break;
}
@@ -470,7 +470,7 @@ struct BlendJit : public Builder
case ZFUNC_NE: pTest = ICMP_NE(pAlphaU8, pRef); break;
case ZFUNC_GE: pTest = ICMP_UGE(pAlphaU8, pRef); break;
default:
- SWR_ASSERT(false, "Invalid alpha test function");
+ SWR_INVALID("Invalid alpha test function");
break;
}
}
@@ -491,7 +491,7 @@ struct BlendJit : public Builder
case ZFUNC_NE: pTest = FCMP_ONE(pAlpha, pRef); break;
case ZFUNC_GE: pTest = FCMP_OGE(pAlpha, pRef); break;
default:
- SWR_ASSERT(false, "Invalid alpha test function");
+ SWR_INVALID("Invalid alpha test function");
break;
}
}
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
index df3ac5e7b36..9bc63f31c6a 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
@@ -359,7 +359,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
case 8: vptr = BITCAST(pointer, PointerType::get(VectorType::get(mInt8Ty, 4), 0)); break;
case 16: vptr = BITCAST(pointer, PointerType::get(VectorType::get(mInt16Ty, 4), 0)); break;
case 32: vptr = BITCAST(pointer, PointerType::get(VectorType::get(mFP32Ty, 4), 0)); break;
- default: SWR_ASSERT(false, "Unsupported underlying bpp!");
+ default: SWR_INVALID("Unsupported underlying bpp!");
}
// load 4 components of attribute
@@ -380,7 +380,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
vec = FMUL(vec, ConstantVector::get(std::vector<Constant*>(4, ConstantFP::get(mFP32Ty, 1.0 / 65535.0))));
break;
default:
- SWR_ASSERT(false, "Unsupported underlying type!");
+ SWR_INVALID("Unsupported underlying type!");
break;
}
break;
@@ -396,7 +396,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
vec = FMUL(vec, ConstantVector::get(std::vector<Constant*>(4, ConstantFP::get(mFP32Ty, 1.0 / 32768.0))));
break;
default:
- SWR_ASSERT(false, "Unsupported underlying type!");
+ SWR_INVALID("Unsupported underlying type!");
break;
}
break;
@@ -412,7 +412,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
case 32:
break; // Pass through unchanged.
default:
- SWR_ASSERT(false, "Unsupported underlying type!");
+ SWR_INVALID("Unsupported underlying type!");
break;
}
break;
@@ -428,7 +428,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
case 32:
break; // Pass through unchanged.
default:
- SWR_ASSERT(false, "Unsupported underlying type!");
+ SWR_INVALID("Unsupported underlying type!");
break;
}
break;
@@ -438,7 +438,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
case 32:
break; // Pass through unchanged.
default:
- SWR_ASSERT(false, "Unsupported underlying type!");
+ SWR_INVALID("Unsupported underlying type!");
}
break;
case SWR_TYPE_USCALED:
@@ -452,7 +452,7 @@ void FetchJit::JitLoadVertices(const FETCH_COMPILE_STATE &fetchState, Value* str
break;
case SWR_TYPE_UNKNOWN:
case SWR_TYPE_UNUSED:
- SWR_ASSERT(false, "Unsupported type %d!", info.type[0]);
+ SWR_INVALID("Unsupported type %d!", info.type[0]);
}
// promote mask: sse(0,1,2,3) | avx(0,1,2,3,4,4,4,4)
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.h b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.h
index 68c6f603985..d5cec70c2e8 100644
--- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.h
+++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.h
@@ -94,7 +94,7 @@ enum ComponentControl
//////////////////////////////////////////////////////////////////////////
struct FETCH_COMPILE_STATE
{
- uint32_t numAttribs {0};
+ uint32_t numAttribs{ 0 };
INPUT_ELEMENT_DESC layout[KNOB_NUM_ATTRIBUTES];
SWR_FORMAT indexType;
uint32_t cutIndex{ 0xffffffff };
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