Commit 3bb94905 by Ben Clayton

Replace use of ASSERT(false) with UNIMPLEMENTED

... along with a message saying what switch case wasn't handled. Helps identify what needs fixing for the daily Regres reports. Change-Id: I79448135fc84190d6e803e90e7995ae83058f663 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28400Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Presubmit-Ready: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 4ba1911b
...@@ -173,7 +173,7 @@ namespace sw ...@@ -173,7 +173,7 @@ namespace sw
} }
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
} }
} }
...@@ -227,7 +227,7 @@ namespace sw ...@@ -227,7 +227,7 @@ namespace sw
case VK_FORMAT_R8G8B8A8_UINT: case VK_FORMAT_R8G8B8A8_UINT:
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
} }
} }
......
...@@ -363,7 +363,7 @@ namespace sw ...@@ -363,7 +363,7 @@ namespace sw
value ^= Byte8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF); value ^= Byte8(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkCompareOp: %d", int(stencilCompareMode));
} }
} }
...@@ -439,7 +439,7 @@ namespace sw ...@@ -439,7 +439,7 @@ namespace sw
zTest = CmpLT(zValue, Z); zTest = CmpLT(zValue, Z);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkCompareOp: %d", int(state.depthCompareMode));
} }
switch(state.depthCompareMode) switch(state.depthCompareMode)
...@@ -539,7 +539,7 @@ namespace sw ...@@ -539,7 +539,7 @@ namespace sw
zTest = Int4(CmpGT(Z, zValue)); zTest = Int4(CmpGT(Z, zValue));
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkCompareOp: %d", int(state.depthCompareMode));
} }
switch(state.depthCompareMode) switch(state.depthCompareMode)
...@@ -855,7 +855,7 @@ namespace sw ...@@ -855,7 +855,7 @@ namespace sw
output = bufferValue - Byte8(1, 1, 1, 1, 1, 1, 1, 1); output = bufferValue - Byte8(1, 1, 1, 1, 1, 1, 1, 1);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkStencilOp: %d", int(operation));
} }
} }
...@@ -936,7 +936,7 @@ namespace sw ...@@ -936,7 +936,7 @@ namespace sw
blendFactor.z = *Pointer<Short4>(data + OFFSET(DrawData,factor.invBlendConstant4W[3])); blendFactor.z = *Pointer<Short4>(data + OFFSET(DrawData,factor.invBlendConstant4W[3]));
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendFactor: %d", int(blendFactorActive));
} }
} }
...@@ -986,7 +986,7 @@ namespace sw ...@@ -986,7 +986,7 @@ namespace sw
blendFactor.w = *Pointer<Short4>(data + OFFSET(DrawData,factor.invBlendConstant4W[3])); blendFactor.w = *Pointer<Short4>(data + OFFSET(DrawData,factor.invBlendConstant4W[3]));
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendFactor: %d", int(blendFactorAlphaActive));
} }
} }
...@@ -1097,7 +1097,7 @@ namespace sw ...@@ -1097,7 +1097,7 @@ namespace sw
pixel.w = Short4(0xFFFFu); pixel.w = Short4(0xFFFFu);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat %d", state.targetFormat[index]);
} }
if((postBlendSRGB && state.writeSRGB) || isSRGB(index)) if((postBlendSRGB && state.writeSRGB) || isSRGB(index))
...@@ -1178,7 +1178,7 @@ namespace sw ...@@ -1178,7 +1178,7 @@ namespace sw
current.z = Short4(0x0000); current.z = Short4(0x0000);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendOp: %d", int(state.blendOperation));
} }
blendFactorAlpha(sourceFactor, current, pixel, state.sourceBlendFactorAlpha); blendFactorAlpha(sourceFactor, current, pixel, state.sourceBlendFactorAlpha);
...@@ -1221,7 +1221,7 @@ namespace sw ...@@ -1221,7 +1221,7 @@ namespace sw
current.w = Short4(0x0000); current.w = Short4(0x0000);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendOp: %d", int(state.blendOperationAlpha));
} }
} }
...@@ -1362,7 +1362,7 @@ namespace sw ...@@ -1362,7 +1362,7 @@ namespace sw
transpose4x4(current.x, current.y, current.z, current.w); transpose4x4(current.x, current.y, current.z, current.w);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
Short4 c01 = current.z; Short4 c01 = current.z;
...@@ -1653,7 +1653,7 @@ namespace sw ...@@ -1653,7 +1653,7 @@ namespace sw
} }
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
} }
...@@ -1724,7 +1724,7 @@ namespace sw ...@@ -1724,7 +1724,7 @@ namespace sw
blendFactor.z = *Pointer<Float4>(data + OFFSET(DrawData,factor.invBlendConstant4F[2])); blendFactor.z = *Pointer<Float4>(data + OFFSET(DrawData,factor.invBlendConstant4F[2]));
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendFactor: %d", int(blendFactorActive));
} }
} }
...@@ -1772,7 +1772,7 @@ namespace sw ...@@ -1772,7 +1772,7 @@ namespace sw
blendFactor.w = *Pointer<Float4>(data + OFFSET(DrawData,factor.invBlendConstant4F[3])); blendFactor.w = *Pointer<Float4>(data + OFFSET(DrawData,factor.invBlendConstant4F[3]));
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendFactor: %d", int(blendFactorAlphaActive));
} }
} }
...@@ -1841,7 +1841,7 @@ namespace sw ...@@ -1841,7 +1841,7 @@ namespace sw
transpose4x4(pixel.x, pixel.y, pixel.z, pixel.w); transpose4x4(pixel.x, pixel.y, pixel.z, pixel.w);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
if((postBlendSRGB && state.writeSRGB) || isSRGB(index)) if((postBlendSRGB && state.writeSRGB) || isSRGB(index))
...@@ -1913,7 +1913,7 @@ namespace sw ...@@ -1913,7 +1913,7 @@ namespace sw
oC.z = Float4(0.0f); oC.z = Float4(0.0f);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendOp: %d", int(state.blendOperation));
} }
blendFactorAlpha(sourceFactor, oC, pixel, state.sourceBlendFactorAlpha); blendFactorAlpha(sourceFactor, oC, pixel, state.sourceBlendFactorAlpha);
...@@ -1957,7 +1957,7 @@ namespace sw ...@@ -1957,7 +1957,7 @@ namespace sw
oC.w = Float4(0.0f); oC.w = Float4(0.0f);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkBlendOp: %d", int(state.blendOperationAlpha));
} }
} }
...@@ -1995,7 +1995,7 @@ namespace sw ...@@ -1995,7 +1995,7 @@ namespace sw
transpose4x4(oC.x, oC.y, oC.z, oC.w); transpose4x4(oC.x, oC.y, oC.z, oC.w);
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
int rgbaWriteMask = state.colorWriteActive(index); int rgbaWriteMask = state.colorWriteActive(index);
...@@ -2386,7 +2386,7 @@ namespace sw ...@@ -2386,7 +2386,7 @@ namespace sw
} }
break; break;
default: default:
ASSERT(false); UNIMPLEMENTED("VkFormat: %d", int(state.targetFormat[index]));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment