Add WinPixEventRuntime for D3D12 to provide GPU profiler event names

This commit is contained in:
Wojtek Figat
2024-07-03 18:30:11 +02:00
parent b8100e9417
commit 230c57cca4

View File

@@ -12,7 +12,7 @@ public class GraphicsDeviceDX12 : GraphicsDeviceBaseModule
/// <summary> /// <summary>
/// Enables using PIX events to instrument game labeling regions of CPU or GPU work and marking important occurrences. /// Enables using PIX events to instrument game labeling regions of CPU or GPU work and marking important occurrences.
/// </summary> /// </summary>
public bool UseWinPixEventRuntime = false; public static bool EnableWinPixEventRuntime = true;
/// <inheritdoc /> /// <inheritdoc />
public override void Setup(BuildOptions options) public override void Setup(BuildOptions options)
@@ -34,7 +34,7 @@ public class GraphicsDeviceDX12 : GraphicsDeviceBaseModule
break; break;
} }
if (UseWinPixEventRuntime) if (EnableWinPixEventRuntime && options.Configuration != TargetConfiguration.Release)
{ {
options.PrivateDefinitions.Add("USE_PIX"); options.PrivateDefinitions.Add("USE_PIX");
options.PrivateIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/ThirdParty/WinPixEventRuntime")); options.PrivateIncludePaths.Add(Path.Combine(Globals.EngineRoot, "Source/ThirdParty/WinPixEventRuntime"));