Add USE_PIX conditional attributes to PIX APIs
このコミットが含まれているのは:
1 親
e6acc57384
コミット
6144932685
1ファイル変更
+9
-1
@@ -1,4 +1,5 @@
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using ComputeSharp.Graphics.Commands;
|
||||
using ComputeSharp.Interop;
|
||||
|
||||
@@ -15,6 +16,7 @@ public static class ComputeContextExtensions
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to start the PIX event.</param>
|
||||
/// <param name="color">The color to use for the event (the alpha channel will be ignored).</param>
|
||||
/// <param name="message">The message to use for the event.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void BeginEvent(this in ComputeContext context, Color color, string message)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
@@ -31,6 +33,7 @@ public static class ComputeContextExtensions
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to start the PIX event.</param>
|
||||
/// <param name="index">The index to identify the group this event belongs to (PIX will choose a color to represent all entries in the group).</param>
|
||||
/// <param name="message">The message to use for the event.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void BeginEvent(this in ComputeContext context, byte index, string message)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
@@ -45,6 +48,7 @@ public static class ComputeContextExtensions
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to start the PIX event.</param>
|
||||
/// <param name="message">The message to use for the event.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void BeginEvent(this in ComputeContext context, string message)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
@@ -56,6 +60,7 @@ public static class ComputeContextExtensions
|
||||
/// Ends a PIX event on a target <see cref="ComputeContext"/> object.
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to end the PIX event.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void EndEvent(this in ComputeContext context)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
@@ -69,6 +74,7 @@ public static class ComputeContextExtensions
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to insert the PIX marker.</param>
|
||||
/// <param name="color">The color to use for the log (the alpha channel will be ignored).</param>
|
||||
/// <param name="message">The message to use for the marker.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void Log(this in ComputeContext context, Color color, string message)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
@@ -85,6 +91,7 @@ public static class ComputeContextExtensions
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to insert the PIX marker.</param>
|
||||
/// <param name="index">The index to identify the group this log belongs to (PIX will choose a color to represent all entries in the group).</param>
|
||||
/// <param name="message">The message to use for the marker.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void Log(this in ComputeContext context, byte index, string message)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
@@ -99,6 +106,7 @@ public static class ComputeContextExtensions
|
||||
/// </summary>
|
||||
/// <param name="context">The <see cref="ComputeContext"/> to use to insert the PIX marker.</param>
|
||||
/// <param name="message">The message to use for the marker.</param>
|
||||
[Conditional("USE_PIX")]
|
||||
public static unsafe void Log(this in ComputeContext context, string message)
|
||||
{
|
||||
ref CommandList commandList = ref ComputeContext.GetCommandList(in context, pipelineState: null);
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする