diff --git a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs index bb1f892c..c9b8caed 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int2.g.cs @@ -701,7 +701,6 @@ public unsafe partial struct Int2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2 operator ~(Int2 xy) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -737,7 +736,6 @@ public unsafe partial struct Int2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2 operator <<(Int2 xy, UInt2 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs index d9f6e94b..93b19e50 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int3.g.cs @@ -1967,7 +1967,6 @@ public unsafe partial struct Int3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3 operator ~(Int3 xyz) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -2003,7 +2002,6 @@ public unsafe partial struct Int3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3 operator <<(Int3 xyz, UInt3 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs index 91052f1b..c52b8518 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int4.g.cs @@ -5053,7 +5053,6 @@ public unsafe partial struct Int4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4 operator ~(Int4 xyzw) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -5089,7 +5088,6 @@ public unsafe partial struct Int4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4 operator <<(Int4 xyzw, UInt4 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs index 05247962..86627011 100644 --- a/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/Int/IntMxN.g.cs @@ -214,7 +214,6 @@ public unsafe partial struct Int1x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x1 operator ~(Int1x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -250,7 +249,6 @@ public unsafe partial struct Int1x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x1 operator <<(Int1x1 matrix, UInt1x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -625,7 +623,6 @@ public unsafe partial struct Int1x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x2 operator ~(Int1x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -661,7 +658,6 @@ public unsafe partial struct Int1x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x2 operator <<(Int1x2 matrix, UInt1x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -1054,7 +1050,6 @@ public unsafe partial struct Int1x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x3 operator ~(Int1x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1090,7 +1085,6 @@ public unsafe partial struct Int1x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x3 operator <<(Int1x3 matrix, UInt1x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -1495,7 +1489,6 @@ public unsafe partial struct Int1x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x4 operator ~(Int1x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1531,7 +1524,6 @@ public unsafe partial struct Int1x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int1x4 operator <<(Int1x4 matrix, UInt1x4 amount) => default; -#endif /// /// Bitwise ands a value. @@ -1898,7 +1890,6 @@ public unsafe partial struct Int2x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x1 operator ~(Int2x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1934,7 +1925,6 @@ public unsafe partial struct Int2x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x1 operator <<(Int2x1 matrix, UInt2x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -2268,7 +2258,6 @@ public unsafe partial struct Int2x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x2 operator ~(Int2x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -2304,7 +2293,6 @@ public unsafe partial struct Int2x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x2 operator <<(Int2x2 matrix, UInt2x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -2742,7 +2730,6 @@ public unsafe partial struct Int2x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x3 operator ~(Int2x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -2778,7 +2765,6 @@ public unsafe partial struct Int2x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x3 operator <<(Int2x3 matrix, UInt2x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -3242,7 +3228,6 @@ public unsafe partial struct Int2x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x4 operator ~(Int2x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -3278,7 +3263,6 @@ public unsafe partial struct Int2x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int2x4 operator <<(Int2x4 matrix, UInt2x4 amount) => default; -#endif /// /// Bitwise ands a value. @@ -3651,7 +3635,6 @@ public unsafe partial struct Int3x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x1 operator ~(Int3x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -3687,7 +3670,6 @@ public unsafe partial struct Int3x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x1 operator <<(Int3x1 matrix, UInt3x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -4132,7 +4114,6 @@ public unsafe partial struct Int3x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x2 operator ~(Int3x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -4168,7 +4149,6 @@ public unsafe partial struct Int3x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x2 operator <<(Int3x2 matrix, UInt3x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -4562,7 +4542,6 @@ public unsafe partial struct Int3x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x3 operator ~(Int3x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -4598,7 +4577,6 @@ public unsafe partial struct Int3x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x3 operator <<(Int3x3 matrix, UInt3x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -5115,7 +5093,6 @@ public unsafe partial struct Int3x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x4 operator ~(Int3x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -5151,7 +5128,6 @@ public unsafe partial struct Int3x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int3x4 operator <<(Int3x4 matrix, UInt3x4 amount) => default; -#endif /// /// Bitwise ands a value. @@ -5536,7 +5512,6 @@ public unsafe partial struct Int4x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x1 operator ~(Int4x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -5572,7 +5547,6 @@ public unsafe partial struct Int4x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x1 operator <<(Int4x1 matrix, UInt4x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -6044,7 +6018,6 @@ public unsafe partial struct Int4x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x2 operator ~(Int4x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -6080,7 +6053,6 @@ public unsafe partial struct Int4x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x2 operator <<(Int4x2 matrix, UInt4x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -6598,7 +6570,6 @@ public unsafe partial struct Int4x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x3 operator ~(Int4x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -6634,7 +6605,6 @@ public unsafe partial struct Int4x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x3 operator <<(Int4x3 matrix, UInt4x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -7120,7 +7090,6 @@ public unsafe partial struct Int4x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x4 operator ~(Int4x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -7156,7 +7125,6 @@ public unsafe partial struct Int4x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static Int4x4 operator <<(Int4x4 matrix, UInt4x4 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude index 952d5834..d1129567 100644 --- a/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude +++ b/src/ComputeSharp.Core/Primitives/MatrixType.ttinclude @@ -428,7 +428,6 @@ public unsafe partial struct <#=fullTypeName#> /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static <#=fullTypeName#> operator ~(<#=fullTypeName#> matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -464,7 +463,6 @@ public unsafe partial struct <#=fullTypeName#> /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static <#=fullTypeName#> operator <<(<#=fullTypeName#> matrix, UInt<#=rows#>x<#=columns#> amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs index 5ad06ea4..7f96a4dd 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt2.g.cs @@ -604,7 +604,6 @@ public unsafe partial struct UInt2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2 operator ~(UInt2 xy) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -640,7 +639,6 @@ public unsafe partial struct UInt2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2 operator <<(UInt2 xy, UInt2 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs index cee8dfe4..628c62ca 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.g.cs @@ -1870,7 +1870,6 @@ public unsafe partial struct UInt3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3 operator ~(UInt3 xyz) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1906,7 +1905,6 @@ public unsafe partial struct UInt3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3 operator <<(UInt3 xyz, UInt3 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs index 5146b413..1f741878 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.g.cs @@ -4956,7 +4956,6 @@ public unsafe partial struct UInt4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4 operator ~(UInt4 xyzw) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -4992,7 +4991,6 @@ public unsafe partial struct UInt4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4 operator <<(UInt4 xyzw, UInt4 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs b/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs index 47ab580e..365620dd 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UIntMxN.g.cs @@ -188,7 +188,6 @@ public unsafe partial struct UInt1x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x1 operator ~(UInt1x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -224,7 +223,6 @@ public unsafe partial struct UInt1x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x1 operator <<(UInt1x1 matrix, UInt1x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -490,7 +488,6 @@ public unsafe partial struct UInt1x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x2 operator ~(UInt1x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -526,7 +523,6 @@ public unsafe partial struct UInt1x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x2 operator <<(UInt1x2 matrix, UInt1x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -810,7 +806,6 @@ public unsafe partial struct UInt1x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x3 operator ~(UInt1x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -846,7 +841,6 @@ public unsafe partial struct UInt1x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x3 operator <<(UInt1x3 matrix, UInt1x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -1142,7 +1136,6 @@ public unsafe partial struct UInt1x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x4 operator ~(UInt1x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1178,7 +1171,6 @@ public unsafe partial struct UInt1x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt1x4 operator <<(UInt1x4 matrix, UInt1x4 amount) => default; -#endif /// /// Bitwise ands a value. @@ -1450,7 +1442,6 @@ public unsafe partial struct UInt2x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x1 operator ~(UInt2x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1486,7 +1477,6 @@ public unsafe partial struct UInt2x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x1 operator <<(UInt2x1 matrix, UInt2x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -1795,7 +1785,6 @@ public unsafe partial struct UInt2x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x2 operator ~(UInt2x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -1831,7 +1820,6 @@ public unsafe partial struct UInt2x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x2 operator <<(UInt2x2 matrix, UInt2x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -2160,7 +2148,6 @@ public unsafe partial struct UInt2x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x3 operator ~(UInt2x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -2196,7 +2183,6 @@ public unsafe partial struct UInt2x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x3 operator <<(UInt2x3 matrix, UInt2x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -2551,7 +2537,6 @@ public unsafe partial struct UInt2x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x4 operator ~(UInt2x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -2587,7 +2572,6 @@ public unsafe partial struct UInt2x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt2x4 operator <<(UInt2x4 matrix, UInt2x4 amount) => default; -#endif /// /// Bitwise ands a value. @@ -2865,7 +2849,6 @@ public unsafe partial struct UInt3x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x1 operator ~(UInt3x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -2901,7 +2884,6 @@ public unsafe partial struct UInt3x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x1 operator <<(UInt3x1 matrix, UInt3x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -3237,7 +3219,6 @@ public unsafe partial struct UInt3x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x2 operator ~(UInt3x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -3273,7 +3254,6 @@ public unsafe partial struct UInt3x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x2 operator <<(UInt3x2 matrix, UInt3x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -3642,7 +3622,6 @@ public unsafe partial struct UInt3x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x3 operator ~(UInt3x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -3678,7 +3657,6 @@ public unsafe partial struct UInt3x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x3 operator <<(UInt3x3 matrix, UInt3x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -4086,7 +4064,6 @@ public unsafe partial struct UInt3x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x4 operator ~(UInt3x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -4122,7 +4099,6 @@ public unsafe partial struct UInt3x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt3x4 operator <<(UInt3x4 matrix, UInt3x4 amount) => default; -#endif /// /// Bitwise ands a value. @@ -4412,7 +4388,6 @@ public unsafe partial struct UInt4x1 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x1 operator ~(UInt4x1 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -4448,7 +4423,6 @@ public unsafe partial struct UInt4x1 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x1 operator <<(UInt4x1 matrix, UInt4x1 amount) => default; -#endif /// /// Bitwise ands a value. @@ -4811,7 +4785,6 @@ public unsafe partial struct UInt4x2 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x2 operator ~(UInt4x2 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -4847,7 +4820,6 @@ public unsafe partial struct UInt4x2 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x2 operator <<(UInt4x2 matrix, UInt4x2 amount) => default; -#endif /// /// Bitwise ands a value. @@ -5256,7 +5228,6 @@ public unsafe partial struct UInt4x3 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x3 operator ~(UInt4x3 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -5292,7 +5263,6 @@ public unsafe partial struct UInt4x3 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x3 operator <<(UInt4x3 matrix, UInt4x3 amount) => default; -#endif /// /// Bitwise ands a value. @@ -5753,7 +5723,6 @@ public unsafe partial struct UInt4x4 /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x4 operator ~(UInt4x4 matrix) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -5789,7 +5758,6 @@ public unsafe partial struct UInt4x4 /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static UInt4x4 operator <<(UInt4x4 matrix, UInt4x4 amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude index d84b74d2..367770a6 100644 --- a/src/ComputeSharp.Core/Primitives/VectorType.ttinclude +++ b/src/ComputeSharp.Core/Primitives/VectorType.ttinclude @@ -494,7 +494,6 @@ public unsafe partial struct <#=typeName#> /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static <#=typeName#> operator ~(<#=typeName#> <#=argumentName#>) => default; -#if NEEDS_CSHARP_11 /// /// Shifts right a value. /// @@ -530,7 +529,6 @@ public unsafe partial struct <#=typeName#> /// The result of shifting left by . /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static <#=typeName#> operator <<(<#=typeName#> <#=argumentName#>, UInt<#=i#> amount) => default; -#endif /// /// Bitwise ands a value. diff --git a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs index 2d12710a..4ca56f7e 100644 --- a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs +++ b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs @@ -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 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; } }