From 8d3b20135ea3b6bad6eebdb043119b66d8d63712 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Mon, 1 Aug 2016 18:10:18 -0600 Subject: swr: [rasterizer common] make disabled asserts always print (but not break) Signed-off-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/common/swr_assert.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3