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();
Gd.Api.CmdEndRenderPass(CommandBuffer);
_renderPassLabelScope.Dispose();
_renderPassLabelScope?.Dispose();
_renderPassLabelScope = null;
SignalRenderPassEnd();
RenderPassActive = false;

View file

@ -786,7 +786,7 @@ namespace Ryujinx.Graphics.Vulkan
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);

View file

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