Port PIX color helpers from pix3.h file
このコミットが含まれているのは:
1 親
2256f875c9
コミット
903c5504c6
2ファイル変更
+44
-1
検索条件に一致するファイルはありません
@@ -6,7 +6,7 @@ namespace ComputeSharp.Interop;
|
||||
/// <summary>
|
||||
/// A collection of native bindings for PIX APIs (see <see href="https://devblogs.microsoft.com/pix/winpixeventruntime/"/>).
|
||||
/// </summary>
|
||||
internal static unsafe class Pix
|
||||
internal static unsafe partial class Pix
|
||||
{
|
||||
/// <summary>
|
||||
/// Starts a PIX event on a target <see cref="ID3D12GraphicsCommandList"/> object.
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: pix3.h
|
||||
* Content: PIX include file
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// The following methods in this file have been ported from the
|
||||
// pix3.h file in the winpixeventruntime.1.0.220124001 package.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace ComputeSharp.Interop;
|
||||
|
||||
/// <inheritdoc/>
|
||||
partial class Pix
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a <see cref="uint"/> value representing a color for a PIX event.
|
||||
/// </summary>
|
||||
/// <param name="r">The red channel value for the color.</param>
|
||||
/// <param name="g">The green channel value for the color.</param>
|
||||
/// <param name="b">The blue channel value for the color.</param>
|
||||
/// <returns>A <see cref="uint"/> value representing a color for a PIX event.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static uint PIX_COLOR(byte r, byte g, byte b)
|
||||
{
|
||||
return 0xFF000000 | ((uint)r << 16) | ((uint)g << 8) | b;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="uint"/> value representing an indexed color for a PIX event.
|
||||
/// </summary>
|
||||
/// <param name="i">The index of the event to get the color for.</param>
|
||||
/// <returns>A <see cref="uint"/> value representing an indexed color for a PIX event.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static uint PIX_COLOR_INDEX(byte i)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする