Fix clang string literal conversion warnings.
authorJarkko Pöyry <jpoyry@google.com>
Fri, 29 May 2015 23:36:30 +0000 (16:36 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Thu, 4 Jun 2015 01:17:44 +0000 (18:17 -0700)
- Add DE_FATAL(MSG) macro to replace DE_ASSERT(!"MSG") pattern used in
  code.

Bug: 21161908
Change-Id: I96414b9ecfbb953b1c5236753c21c5c2d08d3f59

40 files changed:
framework/common/tcuFloatFormat.cpp
framework/common/tcuResultCollector.cpp
framework/delibs/debase/deDefs.h
framework/delibs/deimage/deImage.c
framework/delibs/depool/dePoolMultiSet.h
framework/delibs/depool/dePoolSet.h
framework/delibs/deutil/deSocket.c
framework/egl/egluGLUtil.cpp
framework/opengl/gluShaderUtil.cpp
framework/opengl/simplereference/sglrGLContext.cpp
framework/opengl/simplereference/sglrShaderProgram.cpp
framework/platform/X11/tcuX11GlxPlatform.cpp
framework/platform/android/tcuAndroidWindow.cpp
framework/platform/ios/tcuIOSPlatform.hh
framework/randomshaders/rsgExecutionContext.cpp
framework/referencerenderer/rrPrimitivePacket.cpp
framework/referencerenderer/rrVertexAttrib.cpp
modules/egl/teglImageTests.cpp
modules/egl/teglImageUtil.cpp
modules/gles2/functional/es2fFboRenderTest.cpp
modules/gles2/functional/es2fShaderIndexingTests.cpp
modules/gles2/functional/es2fShaderLoopTests.cpp
modules/gles3/functional/es3fFboCompletenessTests.cpp
modules/gles3/functional/es3fFboTestCase.cpp
modules/gles3/functional/es3fFboTestUtil.cpp
modules/gles3/functional/es3fShaderIndexingTests.cpp
modules/gles3/functional/es3fShaderLoopTests.cpp
modules/gles31/functional/es31fDebugTests.cpp
modules/gles31/functional/es31fFboTestCase.cpp
modules/gles31/functional/es31fFboTestUtil.cpp
modules/gles31/functional/es31fSeparateShaderTests.cpp
modules/gles31/functional/es31fUniformLocationTests.cpp
modules/glshared/glsBuiltinPrecisionTests.cpp
modules/glshared/glsDrawTest.cpp
modules/glshared/glsFboCompletenessTests.cpp
modules/glshared/glsFboUtil.cpp
modules/glshared/glsScissorTests.cpp
modules/glshared/glsShaderLibraryCase.cpp
modules/glshared/glsTextureStateQueryTests.cpp
modules/glshared/glsTextureTestUtil.cpp

index 4c51d3e..d895e47 100644 (file)
@@ -42,7 +42,7 @@ Interval chooseInterval(YesNoMaybe choice, const Interval& no, const Interval& y
                case NO:        return no;
                case YES:       return yes;
                case MAYBE:     return no | yes;
-               default:        DE_ASSERT(!"Impossible case");
+               default:        DE_FATAL("Impossible case");
        }
 
        return Interval();
index e760466..d5e0c29 100644 (file)
@@ -43,7 +43,7 @@ static int testResultSeverity (qpTestResult testResult)
                case QP_TEST_RESULT_RESOURCE_ERROR:                     return 110;
                case QP_TEST_RESULT_INTERNAL_ERROR:                     return 120;
                case QP_TEST_RESULT_CRASH:                                      return 150;
-               default:                                                                        DE_ASSERT(!"Impossible case");
+               default:                                                                        DE_FATAL("Impossible case");
        }
        return 0;
 }
index 3c3abbf..7274914 100644 (file)
@@ -263,6 +263,10 @@ extern "C" {
 /* Assertion macro family. */
 void deAssertFail(const char* reason, const char* file, int line);
 
+/* Assertion failure callback. Requires DE_ASSERT_FAILURE_CALLBACK to be defined or otherwise has no effect. */
+typedef void (*deAssertFailureCallbackFunc) (const char* reason, const char* file, int line);
+void deSetAssertFailureCallback (deAssertFailureCallbackFunc callback);
+
 DE_INLINE deBool deGetFalse (void) { return DE_FALSE; }
 DE_INLINE deBool deGetTrue (void) { return DE_TRUE; }
 
@@ -273,10 +277,6 @@ DE_INLINE deBool deGetTrue (void) { return DE_TRUE; }
 #      define DE_ASSERT(X) /*@ -noeffect*/ ((void)0)   /*!< Assertion macro. */
 #endif
 
-/* Assertion failure callback. Requires DE_ASSERT_FAILURE_CALLBACK to be defined or otherwise has no effect. */
-typedef void (*deAssertFailureCallbackFunc) (const char* reason, const char* file, int line);
-void deSetAssertFailureCallback (deAssertFailureCallbackFunc callback);
-
 /* Verify macro. Behaves like assert in debug build, but executes statement in release build. */
 #if defined(DE_DEBUG)
 #      define DE_VERIFY(X) do { if ((!deGetFalse() && (X)) ? DE_FALSE : DE_TRUE) deAssertFail(#X, __FILE__, __LINE__); } while(deGetFalse())
@@ -284,16 +284,24 @@ void deSetAssertFailureCallback (deAssertFailureCallbackFunc callback);
 #      define DE_VERIFY(X) X
 #endif
 
+/* Fatal macro. */
+#if defined(DE_DEBUG) && !defined(DE_COVERAGE_BUILD)
+#      define DE_FATAL(MSG) do { deAssertFail("" /* force to string literal */ MSG, __FILE__, __LINE__); } while(deGetFalse())
+#else
+#      define DE_FATAL(MSG) /*@ -noeffect*/ ((void)0)  /*!< Fatal macro. */
+#endif
+
 /** Test assert macro for use in testers (same as DE_ASSERT, but always enabled). */
 #define DE_TEST_ASSERT(X) do { if ((!deGetFalse() && (X)) ? DE_FALSE : DE_TRUE) deAssertFail(#X, __FILE__, __LINE__); } while(deGetFalse())
 
-/** Compile-time assertion macro. */
 #if (DE_COMPILER == DE_COMPILER_GCC)
        /* GCC 4.8 and newer warns about unused typedefs. */
 #      define DE_UNUSED_TYPEDEF_ATTR __attribute__((unused))
 #else
 #      define DE_UNUSED_TYPEDEF_ATTR
 #endif
+
+/** Compile-time assertion macro. */
 #define DE_STATIC_ASSERT(X)                                            typedef char DE_UNIQUE_NAME[(X) ? 1 : -1] DE_UNUSED_TYPEDEF_ATTR
 #define DE_HEADER_STATIC_ASSERT(HEADERTOKEN, X)        typedef char DE_HEADER_UNIQUE_NAME(HEADERTOKEN)[(X) ? 1 : -1] DE_UNUSED_TYPEDEF_ATTR
 
@@ -312,7 +320,7 @@ void deSetAssertFailureCallback (deAssertFailureCallbackFunc callback);
 #elif (DE_CPU == DE_CPU_ARM) && (DE_COMPILER == DE_COMPILER_MSC)
 #      define DE_BREAKPOINT() do { printf("Software breakpoint encountered in %s, line %d\n", __FILE__, __LINE__); DebugBreak(); } while (deGetFalse())
 #else
-#      define DE_BREAKPOINT() DE_ASSERT(!"Software breakpoint encountered!")
+#      define DE_BREAKPOINT() DE_FATAL("Software breakpoint encountered!")
 #endif
 
 /** Swap two values. */
index 26aab59..59f1233 100644 (file)
@@ -76,7 +76,7 @@ deARGB deImage_getPixel (const deImage* image, int x, int y)
                case DE_IMAGEFORMAT_XRGB8888:   return *(deARGB*)addr;
                case DE_IMAGEFORMAT_ARGB8888:   return *(deARGB*)addr;
                default:
-                       DE_ASSERT(!"deImage_getPixel(): invalid format");
+                       DE_FATAL("deImage_getPixel(): invalid format");
                        return deARGB_black();
        }
 }
@@ -89,7 +89,7 @@ void deImage_setPixel (deImage* image, int x, int y, deARGB argb)
                case DE_IMAGEFORMAT_XRGB8888:   *(deARGB*)addr = argb;  break;
                case DE_IMAGEFORMAT_ARGB8888:   *(deARGB*)addr = argb;  break;
                default:
-                       DE_ASSERT(!"deImage_getPixel(): invalid format");
+                       DE_FATAL("deImage_getPixel(): invalid format");
        }
 }
 
index b837ac9..30d17d9 100644 (file)
@@ -243,7 +243,7 @@ deBool TYPENAME##_intersect (TYPENAME* to, const TYPENAME* a, const TYPENAME* b)
 \
 void TYPENAME##_intersectInplace (TYPENAME* a, const TYPENAME* b)      \
 {      \
-       DE_ASSERT(!"Not implemented."); \
+       DE_FATAL("Not implemented.");   \
 }      \
 \
 deBool TYPENAME##_sum (TYPENAME* to, const TYPENAME* a, const TYPENAME* b)     \
@@ -288,7 +288,7 @@ deBool TYPENAME##_difference (TYPENAME* to, const TYPENAME* a, const TYPENAME* b
 \
 void TYPENAME##_differenceInplace (TYPENAME* a, const TYPENAME* b)     \
 {      \
-       DE_ASSERT(!"Not implemented."); \
+       DE_FATAL("Not implemented.");   \
 }      \
 \
 struct TYPENAME##SetwiseImplementDummy_s { int dummy; }
index e827a1e..52f29bb 100644 (file)
@@ -538,7 +538,7 @@ deBool TYPENAME##_intersect (TYPENAME* to, const TYPENAME* a, const TYPENAME* b)
 void TYPENAME##_intersectInplace (TYPENAME* a, const TYPENAME* b)      \
 {      \
        DE_UNREF(a && b);       \
-       DE_ASSERT(!"Not implemented."); \
+       DE_FATAL("Not implemented.");   \
 }      \
 \
 deBool TYPENAME##_difference (TYPENAME* to, const TYPENAME* a, const TYPENAME* b)      \
index 751e34f..f3432b5 100644 (file)
@@ -281,7 +281,7 @@ static deBool deSocketAddressToBsdAddress (const deSocketAddress* address, size_
 
                if (bsdAddrBufSize < (size_t)result->ai_addrlen)
                {
-                       DE_ASSERT(!"Too small bsdAddr buffer");
+                       DE_FATAL("Too small bsdAddr buffer");
                        freeaddrinfo(result);
                        return DE_FALSE;
                }
@@ -315,7 +315,7 @@ static deBool deSocketAddressToBsdAddress (const deSocketAddress* address, size_
 
                if (bsdAddrBufSize < sizeof(struct sockaddr_in))
                {
-                       DE_ASSERT(!"Too small bsdAddr buffer");
+                       DE_FATAL("Too small bsdAddr buffer");
                        return DE_FALSE;
                }
 
@@ -333,7 +333,7 @@ static deBool deSocketAddressToBsdAddress (const deSocketAddress* address, size_
 
                if (bsdAddrBufSize < sizeof(struct sockaddr_in6))
                {
-                       DE_ASSERT(!"Too small bsdAddr buffer");
+                       DE_FATAL("Too small bsdAddr buffer");
                        return DE_FALSE;
                }
 
index 8e31e39..792e101 100644 (file)
@@ -50,7 +50,7 @@ glw::GLenum getImageGLTarget (EGLenum source)
                case EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR:    return GL_TEXTURE_CUBE_MAP_NEGATIVE_Z;
                case EGL_GL_TEXTURE_3D_KHR:                                             return GL_TEXTURE_3D;
                case EGL_GL_RENDERBUFFER_KHR:                                   return GL_RENDERBUFFER;
-               default:        DE_ASSERT(!"Impossible");                       return GL_NONE;
+               default:        DE_FATAL("Impossible");                         return GL_NONE;
        }
 }
 
@@ -67,10 +67,10 @@ EGLint apiRenderableType (glu::ApiType apiType)
                                case 1:         return EGL_OPENGL_ES_BIT;
                                case 2:         return EGL_OPENGL_ES2_BIT;
                                case 3:         return EGL_OPENGL_ES3_BIT_KHR;
-                               default:        DE_ASSERT(!"Unknown OpenGL ES version");
+                               default:        DE_FATAL("Unknown OpenGL ES version");
                        }
                default:
-                       DE_ASSERT(!"Unknown GL API");
+                       DE_FATAL("Unknown GL API");
        }
 
        return 0;
index ef9233c..69c4aaf 100644 (file)
@@ -568,7 +568,7 @@ int getDataTypeNumLocations (DataType dataType)
        else if (isDataTypeMatrix(dataType))
                return getDataTypeMatrixNumColumns(dataType);
 
-       DE_ASSERT(!"Illegal datatype.");
+       DE_FATAL("Illegal datatype.");
        return 0;
 }
 
@@ -579,7 +579,7 @@ int getDataTypeNumComponents (DataType dataType)
        else if (isDataTypeMatrix(dataType))
                return getDataTypeMatrixNumRows(dataType);
 
-       DE_ASSERT(!"Illegal datatype.");
+       DE_FATAL("Illegal datatype.");
        return 0;
 }
 
index 6db1647..304c598 100644 (file)
@@ -887,7 +887,7 @@ void GLContext::deleteProgram (deUint32 program)
                }
        }
 
-       DE_ASSERT(!"invalid delete");
+       DE_FATAL("invalid delete");
 }
 
 void GLContext::useProgram (deUint32 program)
index 2e416f7..872d648 100644 (file)
@@ -208,7 +208,7 @@ const UniformSlot& ShaderProgram::getUniformByName (const char* name) const
                if (m_uniforms[ndx].name == std::string(name))
                        return m_uniforms[ndx];
 
-       DE_ASSERT(!"Invalid uniform name, uniform not found.");
+       DE_FATAL("Invalid uniform name, uniform not found.");
        return m_uniforms[0];
 }
 
index 1f9e9bc..0f0ccb1 100644 (file)
@@ -317,7 +317,7 @@ GLXContext GlxVisual::createContext (const GlxContextFactory&       factory,
                        profileMask = GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
                        break;
                default:
-                       DE_ASSERT(!"Impossible context profile");
+                       DE_FATAL("Impossible context profile");
        }
 
        const int attribs[] =
@@ -413,7 +413,7 @@ static deUint32 surfaceTypeToDrawableBits (RenderConfig::SurfaceType type)
                case RenderConfig::SURFACETYPE_DONT_CARE:
                        return GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
                default:
-                       DE_ASSERT(!"Impossible case");
+                       DE_FATAL("Impossible case");
        }
        return 0;
 }
@@ -583,7 +583,7 @@ GlxDrawable* createDrawable (GlxVisual& visual, const RenderConfig& config)
        switch (surfaceType)
        {
                case RenderConfig::SURFACETYPE_DONT_CARE:
-                       DE_ASSERT(!"Impossible case");
+                       DE_FATAL("Impossible case");
 
                case RenderConfig::SURFACETYPE_WINDOW:
                        return new GlxWindow(visual, config);
index aad607e..619df0e 100644 (file)
@@ -76,7 +76,7 @@ void Window::release (void)
        else if (m_state == STATE_PENDING_DESTROY)
                m_state = STATE_READY_FOR_DESTROY;
        else
-               DE_ASSERT(!"Invalid window state");
+               DE_FATAL("Invalid window state");
 }
 
 void Window::markForDestroy (void)
@@ -88,7 +88,7 @@ void Window::markForDestroy (void)
        else if (m_state == STATE_IN_USE)
                m_state = STATE_PENDING_DESTROY;
        else
-               DE_ASSERT(!"Invalid window state");
+               DE_FATAL("Invalid window state");
 }
 
 bool Window::isPendingDestroy (void) const
@@ -128,7 +128,7 @@ WindowRegistry::~WindowRegistry (void)
                else
                {
                        print("ERROR: Window was not available for deletion, leaked tcu::Android::Window!\n");
-                       DE_ASSERT(!"Window leaked");
+                       DE_FATAL("Window leaked");
                }
        }
 }
index 4cdd741..dbda336 100644 (file)
@@ -90,7 +90,7 @@ public:
        virtual glu::ContextType                getType                                 (void) const { return m_type;                                                   }
        virtual const glw::Functions&   getFunctions                    (void) const { return m_functions;                                              }
        virtual const RenderTarget&             getRenderTarget                 (void) const { return m_emptyTarget;                                    }
-       virtual deUint32                                getDefaultFramebuffer   (void) const { DE_ASSERT(!"No framebuffer"); return 0;  }
+       virtual deUint32                                getDefaultFramebuffer   (void) const { DE_FATAL("No framebuffer"); return 0;    }
        virtual void                                    postIterate                             (void);
 
 protected:
index 98f9596..a04ec1a 100644 (file)
@@ -164,7 +164,7 @@ void assignMasked (ExecValueAccess dst, ExecConstValueAccess src, ExecConstValue
                }
 
                default:
-                       DE_ASSERT(!"Unsupported");
+                       DE_FATAL("Unsupported");
                        break;
        }
 }
index c807f29..4f9c752 100644 (file)
@@ -41,7 +41,7 @@ void GeometryEmitter::EmitVertex (const tcu::Vec4& position, float pointSize, co
 
        if (++m_numEmitted > m_maxVertices)
        {
-               DE_ASSERT(!"Undefined results, too many vertices emitted.");
+               DE_FATAL("Undefined results, too many vertices emitted.");
                return;
        }
 
index 7d2f2e1..506ed7f 100644 (file)
@@ -313,7 +313,7 @@ void readFloat (tcu::Vec4& dst, const VertexAttribType type, const int size, con
                case VERTEXATTRIBTYPE_PURE_INT8:
                case VERTEXATTRIBTYPE_PURE_INT16:
                case VERTEXATTRIBTYPE_PURE_INT32:
-                       DE_ASSERT(!"Invalid read");
+                       DE_FATAL("Invalid read");
 
                default:
                        DE_ASSERT(false);
@@ -359,7 +359,7 @@ void readInt (tcu::IVec4& dst, const VertexAttribType type, const int size, cons
                case VERTEXATTRIBTYPE_NONPURE_UNORM_2_10_10_10_REV_BGRA:
                case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_CLAMP_BGRA:
                case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_SCALE_BGRA:
-                       DE_ASSERT(!"Invalid read");
+                       DE_FATAL("Invalid read");
 
                default:
                        DE_ASSERT(false);
@@ -405,7 +405,7 @@ void readUint (tcu::UVec4& dst, const VertexAttribType type, const int size, con
                case VERTEXATTRIBTYPE_NONPURE_UNORM_2_10_10_10_REV_BGRA:
                case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_CLAMP_BGRA:
                case VERTEXATTRIBTYPE_NONPURE_SNORM_2_10_10_10_REV_SCALE_BGRA:
-                       DE_ASSERT(!"Invalid read");
+                       DE_FATAL("Invalid read");
 
                default:
                        DE_ASSERT(false);
index b6ef160..69575f4 100644 (file)
@@ -324,7 +324,7 @@ public:
                        case EGL_NATIVE_BUFFER_ANDROID:
                                return createAndroidNativeImageSource(format);
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                                return MovePtr<ImageSource>();
                }
        }
index 07221db..0fecb60 100644 (file)
@@ -474,7 +474,7 @@ MovePtr<ClientBuffer> RenderbufferImageSource::createBuffer (const glw::Function
                                initializeColorRbo(gl, rbo, *ref);
                                break;
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
 
                gl.bindFramebuffer(GL_FRAMEBUFFER, 0);
index dedbcc8..fcc36f6 100644 (file)
@@ -441,7 +441,7 @@ Framebuffer::Framebuffer (sglr::Context& context, const FboConfig& config, int w
                        break;
 
                case GL_TEXTURE_CUBE_MAP:
-                       DE_ASSERT(!"TODO");
+                       DE_FATAL("TODO");
                        break;
 
                case GL_RENDERBUFFER:
index 634b864..8db875c 100644 (file)
@@ -117,7 +117,7 @@ static ShaderEvalFunc getArrayCoordsEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_VEC3)   return evalArrayCoordsVec3;
        else if (dataType == TYPE_FLOAT_VEC4)   return evalArrayCoordsVec4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
@@ -133,7 +133,7 @@ static ShaderEvalFunc getArrayUniformEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_VEC3)   return evalArrayUniformVec3;
        else if (dataType == TYPE_FLOAT_VEC4)   return evalArrayUniformVec4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
@@ -641,7 +641,7 @@ static ShaderEvalFunc getVectorSubscriptEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_VEC3)   return evalSubscriptVec3;
        else if (dataType == TYPE_FLOAT_VEC4)   return evalSubscriptVec4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
@@ -827,7 +827,7 @@ static ShaderEvalFunc getMatrixSubscriptEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_MAT3)   return evalSubscriptMat3;
        else if (dataType == TYPE_FLOAT_MAT4)   return evalSubscriptMat4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
index 64df20b..db80378 100644 (file)
@@ -199,7 +199,7 @@ static ShaderEvalFunc getLoopEvalFunc (int numIters)
                case 3: return evalLoop3Iters;
        }
 
-       DE_ASSERT(!"Invalid loop iteration count.");
+       DE_FATAL("Invalid loop iteration count.");
        return NULL;
 }
 
index 0e06a18..8e1b882 100644 (file)
@@ -293,7 +293,7 @@ IterateResult NumLayersTest::build (FboBuilder& builder)
                        texCfg = &builder.makeConfig<Texture2DArray>();
                        break;
                default:
-                       DE_ASSERT(!"Impossible case");
+                       DE_FATAL("Impossible case");
        }
        texCfg->internalFormat = getDefaultFormat(target, GL_TEXTURE);
        texCfg->width = 64;
index 443b7dd..d72ef55 100644 (file)
@@ -317,7 +317,7 @@ static int getMinimumSampleCount (deUint32 format)
                        return 0;
 
                default:
-                       DE_ASSERT(!"Unknown format");
+                       DE_FATAL("Unknown format");
                        return 0;
        }
 }
index cd8e7c7..5e2e4f2 100644 (file)
@@ -1009,7 +1009,7 @@ glu::DataType getFragmentOutputType (const tcu::TextureFormat& format)
                        return glu::TYPE_INT_VEC4;
 
                default:
-                       DE_ASSERT(!"Unknown format");
+                       DE_FATAL("Unknown format");
                        return glu::TYPE_LAST;
        }
 }
@@ -1032,7 +1032,7 @@ tcu::TextureFormat getFramebufferReadFormat (const tcu::TextureFormat& format)
                        return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::SIGNED_INT32);
 
                default:
-                       DE_ASSERT(!"Unknown format");
+                       DE_FATAL("Unknown format");
                        return tcu::TextureFormat();
        }
 }
index b7fe3ce..d51181e 100644 (file)
@@ -110,7 +110,7 @@ static ShaderEvalFunc getArrayCoordsEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_VEC3)   return evalArrayCoordsVec3;
        else if (dataType == TYPE_FLOAT_VEC4)   return evalArrayCoordsVec4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
@@ -126,7 +126,7 @@ static ShaderEvalFunc getArrayUniformEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_VEC3)   return evalArrayUniformVec3;
        else if (dataType == TYPE_FLOAT_VEC4)   return evalArrayUniformVec4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
@@ -595,7 +595,7 @@ static ShaderEvalFunc getVectorSubscriptEvalFunc (DataType dataType)
        else if (dataType == TYPE_FLOAT_VEC3)   return evalSubscriptVec3;
        else if (dataType == TYPE_FLOAT_VEC4)   return evalSubscriptVec4;
 
-       DE_ASSERT(!"Invalid data type.");
+       DE_FATAL("Invalid data type.");
        return NULL;
 }
 
@@ -794,7 +794,7 @@ static ShaderEvalFunc getMatrixSubscriptEvalFunc (DataType dataType)
                case TYPE_FLOAT_MAT4:           return evalSubscriptMat4;
 
                default:
-                       DE_ASSERT(!"Invalid data type.");
+                       DE_FATAL("Invalid data type.");
                        return DE_NULL;
        }
 }
index a1b2127..d76bf6a 100644 (file)
@@ -196,7 +196,7 @@ static ShaderEvalFunc getLoopEvalFunc (int numIters)
                case 3: return evalLoop3Iters;
        }
 
-       DE_ASSERT(!"Invalid loop iteration count.");
+       DE_FATAL("Invalid loop iteration count.");
        return NULL;
 }
 
index 6a497ac..2c7370b 100644 (file)
@@ -830,7 +830,7 @@ void GetErrorCase::expectMessage (GLenum source, GLenum type)
 {
        DE_UNREF(source);
        DE_UNREF(type);
-       DE_ASSERT(!"GetErrorCase cannot handle anything other than error codes");
+       DE_FATAL("GetErrorCase cannot handle anything other than error codes");
 }
 
 void GetErrorCase::expectError (glw::GLenum error0, glw::GLenum error1)
@@ -1706,7 +1706,7 @@ LabelCase::IterateResult LabelCase::iterate (void)
                        break;
 
                default:
-                       DE_ASSERT(!"Invalid identifier");
+                       DE_FATAL("Invalid identifier");
        }
 
        gl.objectLabel(m_identifier, object, -1, msg);
@@ -1742,7 +1742,7 @@ LabelCase::IterateResult LabelCase::iterate (void)
                case GL_FRAMEBUFFER:            gl.deleteFramebuffers(1, &object);                      break;
 
                default:
-                       DE_ASSERT(!"Invalid identifier");
+                       DE_FATAL("Invalid identifier");
        }
 
        return STOP;
@@ -2864,7 +2864,7 @@ tcu::TestNode* createCase (CaseType type, Context& ctx, const char* name, const
                case CASETYPE_GETERROR: return new GetErrorCase(ctx, name, desc, function);
 
                default:
-                       DE_ASSERT(!"Invalid type");
+                       DE_FATAL("Invalid type");
        }
 
        return DE_NULL;
index 4d03eab..4497508 100644 (file)
@@ -322,7 +322,7 @@ static int getMinimumSampleCount (deUint32 format)
                        return 0;
 
                default:
-                       DE_ASSERT(!"Unknown format");
+                       DE_FATAL("Unknown format");
                        return 0;
        }
 }
index 0febea7..1170cca 100644 (file)
@@ -557,7 +557,7 @@ glu::DataType getFragmentOutputType (const tcu::TextureFormat& format)
                        return glu::TYPE_INT_VEC4;
 
                default:
-                       DE_ASSERT(!"Unknown format");
+                       DE_FATAL("Unknown format");
                        return glu::TYPE_LAST;
        }
 }
@@ -580,7 +580,7 @@ tcu::TextureFormat getFramebufferReadFormat (const tcu::TextureFormat& format)
                        return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::SIGNED_INT32);
 
                default:
-                       DE_ASSERT(!"Unknown format");
+                       DE_FATAL("Unknown format");
                        return tcu::TextureFormat();
        }
 }
index 2f89604..6c389d3 100644 (file)
@@ -138,7 +138,7 @@ DataType randomType (Random& rnd)
                return getDataTypeVector(scalarType, size);
        }
 
-       DE_ASSERT(!"Impossible");
+       DE_FATAL("Impossible");
        return TYPE_INVALID;
 }
 
@@ -163,7 +163,7 @@ glu::Interpolation getGluInterpolation (VaryingInterpolation interpolation)
                case VARYINGINTERPOLATION_CENTROID:     return glu::INTERPOLATION_CENTROID;
                case VARYINGINTERPOLATION_DEFAULT:      return glu::INTERPOLATION_LAST;         //!< Last means no qualifier, i.e. default
                default:
-                       DE_ASSERT(!"Invalid interpolation");
+                       DE_FATAL("Invalid interpolation");
                        return glu::INTERPOLATION_LAST;
        }
 }
@@ -179,7 +179,7 @@ VaryingInterpolation getVaryingInterpolation (glu::Interpolation interpolation)
                case glu::INTERPOLATION_CENTROID:       return VARYINGINTERPOLATION_CENTROID;
                case glu::INTERPOLATION_LAST:           return VARYINGINTERPOLATION_DEFAULT;            //!< Last means no qualifier, i.e. default
                default:
-                       DE_ASSERT(!"Invalid interpolation");
+                       DE_FATAL("Invalid interpolation");
                        return VARYINGINTERPOLATION_LAST;
        }
 }
@@ -218,7 +218,7 @@ void printInputColor (ostringstream& oss, const VariableDeclaration& input)
                }
 
                default:
-                       DE_ASSERT(!"Impossible");
+                       DE_FATAL("Impossible");
        }
 
        if (isDataTypeScalarOrVector(basicType))
@@ -238,7 +238,7 @@ void printInputColor (ostringstream& oss, const VariableDeclaration& input)
                                oss << exp;
                                break;
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
        }
        else if (isDataTypeMatrix(basicType))
@@ -262,7 +262,7 @@ void printInputColor (ostringstream& oss, const VariableDeclaration& input)
                }
        }
        else
-               DE_ASSERT(!"Impossible");
+               DE_FATAL("Impossible");
 }
 
 // Representation for the varyings between vertex and fragment shaders
@@ -432,7 +432,7 @@ void printRandomInitializer (ostringstream& oss, DataType type, Random& rnd)
                                break;
 
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
        }
 
@@ -842,7 +842,7 @@ void logParams (TestLog& log, const TestParams& params)
                                msg << "randomly either by name or by location.\n";
                                break;
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
 
                msg << "In the vertex shader the varyings are qualified ";
@@ -1157,7 +1157,7 @@ MovePtr<ProgramWrapper> SeparateShaderTest::createSingleShaderProgram (ShaderTyp
                        case glu::SHADERTYPE_FRAGMENT:
                                return createShaderProgram(DE_NULL, &src, true);
                        default:
-                               DE_ASSERT(!"Impossible case");
+                               DE_FATAL("Impossible case");
                }
        }
        return MovePtr<ProgramWrapper>(); // Shut up compiler warnings.
@@ -1756,7 +1756,7 @@ TestCaseGroup* createSeparateShaderTests (Context& ctx)
                                desc << "Varyings have same name, ";
                                break;
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
 
                describeInterpolation("vertex", vtxInterp, name, desc);
index 8fe0ee1..19cfbd7 100644 (file)
@@ -184,7 +184,7 @@ glu::DataType getDataTypeSamplerSampleType (glu::DataType type)
        else if (type >= TYPE_SAMPLER_1D_SHADOW && type <=      TYPE_SAMPLER_2D_ARRAY_SHADOW)
                return TYPE_FLOAT;
        else
-               DE_ASSERT(!"Unknown sampler type");
+               DE_FATAL("Unknown sampler type");
 
        return TYPE_INVALID;
 }
@@ -208,7 +208,7 @@ float UniformLocationCase::getExpectedValue (glu::DataType type, int id, const c
        else if (glu::isDataTypeBoolOrBVec(adjustedType))
                return float(hash%2);
        else
-               DE_ASSERT(!"Unkown primitive type");
+               DE_FATAL("Unkown primitive type");
 
        return glu::TYPE_INVALID;
 }
@@ -482,7 +482,7 @@ deUint32 getTextureFormat (glu::DataType samplerType)
                        return GL_RGBA8UI;
 
                default:
-                       DE_ASSERT(!"Unsupported (sampler) type");
+                       DE_FATAL("Unsupported (sampler) type");
                        return 0;
        }
 }
index 2d717d5..39a4500 100644 (file)
@@ -168,7 +168,7 @@ const char* dataTypeNameOf (void)
 template <>
 const char* dataTypeNameOf<Void> (void)
 {
-       DE_ASSERT(!"Impossible");
+       DE_FATAL("Impossible");
        return DE_NULL;
 }
 
@@ -182,7 +182,7 @@ VarType getVarTypeOf (Precision prec = glu::PRECISION_LAST)
 template <>
 VarType getVarTypeOf<Void> (Precision)
 {
-       DE_ASSERT(!"Impossible");
+       DE_FATAL("Impossible");
        return VarType();
 }
 
@@ -2090,7 +2090,7 @@ protected:
                        case glu::PRECISION_LOWP:
                                return ctx.format.ulp(ret, 2.0);
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
                return 0;
        }
@@ -2128,7 +2128,7 @@ protected:
                        case glu::PRECISION_LOWP:
                                return ctx.format.ulp(ret, 2.0);
                        default:
-                               DE_ASSERT(!"Impossible");
+                               DE_FATAL("Impossible");
                }
 
                return 0;
@@ -4944,7 +4944,7 @@ PrecisionCase* createFuncCase (const Context&     context,
                case 1:
                        return new InOutFuncCase<Sig>(context, name, func);
                default:
-                       DE_ASSERT(!"Impossible");
+                       DE_FATAL("Impossible");
        }
        return DE_NULL;
 }
index 3053279..28ca8ae 100644 (file)
@@ -1776,7 +1776,7 @@ char* RandomArrayGenerator::createIndices (int seed, int elementCount, int offse
        if (min < 0 || (size_t)min > std::numeric_limits<T>::max() ||
                max < 0 || (size_t)max > std::numeric_limits<T>::max() ||
                min > max)
-               DE_ASSERT(!"Invalid range");
+               DE_FATAL("Invalid range");
 
        for (int elementNdx = 0; elementNdx < elementCount; ++elementNdx)
        {
@@ -3203,7 +3203,7 @@ void DrawTest::init (void)
        else if (contextSupports(m_renderCtx.getType(), glu::ApiType::es(3,1)) || glu::isContextTypeGLCore(m_renderCtx.getType()))
                useVao = true;
        else
-               DE_ASSERT(!"Unknown context type");
+               DE_FATAL("Unknown context type");
 
        m_refBuffers    = new sglr::ReferenceContextBuffers(m_renderCtx.getRenderTarget().getPixelFormat(), 0, 0, renderTargetWidth, renderTargetHeight, renderTargetSamples);
        m_refContext    = new sglr::ReferenceContext(limits, m_refBuffers->getColorbuffer(), m_refBuffers->getDepthbuffer(), m_refBuffers->getStencilbuffer());
index db75fdf..73016fe 100644 (file)
@@ -713,7 +713,7 @@ Image* makeImage (GLenum bufType, ImageFormat format,
                        image = &builder.makeConfig<Texture2D>();
                        break;
                default:
-                       DE_ASSERT(!"Impossible case");
+                       DE_FATAL("Impossible case");
        }
        image->internalFormat = format;
        image->width = width;
@@ -827,7 +827,7 @@ string attTypeName (GLenum bufType)
                case GL_TEXTURE:
                        return "tex";
                default:
-                       DE_ASSERT(!"Impossible case");
+                       DE_FATAL("Impossible case");
        }
        return ""; // Shut up compiler
 }
index 749d25e..d734ae0 100644 (file)
@@ -322,7 +322,7 @@ static GLenum glTarget (const Image& img)
        if (dynamic_cast<const Texture2DArray*>(&img) != DE_NULL)
                return GL_TEXTURE_2D_ARRAY;
 
-       DE_ASSERT(!"Impossible image type");
+       DE_FATAL("Impossible image type");
        return GL_NONE;
 }
 
@@ -411,7 +411,7 @@ static GLuint glCreate (const Image& cfg, const glw::Functions& gl)
                gl.bindTexture(glTarget(*tex), 0);
        }
        else
-               DE_ASSERT(!"Impossible image type");
+               DE_FATAL("Impossible image type");
        return ret;
 }
 
@@ -422,7 +422,7 @@ static void glDelete (const Image& cfg, GLuint img, const glw::Functions& gl)
        else if (dynamic_cast<const Texture*>(&cfg) != DE_NULL)
                gl.deleteTextures(1, &img);
        else
-               DE_ASSERT(!"Impossible image type");
+               DE_FATAL("Impossible image type");
 }
 
 static void attachAttachment (const Attachment& att, GLenum attPoint,
@@ -441,7 +441,7 @@ static void attachAttachment (const Attachment& att, GLenum attPoint,
                gl.framebufferTextureLayer(lAtt->target, attPoint,
                                                                   lAtt->imageName, lAtt->level, lAtt->layer);
        else
-               DE_ASSERT(!"Impossible attachment type");
+               DE_FATAL("Impossible attachment type");
 }
 
 GLenum attachmentType (const Attachment& att)
@@ -451,7 +451,7 @@ GLenum attachmentType (const Attachment& att)
        else if (dynamic_cast<const TextureAttachment*>(&att) != DE_NULL)
                return GL_TEXTURE;
 
-       DE_ASSERT(!"Impossible attachment type");
+       DE_FATAL("Impossible attachment type");
        return GL_NONE;
 }
 
@@ -463,7 +463,7 @@ static GLsizei textureLayer (const TextureAttachment& tAtt)
                         dynamic_cast<const TextureLayerAttachment*>(&tAtt))
                return lAtt->layer;
 
-       DE_ASSERT(!"Impossible attachment type");
+       DE_FATAL("Impossible attachment type");
        return 0;
 }
 
@@ -660,7 +660,7 @@ const Image* Framebuffer::getImage (GLenum type, glw::GLuint imgName) const
                case GL_RENDERBUFFER:
                        return de::lookupDefault(rbos, imgName, DE_NULL);
                default:
-                       DE_ASSERT(!"Bad image type");
+                       DE_FATAL("Bad image type");
        }
        return DE_NULL; // shut up compiler warning
 }
index 11d51ad..96cbeea 100644 (file)
@@ -159,7 +159,7 @@ glu::ProgramSources genShaders(glu::GLSLVersion version)
                        break;
 
                default:
-                       DE_ASSERT(!"Unsupported version");
+                       DE_FATAL("Unsupported version");
        }
 
        return glu::makeVtxFragSources(tcu::StringTemplate(vtxSource).specialize(params), tcu::StringTemplate(frgSource).specialize(params));
@@ -767,7 +767,7 @@ BufferFmtDesc FramebufferClearCase::getBufferFormat (ClearType type)
                case CLEAR_COLOR_FLOAT:
                        retval.colorFmt = GL_RGBA16F;
                        retval.texFmt   = tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::HALF_FLOAT);
-                       DE_ASSERT(!"Floating point clear not implemented");// \todo [2014-1-23 otto] pixel read format & type, nothing guaranteed, need extension...
+                       DE_FATAL("Floating point clear not implemented");// \todo [2014-1-23 otto] pixel read format & type, nothing guaranteed, need extension...
                        break;
 
                case CLEAR_COLOR_INT:
index 1d9bb27..7a4e366 100644 (file)
@@ -575,7 +575,7 @@ static void setUniformValue (const glw::Functions& gl, const std::vector<deUint3
 
                        case TYPE_SAMPLER_2D:
                        case TYPE_SAMPLER_CUBE:
-                               DE_ASSERT(!"implement!");
+                               DE_FATAL("implement!");
                                break;
 
                        default:
index a35de5f..945c238 100644 (file)
@@ -2356,17 +2356,17 @@ tcu::TestCase* createTexParamTest (tcu::TestContext& testCtx, const glu::RenderC
 {
        if (isMultisampleTarget(target) && isSamplerStateTester(tester))
        {
-               DE_ASSERT(!"Multisample textures have no sampler state");
+               DE_FATAL("Multisample textures have no sampler state");
                return DE_NULL;
        }
        if (target == GL_TEXTURE_BUFFER)
        {
-               DE_ASSERT(!"Buffer textures have no texture state");
+               DE_FATAL("Buffer textures have no texture state");
                return DE_NULL;
        }
        if (target != GL_TEXTURE_3D && mapTesterToPname(tester) == GL_TEXTURE_WRAP_R)
        {
-               DE_ASSERT(!"Only 3D textures have wrap r filter");
+               DE_FATAL("Only 3D textures have wrap r filter");
                return DE_NULL;
        }
 
index 8811651..ab91da9 100644 (file)
@@ -1148,7 +1148,7 @@ glu::ShaderProgram* ProgramLibrary::getProgram (Program program)
                params["FRAG_COLOR"]    = "dEQP_FragColor";
        }
        else
-               DE_ASSERT(!"Unsupported version");
+               DE_FATAL("Unsupported version");
 
        params["PRECISION"]             = glu::getPrecisionName(m_texCoordPrecision);
 
@@ -1234,7 +1234,7 @@ glu::ShaderProgram* ProgramLibrary::getProgram (Program program)
                }
        }
        else
-               DE_ASSERT(!"Unsupported version");
+               DE_FATAL("Unsupported version");
 
        params["SAMPLER_TYPE"]  = sampler;
        params["LOOKUP"]                = lookup;