Enable custom HLSL bit shift operators

このコミットが含まれているのは:
Sergio Pedri committed 2022-09-16 10:38:38 -07:00
1 親 d9dffde131
コミット 284b76afaf
11ファイル変更
+16 -84

検索条件に一致するファイルはありません

-2
ファイルの表示
@@ -701,7 +701,6 @@ public unsafe partial struct Int2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2 operator ~(Int2 xy) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int2"/> value.
/// </summary>
@@ -737,7 +736,6 @@ public unsafe partial struct Int2
/// <returns>The result of shifting <paramref name="xy"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2 operator <<(Int2 xy, UInt2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int2"/> value.
-2
ファイルの表示
@@ -1967,7 +1967,6 @@ public unsafe partial struct Int3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3 operator ~(Int3 xyz) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int3"/> value.
/// </summary>
@@ -2003,7 +2002,6 @@ public unsafe partial struct Int3
/// <returns>The result of shifting <paramref name="xyz"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3 operator <<(Int3 xyz, UInt3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int3"/> value.
-2
ファイルの表示
@@ -5053,7 +5053,6 @@ public unsafe partial struct Int4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator ~(Int4 xyzw) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int4"/> value.
/// </summary>
@@ -5089,7 +5088,6 @@ public unsafe partial struct Int4
/// <returns>The result of shifting <paramref name="xyzw"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4 operator <<(Int4 xyzw, UInt4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int4"/> value.
-32
ファイルの表示
@@ -214,7 +214,6 @@ public unsafe partial struct Int1x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x1 operator ~(Int1x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int1x1"/> value.
/// </summary>
@@ -250,7 +249,6 @@ public unsafe partial struct Int1x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x1 operator <<(Int1x1 matrix, UInt1x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int1x1"/> value.
@@ -625,7 +623,6 @@ public unsafe partial struct Int1x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x2 operator ~(Int1x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int1x2"/> value.
/// </summary>
@@ -661,7 +658,6 @@ public unsafe partial struct Int1x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x2 operator <<(Int1x2 matrix, UInt1x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int1x2"/> value.
@@ -1054,7 +1050,6 @@ public unsafe partial struct Int1x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x3 operator ~(Int1x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int1x3"/> value.
/// </summary>
@@ -1090,7 +1085,6 @@ public unsafe partial struct Int1x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x3 operator <<(Int1x3 matrix, UInt1x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int1x3"/> value.
@@ -1495,7 +1489,6 @@ public unsafe partial struct Int1x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x4 operator ~(Int1x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int1x4"/> value.
/// </summary>
@@ -1531,7 +1524,6 @@ public unsafe partial struct Int1x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int1x4 operator <<(Int1x4 matrix, UInt1x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int1x4"/> value.
@@ -1898,7 +1890,6 @@ public unsafe partial struct Int2x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x1 operator ~(Int2x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int2x1"/> value.
/// </summary>
@@ -1934,7 +1925,6 @@ public unsafe partial struct Int2x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x1 operator <<(Int2x1 matrix, UInt2x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int2x1"/> value.
@@ -2268,7 +2258,6 @@ public unsafe partial struct Int2x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x2 operator ~(Int2x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int2x2"/> value.
/// </summary>
@@ -2304,7 +2293,6 @@ public unsafe partial struct Int2x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x2 operator <<(Int2x2 matrix, UInt2x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int2x2"/> value.
@@ -2742,7 +2730,6 @@ public unsafe partial struct Int2x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x3 operator ~(Int2x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int2x3"/> value.
/// </summary>
@@ -2778,7 +2765,6 @@ public unsafe partial struct Int2x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x3 operator <<(Int2x3 matrix, UInt2x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int2x3"/> value.
@@ -3242,7 +3228,6 @@ public unsafe partial struct Int2x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x4 operator ~(Int2x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int2x4"/> value.
/// </summary>
@@ -3278,7 +3263,6 @@ public unsafe partial struct Int2x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int2x4 operator <<(Int2x4 matrix, UInt2x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int2x4"/> value.
@@ -3651,7 +3635,6 @@ public unsafe partial struct Int3x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x1 operator ~(Int3x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int3x1"/> value.
/// </summary>
@@ -3687,7 +3670,6 @@ public unsafe partial struct Int3x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x1 operator <<(Int3x1 matrix, UInt3x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int3x1"/> value.
@@ -4132,7 +4114,6 @@ public unsafe partial struct Int3x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x2 operator ~(Int3x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int3x2"/> value.
/// </summary>
@@ -4168,7 +4149,6 @@ public unsafe partial struct Int3x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x2 operator <<(Int3x2 matrix, UInt3x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int3x2"/> value.
@@ -4562,7 +4542,6 @@ public unsafe partial struct Int3x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x3 operator ~(Int3x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int3x3"/> value.
/// </summary>
@@ -4598,7 +4577,6 @@ public unsafe partial struct Int3x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x3 operator <<(Int3x3 matrix, UInt3x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int3x3"/> value.
@@ -5115,7 +5093,6 @@ public unsafe partial struct Int3x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x4 operator ~(Int3x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int3x4"/> value.
/// </summary>
@@ -5151,7 +5128,6 @@ public unsafe partial struct Int3x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int3x4 operator <<(Int3x4 matrix, UInt3x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int3x4"/> value.
@@ -5536,7 +5512,6 @@ public unsafe partial struct Int4x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x1 operator ~(Int4x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int4x1"/> value.
/// </summary>
@@ -5572,7 +5547,6 @@ public unsafe partial struct Int4x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x1 operator <<(Int4x1 matrix, UInt4x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int4x1"/> value.
@@ -6044,7 +6018,6 @@ public unsafe partial struct Int4x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x2 operator ~(Int4x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int4x2"/> value.
/// </summary>
@@ -6080,7 +6053,6 @@ public unsafe partial struct Int4x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x2 operator <<(Int4x2 matrix, UInt4x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int4x2"/> value.
@@ -6598,7 +6570,6 @@ public unsafe partial struct Int4x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x3 operator ~(Int4x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int4x3"/> value.
/// </summary>
@@ -6634,7 +6605,6 @@ public unsafe partial struct Int4x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x3 operator <<(Int4x3 matrix, UInt4x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int4x3"/> value.
@@ -7120,7 +7090,6 @@ public unsafe partial struct Int4x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x4 operator ~(Int4x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="Int4x4"/> value.
/// </summary>
@@ -7156,7 +7125,6 @@ public unsafe partial struct Int4x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static Int4x4 operator <<(Int4x4 matrix, UInt4x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="Int4x4"/> value.
-2
ファイルの表示
@@ -428,7 +428,6 @@ public unsafe partial struct <#=fullTypeName#>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static <#=fullTypeName#> operator ~(<#=fullTypeName#> matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
/// </summary>
@@ -464,7 +463,6 @@ public unsafe partial struct <#=fullTypeName#>
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, UInt<#=rows#>x<#=columns#> amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
-2
ファイルの表示
@@ -604,7 +604,6 @@ public unsafe partial struct UInt2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2 operator ~(UInt2 xy) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt2"/> value.
/// </summary>
@@ -640,7 +639,6 @@ public unsafe partial struct UInt2
/// <returns>The result of shifting <paramref name="xy"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2 operator <<(UInt2 xy, UInt2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt2"/> value.
-2
ファイルの表示
@@ -1870,7 +1870,6 @@ public unsafe partial struct UInt3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3 operator ~(UInt3 xyz) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt3"/> value.
/// </summary>
@@ -1906,7 +1905,6 @@ public unsafe partial struct UInt3
/// <returns>The result of shifting <paramref name="xyz"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3 operator <<(UInt3 xyz, UInt3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt3"/> value.
-2
ファイルの表示
@@ -4956,7 +4956,6 @@ public unsafe partial struct UInt4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4 operator ~(UInt4 xyzw) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt4"/> value.
/// </summary>
@@ -4992,7 +4991,6 @@ public unsafe partial struct UInt4
/// <returns>The result of shifting <paramref name="xyzw"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4 operator <<(UInt4 xyzw, UInt4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt4"/> value.
-32
ファイルの表示
@@ -188,7 +188,6 @@ public unsafe partial struct UInt1x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x1 operator ~(UInt1x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt1x1"/> value.
/// </summary>
@@ -224,7 +223,6 @@ public unsafe partial struct UInt1x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x1 operator <<(UInt1x1 matrix, UInt1x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt1x1"/> value.
@@ -490,7 +488,6 @@ public unsafe partial struct UInt1x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x2 operator ~(UInt1x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt1x2"/> value.
/// </summary>
@@ -526,7 +523,6 @@ public unsafe partial struct UInt1x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x2 operator <<(UInt1x2 matrix, UInt1x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt1x2"/> value.
@@ -810,7 +806,6 @@ public unsafe partial struct UInt1x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x3 operator ~(UInt1x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt1x3"/> value.
/// </summary>
@@ -846,7 +841,6 @@ public unsafe partial struct UInt1x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x3 operator <<(UInt1x3 matrix, UInt1x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt1x3"/> value.
@@ -1142,7 +1136,6 @@ public unsafe partial struct UInt1x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x4 operator ~(UInt1x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt1x4"/> value.
/// </summary>
@@ -1178,7 +1171,6 @@ public unsafe partial struct UInt1x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt1x4 operator <<(UInt1x4 matrix, UInt1x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt1x4"/> value.
@@ -1450,7 +1442,6 @@ public unsafe partial struct UInt2x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x1 operator ~(UInt2x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt2x1"/> value.
/// </summary>
@@ -1486,7 +1477,6 @@ public unsafe partial struct UInt2x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x1 operator <<(UInt2x1 matrix, UInt2x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt2x1"/> value.
@@ -1795,7 +1785,6 @@ public unsafe partial struct UInt2x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x2 operator ~(UInt2x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt2x2"/> value.
/// </summary>
@@ -1831,7 +1820,6 @@ public unsafe partial struct UInt2x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x2 operator <<(UInt2x2 matrix, UInt2x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt2x2"/> value.
@@ -2160,7 +2148,6 @@ public unsafe partial struct UInt2x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x3 operator ~(UInt2x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt2x3"/> value.
/// </summary>
@@ -2196,7 +2183,6 @@ public unsafe partial struct UInt2x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x3 operator <<(UInt2x3 matrix, UInt2x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt2x3"/> value.
@@ -2551,7 +2537,6 @@ public unsafe partial struct UInt2x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x4 operator ~(UInt2x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt2x4"/> value.
/// </summary>
@@ -2587,7 +2572,6 @@ public unsafe partial struct UInt2x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt2x4 operator <<(UInt2x4 matrix, UInt2x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt2x4"/> value.
@@ -2865,7 +2849,6 @@ public unsafe partial struct UInt3x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x1 operator ~(UInt3x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt3x1"/> value.
/// </summary>
@@ -2901,7 +2884,6 @@ public unsafe partial struct UInt3x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x1 operator <<(UInt3x1 matrix, UInt3x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt3x1"/> value.
@@ -3237,7 +3219,6 @@ public unsafe partial struct UInt3x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x2 operator ~(UInt3x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt3x2"/> value.
/// </summary>
@@ -3273,7 +3254,6 @@ public unsafe partial struct UInt3x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x2 operator <<(UInt3x2 matrix, UInt3x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt3x2"/> value.
@@ -3642,7 +3622,6 @@ public unsafe partial struct UInt3x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x3 operator ~(UInt3x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt3x3"/> value.
/// </summary>
@@ -3678,7 +3657,6 @@ public unsafe partial struct UInt3x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x3 operator <<(UInt3x3 matrix, UInt3x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt3x3"/> value.
@@ -4086,7 +4064,6 @@ public unsafe partial struct UInt3x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x4 operator ~(UInt3x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt3x4"/> value.
/// </summary>
@@ -4122,7 +4099,6 @@ public unsafe partial struct UInt3x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt3x4 operator <<(UInt3x4 matrix, UInt3x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt3x4"/> value.
@@ -4412,7 +4388,6 @@ public unsafe partial struct UInt4x1
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x1 operator ~(UInt4x1 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt4x1"/> value.
/// </summary>
@@ -4448,7 +4423,6 @@ public unsafe partial struct UInt4x1
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x1 operator <<(UInt4x1 matrix, UInt4x1 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt4x1"/> value.
@@ -4811,7 +4785,6 @@ public unsafe partial struct UInt4x2
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x2 operator ~(UInt4x2 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt4x2"/> value.
/// </summary>
@@ -4847,7 +4820,6 @@ public unsafe partial struct UInt4x2
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x2 operator <<(UInt4x2 matrix, UInt4x2 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt4x2"/> value.
@@ -5256,7 +5228,6 @@ public unsafe partial struct UInt4x3
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x3 operator ~(UInt4x3 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt4x3"/> value.
/// </summary>
@@ -5292,7 +5263,6 @@ public unsafe partial struct UInt4x3
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x3 operator <<(UInt4x3 matrix, UInt4x3 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt4x3"/> value.
@@ -5753,7 +5723,6 @@ public unsafe partial struct UInt4x4
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x4 operator ~(UInt4x4 matrix) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="UInt4x4"/> value.
/// </summary>
@@ -5789,7 +5758,6 @@ public unsafe partial struct UInt4x4
/// <returns>The result of shifting <paramref name="matrix"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static UInt4x4 operator <<(UInt4x4 matrix, UInt4x4 amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="UInt4x4"/> value.
-2
ファイルの表示
@@ -494,7 +494,6 @@ public unsafe partial struct <#=typeName#>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static <#=typeName#> operator ~(<#=typeName#> <#=argumentName#>) => default;
#if NEEDS_CSHARP_11
/// <summary>
/// Shifts right a <see cref="<#=typeName#>"/> value.
/// </summary>
@@ -530,7 +529,6 @@ public unsafe partial struct <#=typeName#>
/// <returns>The result of shifting <paramref name="<#=argumentName#>"/> left by <paramref name="amount"/>.</returns>
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
public static <#=typeName#> operator <<(<#=typeName#> <#=argumentName#>, UInt<#=i#> amount) => default;
#endif
/// <summary>
/// Bitwise ands a <see cref="<#=typeName#>"/> value.
+16 -4
ファイルの表示
@@ -135,7 +135,7 @@ public partial class ShaderRewriterTests
[AllDevices]
public void BitwiseHlslOperators(Device device)
{
int[] data = { 186456131, 215486738, unchecked((int)416439712738), unchecked((int)1437124371243), 0, 0, 0, 0 };
int[] data = { 186456131, 215486738, unchecked((int)416439712738), unchecked((int)1437124371243), 0, 0, 0, 0, 0, 0, 0, 0 };
using ReadWriteBuffer<int> buffer = device.Get().AllocateReadWriteBuffer(data);
@@ -151,6 +151,9 @@ public partial class ShaderRewriterTests
int2 e = new(a.X | (int)b.X, a.Y | (int)b.Y);
int2 f = new(a.X ^ (int)b.X, a.Y ^ (int)b.Y);
int2 g = new(a.X >> 5, a.Y >> 12);
int2 h = new(a.X << 22, a.Y << 17);
Assert.AreEqual(results[0], c.X);
Assert.AreEqual(results[1], c.Y);
Assert.AreEqual(results[2], d.X);
@@ -159,6 +162,10 @@ public partial class ShaderRewriterTests
Assert.AreEqual(results[5], e.Y);
Assert.AreEqual(results[6], f.X);
Assert.AreEqual(results[7], f.Y);
Assert.AreEqual(results[8], g.X);
Assert.AreEqual(results[9], g.Y);
Assert.AreEqual(results[10], h.X);
Assert.AreEqual(results[11], h.Y);
}
[AutoConstructor]
@@ -176,9 +183,10 @@ public partial class ShaderRewriterTests
int2 e = a | b;
int2 f = a ^ b;
#if NEEDS_CSHARP_11
// TODO: add bit shifting tests
#endif
int2 sr = new(5, 12);
uint2 sl = new(22, 17);
int2 g = a >> sr;
int2 h = a << sl;
buffer[0] = c.X;
buffer[1] = c.Y;
@@ -188,6 +196,10 @@ public partial class ShaderRewriterTests
buffer[5] = e.Y;
buffer[6] = f.X;
buffer[7] = f.Y;
buffer[8] = g.X;
buffer[9] = g.Y;
buffer[10] = h.X;
buffer[11] = h.Y;
}
}