diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/common/swr_assert.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/swr_assert.cpp b/src/gallium/drivers/swr/rasterizer/common/swr_assert.cpp index 49587d097c0..72501014de4 100644 --- a/src/gallium/drivers/swr/rasterizer/common/swr_assert.cpp +++ b/src/gallium/drivers/swr/rasterizer/common/swr_assert.cpp @@ -121,8 +121,6 @@ bool SwrAssert( const char* pFmtString /* = nullptr */, ...) { - if (!enabled) return false; - SetTextColor(stderr, TEXT_CYAN, TEXT_NORMAL); fprintf(stderr, "%s(%d): ", pFileName, lineNum); @@ -182,7 +180,7 @@ bool SwrAssert( OutputDebugStringA("\n"); } - if (KNOB_ENABLE_ASSERT_DIALOGS) + if (enabled && KNOB_ENABLE_ASSERT_DIALOGS) { int retval = sprintf_s( &msgBuf[offset], @@ -228,11 +226,11 @@ bool SwrAssert( } else { - return IsDebuggerPresent() || !chkDebugger; + return (IsDebuggerPresent() || !chkDebugger) && enabled; } #endif // _WIN32 - return true; + return enabled; } #endif // SWR_ENABLE_ASSERTS |