Reduce ID3D12InfoQueue debug output allocations
このコミットが含まれているのは:
1 親
16ccc67bd9
コミット
1fa665fe88
1ファイル変更
+6
-1
@@ -16,6 +16,11 @@ namespace ComputeSharp.Graphics.Helpers;
|
||||
/// <inheritdoc/>
|
||||
internal static partial class DeviceHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// A shared <see cref="StringBuilder"/> used from <see cref="FlushAllID3D12InfoQueueMessagesAndCheckForErrorsOrWarnings"/> to create messages.
|
||||
/// </summary>
|
||||
private static StringBuilder? infoQueueMessageBuilder;
|
||||
|
||||
/// <summary>
|
||||
/// Flushes all the pending debug messages for all existing <see cref="ID3D12Device"/> instances to the console/debugger.
|
||||
/// It also checks whether or not there are any error messages being logged that didn't result in an actual crash yet.
|
||||
@@ -27,7 +32,7 @@ internal static partial class DeviceHelper
|
||||
|
||||
lock (DevicesCache)
|
||||
{
|
||||
StringBuilder builder = new(1024);
|
||||
StringBuilder builder = infoQueueMessageBuilder ??= new(1024);
|
||||
|
||||
foreach (var pair in D3D12InfoQueueMap)
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする