Merge pull request #818 from Sergio0694/dev/operator-overloads
Add new HLSL operators for 'int' and 'uint' operands
このコミットが含まれているのは:
11ファイル変更
+3735
検索条件に一致するファイルはありません
@@ -695,6 +695,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="Int2"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xy"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="Int2"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xy"/> right 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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
@@ -713,6 +731,24 @@ 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, UInt2 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="Int2"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="Int2"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
@@ -731,6 +767,24 @@ 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, UInt2 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
@@ -749,6 +803,24 @@ 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 left, UInt2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
@@ -767,6 +839,24 @@ 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 left, UInt2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int2"/> value.
|
||||
/// </summary>
|
||||
|
||||
@@ -2035,6 +2035,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="Int3"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyz"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="Int3"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyz"/> right 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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
@@ -2053,6 +2071,24 @@ 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, UInt3 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="Int3"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="Int3"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
@@ -2071,6 +2107,24 @@ 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, UInt3 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
@@ -2089,6 +2143,24 @@ 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 left, UInt3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
@@ -2107,6 +2179,24 @@ 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 left, UInt3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int3"/> value.
|
||||
/// </summary>
|
||||
|
||||
@@ -5372,6 +5372,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="Int4"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyzw"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="Int4"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyzw"/> right 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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
@@ -5390,6 +5408,24 @@ 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, UInt4 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="Int4"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="Int4"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
@@ -5408,6 +5444,24 @@ 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, UInt4 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
@@ -5426,6 +5480,24 @@ 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 left, UInt4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
@@ -5444,6 +5516,24 @@ 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 left, UInt4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="Int4"/> value.
|
||||
/// </summary>
|
||||
|
||||
ファイル差分が大きすぎるため表示されません。
差分を読み込み
@@ -449,6 +449,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="matrix"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="matrix"/> right 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 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -467,6 +485,24 @@ 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, UInt<#=rows#>x<#=columns#> amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The <see cref="<#=fullTypeName#>"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -485,6 +521,24 @@ 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, UInt<#=rows#>x<#=columns#> amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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#> left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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#> left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -503,6 +557,24 @@ 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#> left, UInt<#=rows#>x<#=columns#> right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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#> left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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#> left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -521,6 +593,24 @@ 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#> left, UInt<#=rows#>x<#=columns#> right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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#> left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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#> left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="<#=fullTypeName#>"/> value.
|
||||
/// </summary>
|
||||
|
||||
@@ -598,6 +598,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="UInt2"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xy"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="UInt2"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xy"/> right 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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
@@ -616,6 +634,24 @@ 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, UInt2 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="UInt2"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xy">The <see cref="UInt2"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
@@ -634,6 +670,24 @@ 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, UInt2 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt2"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt2"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
@@ -652,6 +706,24 @@ 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 left, UInt2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt2"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt2"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
@@ -670,6 +742,24 @@ 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 left, UInt2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt2"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt2"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt2"/> value.
|
||||
/// </summary>
|
||||
|
||||
@@ -1938,6 +1938,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="UInt3"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyz"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="UInt3"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyz"/> right 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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
@@ -1956,6 +1974,24 @@ 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, UInt3 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="UInt3"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyz">The <see cref="UInt3"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
@@ -1974,6 +2010,24 @@ 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, UInt3 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt3"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt3"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
@@ -1992,6 +2046,24 @@ 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 left, UInt3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt3"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt3"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
@@ -2010,6 +2082,24 @@ 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 left, UInt3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt3"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt3"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt3"/> value.
|
||||
/// </summary>
|
||||
|
||||
@@ -5275,6 +5275,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="UInt4"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyzw"/> right 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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="UInt4"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="xyzw"/> right 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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
@@ -5293,6 +5311,24 @@ 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, UInt4 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="UInt4"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="xyzw">The <see cref="UInt4"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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, uint amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
@@ -5311,6 +5347,24 @@ 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, UInt4 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt4"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt4"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
@@ -5329,6 +5383,24 @@ 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 left, UInt4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt4"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt4"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
@@ -5347,6 +5419,24 @@ 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 left, UInt4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt4"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="UInt4"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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 left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="UInt4"/> value.
|
||||
/// </summary>
|
||||
|
||||
ファイル差分が大きすぎるため表示されません。
差分を読み込み
@@ -480,6 +480,24 @@ 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;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="<#=argumentName#>">The <see cref="<#=typeName#>"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="<#=argumentName#>"/> right 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#>, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="<#=argumentName#>">The <see cref="<#=typeName#>"/> value to shift right.</param>
|
||||
/// <param name="amount">The amount to shift each element right by.</param>
|
||||
/// <returns>The result of shifting <paramref name="<#=argumentName#>"/> right 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 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts right a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -498,6 +516,24 @@ 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#>, UInt<#=i#> amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="<#=argumentName#>">The <see cref="<#=typeName#>"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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#>, int amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="<#=argumentName#>">The <see cref="<#=typeName#>"/> value to shift left.</param>
|
||||
/// <param name="amount">The amount to shift each element left by.</param>
|
||||
/// <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 amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Shifts left a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -516,6 +552,24 @@ 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#>, UInt<#=i#> amount) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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#> left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to bitwise and.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise and between <paramref name="left"/> and <paramref name="right"/>.</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#> left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ands a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -534,6 +588,24 @@ 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#> left, UInt<#=i#> right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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#> left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to bitwise or.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise or between <paramref name="left"/> and <paramref name="right"/>.</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#> left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise ors a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
@@ -552,6 +624,24 @@ 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#> left, UInt<#=i#> right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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#> left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to bitwise xor.</param>
|
||||
/// <param name="right">The <see cref="uint"/> value to combine.</param>
|
||||
/// <returns>The result of performing the bitwise xor between <paramref name="left"/> and <paramref name="right"/>.</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#> left, uint right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Bitwise xors a <see cref="<#=typeName#>"/> value.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CommunityToolkit.HighPerformance;
|
||||
using ComputeSharp.Interop;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
@@ -262,6 +263,140 @@ public partial class ShaderRewriterTests
|
||||
}
|
||||
}
|
||||
|
||||
// See https://github.com/Sergio0694/ComputeSharp/issues/817
|
||||
[CombinatorialTestMethod]
|
||||
[AllDevices]
|
||||
public void AmbiguousHlslOperators(Device device)
|
||||
{
|
||||
int[] data = new int[30];
|
||||
|
||||
new Random(42).NextBytes(data.AsSpan(0, 14).Cast<int, byte>());
|
||||
|
||||
using ReadWriteBuffer<int> buffer = device.Get().AllocateReadWriteBuffer(data);
|
||||
|
||||
device.Get().For(1, new AmbiguousHlslOperatorsShader(buffer));
|
||||
|
||||
int[] results = buffer.ToArray();
|
||||
|
||||
int2 a = new(data[0], data[1]);
|
||||
uint2 b = new((uint)data[2], (uint)data[3]);
|
||||
int2x3 c = new(data[4], data[5], data[6], data[7], data[8], data[9]);
|
||||
uint2x2 d = new((uint)data[10], (uint)data[11], (uint)data[12], (uint)data[13]);
|
||||
|
||||
int2 a_shift_int = new(a.X << 2, a.Y << 2);
|
||||
int2 a_shift_uint = new(a.X >> 2, a.Y >> 2);
|
||||
int2 a_and_int = new(a.X & 1, a.Y & 1);
|
||||
int2 a_and_uint = new(a.X & 4, a.Y & 4);
|
||||
int2 a_or_int = new(a.X | 1, a.Y | 1);
|
||||
int2 a_or_uint = new(a.X | 4, a.Y | 4);
|
||||
int2 a_xor_int = new(a.X ^ 2, a.Y ^ 2);
|
||||
int2 a_xor_uint = new(a.X ^ 5, a.Y ^ 5);
|
||||
|
||||
uint2 b_shift_int = new(b.X << 2, b.Y << 2);
|
||||
uint2 b_shift_uint = new(b.X >> 2, b.Y >> 2);
|
||||
|
||||
int2x3 c_shift_int = new(c.M11 << 2, c.M12 << 2, c.M13 << 2, c.M21 << 2, c.M22 << 2, c.M23 << 2);
|
||||
uint2x2 d_shift_int = new(d.M11 >> 2, d.M12 >> 2, d.M21 >> 2, d.M22 >> 2);
|
||||
|
||||
Assert.AreEqual(results[0], a_shift_int.X);
|
||||
Assert.AreEqual(results[1], a_shift_int.Y);
|
||||
Assert.AreEqual(results[2], a_shift_uint.X);
|
||||
Assert.AreEqual(results[3], a_shift_uint.Y);
|
||||
Assert.AreEqual(results[4], a_and_int.X);
|
||||
Assert.AreEqual(results[5], a_and_int.Y);
|
||||
Assert.AreEqual(results[6], a_and_uint.X);
|
||||
Assert.AreEqual(results[7], a_and_uint.Y);
|
||||
Assert.AreEqual(results[8], a_or_int.X);
|
||||
Assert.AreEqual(results[9], a_or_int.Y);
|
||||
Assert.AreEqual(results[10], a_or_uint.X);
|
||||
Assert.AreEqual(results[11], a_or_uint.Y);
|
||||
Assert.AreEqual(results[12], a_xor_int.X);
|
||||
Assert.AreEqual(results[13], a_xor_int.Y);
|
||||
Assert.AreEqual(results[14], a_xor_uint.X);
|
||||
Assert.AreEqual(results[15], a_xor_uint.Y);
|
||||
|
||||
Assert.AreEqual(results[16], (int)b_shift_int.X);
|
||||
Assert.AreEqual(results[17], (int)b_shift_int.Y);
|
||||
Assert.AreEqual(results[18], (int)b_shift_uint.X);
|
||||
Assert.AreEqual(results[19], (int)b_shift_uint.Y);
|
||||
|
||||
Assert.AreEqual(results[20], c_shift_int.M11);
|
||||
Assert.AreEqual(results[21], c_shift_int.M12);
|
||||
Assert.AreEqual(results[22], c_shift_int.M13);
|
||||
Assert.AreEqual(results[23], c_shift_int.M21);
|
||||
Assert.AreEqual(results[24], c_shift_int.M22);
|
||||
Assert.AreEqual(results[25], c_shift_int.M23);
|
||||
|
||||
Assert.AreEqual(results[26], (int)d_shift_int.M11);
|
||||
Assert.AreEqual(results[27], (int)d_shift_int.M12);
|
||||
Assert.AreEqual(results[28], (int)d_shift_int.M21);
|
||||
Assert.AreEqual(results[29], (int)d_shift_int.M22);
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
[ThreadGroupSize(DefaultThreadGroupSizes.X)]
|
||||
[GeneratedComputeShaderDescriptor]
|
||||
internal readonly partial struct AmbiguousHlslOperatorsShader : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<int> buffer;
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
int2 a = new(buffer[0], buffer[1]);
|
||||
uint2 b = new((uint)buffer[2], (uint)buffer[3]);
|
||||
int2x3 c = new(buffer[4], buffer[5], buffer[6], buffer[7], buffer[8], buffer[9]);
|
||||
uint2x2 d = new((uint)buffer[10], (uint)buffer[11], (uint)buffer[12], (uint)buffer[13]);
|
||||
|
||||
int2 a_shift_int = a << 2;
|
||||
int2 a_shift_uint = a >> 2u;
|
||||
int2 a_and_int = a & 1;
|
||||
int2 a_and_uint = a & 4u;
|
||||
int2 a_or_int = a | 1;
|
||||
int2 a_or_uint = a | 4u;
|
||||
int2 a_xor_int = a ^ 2;
|
||||
int2 a_xor_uint = a ^ 5;
|
||||
|
||||
uint2 b_shift_int = b << 2;
|
||||
uint2 b_shift_uint = b >> 2u;
|
||||
|
||||
int2x3 c_shift_int = c << 2;
|
||||
uint2x2 d_shift_int = d >> 2;
|
||||
|
||||
buffer[0] = a_shift_int.X;
|
||||
buffer[1] = a_shift_int.Y;
|
||||
buffer[2] = a_shift_uint.X;
|
||||
buffer[3] = a_shift_uint.Y;
|
||||
buffer[4] = a_and_int.X;
|
||||
buffer[5] = a_and_int.Y;
|
||||
buffer[6] = a_and_uint.X;
|
||||
buffer[7] = a_and_uint.Y;
|
||||
buffer[8] = a_or_int.X;
|
||||
buffer[9] = a_or_int.Y;
|
||||
buffer[10] = a_or_uint.X;
|
||||
buffer[11] = a_or_uint.Y;
|
||||
buffer[12] = a_xor_int.X;
|
||||
buffer[13] = a_xor_int.Y;
|
||||
buffer[14] = a_xor_uint.X;
|
||||
buffer[15] = a_xor_uint.Y;
|
||||
buffer[16] = (int)b_shift_int.X;
|
||||
buffer[17] = (int)b_shift_int.Y;
|
||||
buffer[18] = (int)b_shift_uint.X;
|
||||
buffer[19] = (int)b_shift_uint.Y;
|
||||
|
||||
buffer[20] = c_shift_int.M11;
|
||||
buffer[21] = c_shift_int.M12;
|
||||
buffer[22] = c_shift_int.M13;
|
||||
buffer[23] = c_shift_int.M21;
|
||||
buffer[24] = c_shift_int.M22;
|
||||
buffer[25] = c_shift_int.M23;
|
||||
|
||||
buffer[26] = (int)d_shift_int.M11;
|
||||
buffer[27] = (int)d_shift_int.M12;
|
||||
buffer[28] = (int)d_shift_int.M21;
|
||||
buffer[29] = (int)d_shift_int.M22;
|
||||
}
|
||||
}
|
||||
|
||||
[CombinatorialTestMethod]
|
||||
[AllDevices]
|
||||
public void ToBooleanConversionHlslIntrinsics(Device device)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする