Vulkan: Conditionally enable CommandBufferLabelScope with GraphicsDebugLevel.All

This commit is contained in:
Wunkolo 2023-09-10 22:31:04 -07:00
parent 580c1cfb45
commit c16e52f9c2
3 changed files with 7 additions and 3 deletions

View file

@ -1687,7 +1687,7 @@ namespace Ryujinx.Graphics.Vulkan
{ {
PauseTransformFeedbackInternal(); PauseTransformFeedbackInternal();
Gd.Api.CmdEndRenderPass(CommandBuffer); Gd.Api.CmdEndRenderPass(CommandBuffer);
_renderPassLabelScope.Dispose(); _renderPassLabelScope?.Dispose();
_renderPassLabelScope = null; _renderPassLabelScope = null;
SignalRenderPassEnd(); SignalRenderPassEnd();
RenderPassActive = false; RenderPassActive = false;

View file

@ -786,7 +786,7 @@ namespace Ryujinx.Graphics.Vulkan
for (int level = 0; level < levels; level++) for (int level = 0; level < levels; level++)
{ {
debugScope.InsertLabel($"level: {level}", new ColorF(1, 1, 0, 1)); debugScope?.InsertLabel($"level: {level}", new ColorF(1, 1, 0, 1));
int mipSize = GetBufferDataLength(Info.GetMipSize2D(dstLevel + level) * dstLayers); int mipSize = GetBufferDataLength(Info.GetMipSize2D(dstLevel + level) * dstLayers);

View file

@ -36,7 +36,11 @@ namespace Ryujinx.Graphics.Vulkan
public ILabelScope CreateLabelScope(CommandBuffer commandBuffer, string scopeName, ColorF scopeColor) public ILabelScope CreateLabelScope(CommandBuffer commandBuffer, string scopeName, ColorF scopeColor)
{ {
return new CommandBufferLabelScope(_debugUtils, commandBuffer, scopeName, scopeColor); if (_logLevel == GraphicsDebugLevel.All)
{
return new CommandBufferLabelScope(_debugUtils, commandBuffer, scopeName, scopeColor);
}
return null;
} }
private Result TryInitialize(out DebugUtilsMessengerEXT? debugUtilsMessengerHandle) private Result TryInitialize(out DebugUtilsMessengerEXT? debugUtilsMessengerHandle)