diff options
author | Tim Rowley <[email protected]> | 2016-08-01 18:10:18 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-08-10 11:07:00 -0500 |
commit | 8d3b20135ea3b6bad6eebdb043119b66d8d63712 (patch) | |
tree | 1a24da3ebc78d86b586d91e2d11108ab3fb4a834 | |
parent | 6575ebdc4570b54ad98eaa2db19703a636acdc9d (diff) |
swr: [rasterizer common] make disabled asserts always print (but not break)
Signed-off-by: Tim Rowley <[email protected]>
-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 |