Reduce debug log noise by only logging header msg for

shader debug logs if at least one shader log exists.
This commit is contained in:
Bill Hollings 2021-02-25 17:19:53 -05:00
parent 08d9fa8ea2
commit a4d36cb757

View File

@ -358,8 +358,12 @@ void MVKQueueCommandBufferSubmission::commitActiveMTLCommandBuffer(bool signalCo
} }
#if MVK_XCODE_12 #if MVK_XCODE_12
if (mvkGetMVKConfiguration()->debugMode) { if (mvkGetMVKConfiguration()->debugMode) {
MVKLogInfo("Shader log messages:"); bool isFirstMsg = true;
for (id<MTLFunctionLog> log in mtlCB.logs) { for (id<MTLFunctionLog> log in mtlCB.logs) {
if (isFirstMsg) {
MVKLogInfo("Shader log messages:");
isFirstMsg = false;
}
MVKLogInfo("%s", log.description.UTF8String); MVKLogInfo("%s", log.description.UTF8String);
} }
} }