Fix [UnscopedRef] use on readonly members

このコミットが含まれているのは:
Sergio Pedri committed 2022-09-16 10:38:38 -07:00
1 親 61e8b8b4cb
コミット 41ce2277c7
20ファイル変更
+2817 -1832

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

+1 -1
ファイルの表示
@@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.4.0-2.22402.20" PrivateAssets="all" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.4.0-2.22412.12" PrivateAssets="all" />
</ItemGroup>
<!-- Centralized location for all generated artifacts -->
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+10 -9
ファイルの表示
@@ -35,7 +35,8 @@ public unsafe partial struct Double2
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref double this[int i] => ref *(double*)UndefinedData;
[UnscopedRef]
public ref double this[int i] => ref *(double*)UndefinedData;
/// <summary>
/// Gets a <see cref="Double2"/> value with all components set to 0.
@@ -61,13 +62,13 @@ public unsafe partial struct Double2
/// Gets a reference to the <see cref="double"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double X => ref this.x;
public ref double X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double Y => ref this.y;
public ref double Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -81,14 +82,14 @@ public unsafe partial struct Double2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 XY => ref *(Double2*)UndefinedData;
public ref Double2 XY => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 YX => ref *(Double2*)UndefinedData;
public ref Double2 YX => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -269,13 +270,13 @@ public unsafe partial struct Double2
/// Gets a reference to the <see cref="double"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double R => ref this.x;
public ref double R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double G => ref this.y;
public ref double G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -289,14 +290,14 @@ public unsafe partial struct Double2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 RG => ref *(Double2*)UndefinedData;
public ref Double2 RG => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 GR => ref *(Double2*)UndefinedData;
public ref Double2 GR => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="G"/>, <see cref="G"/>.
+32 -31
ファイルの表示
@@ -38,7 +38,8 @@ public unsafe partial struct Double3
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref double this[int i] => ref *(double*)UndefinedData;
[UnscopedRef]
public ref double this[int i] => ref *(double*)UndefinedData;
/// <summary>
/// Gets a <see cref="Double3"/> value with all components set to 0.
@@ -69,19 +70,19 @@ public unsafe partial struct Double3
/// Gets a reference to the <see cref="double"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double X => ref this.x;
public ref double X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double Y => ref this.y;
public ref double Y => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>Z</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double Z => ref this.z;
public ref double Z => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -95,21 +96,21 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 XY => ref *(Double2*)UndefinedData;
public ref Double2 XY => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="X"/>, <see cref="Z"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 XZ => ref *(Double2*)UndefinedData;
public ref Double2 XZ => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 YX => ref *(Double2*)UndefinedData;
public ref Double2 YX => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -123,21 +124,21 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 YZ => ref *(Double2*)UndefinedData;
public ref Double2 YZ => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="Z"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 ZX => ref *(Double2*)UndefinedData;
public ref Double2 ZX => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="Z"/>, <see cref="Y"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 ZY => ref *(Double2*)UndefinedData;
public ref Double2 ZY => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="Z"/>, <see cref="Z"/>.
@@ -186,7 +187,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 XYZ => ref *(Double3*)UndefinedData;
public ref Double3 XYZ => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="X"/>.
@@ -200,7 +201,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 XZY => ref *(Double3*)UndefinedData;
public ref Double3 XZY => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="Z"/>.
@@ -228,7 +229,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 YXZ => ref *(Double3*)UndefinedData;
public ref Double3 YXZ => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
@@ -256,7 +257,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 YZX => ref *(Double3*)UndefinedData;
public ref Double3 YZX => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Y"/>, <see cref="Z"/>, <see cref="Y"/>.
@@ -284,7 +285,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 ZXY => ref *(Double3*)UndefinedData;
public ref Double3 ZXY => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Z"/>, <see cref="X"/>, <see cref="Z"/>.
@@ -298,7 +299,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 ZYX => ref *(Double3*)UndefinedData;
public ref Double3 ZYX => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="Z"/>, <see cref="Y"/>, <see cref="Y"/>.
@@ -906,19 +907,19 @@ public unsafe partial struct Double3
/// Gets a reference to the <see cref="double"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double R => ref this.x;
public ref double R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double G => ref this.y;
public ref double G => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="double"/> value representing the <c>B</c> component.
/// </summary>
[UnscopedRef]
public readonly ref double B => ref this.z;
public ref double B => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -932,21 +933,21 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 RG => ref *(Double2*)UndefinedData;
public ref Double2 RG => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="R"/>, <see cref="B"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 RB => ref *(Double2*)UndefinedData;
public ref Double2 RB => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 GR => ref *(Double2*)UndefinedData;
public ref Double2 GR => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="G"/>, <see cref="G"/>.
@@ -960,21 +961,21 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 GB => ref *(Double2*)UndefinedData;
public ref Double2 GB => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="B"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 BR => ref *(Double2*)UndefinedData;
public ref Double2 BR => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Double2"/> value with the components <see cref="B"/>, <see cref="G"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double2 BG => ref *(Double2*)UndefinedData;
public ref Double2 BG => ref *(Double2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double2"/> value with the components <see cref="B"/>, <see cref="B"/>.
@@ -1023,7 +1024,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 RGB => ref *(Double3*)UndefinedData;
public ref Double3 RGB => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="R"/>.
@@ -1037,7 +1038,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 RBG => ref *(Double3*)UndefinedData;
public ref Double3 RBG => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="B"/>.
@@ -1065,7 +1066,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 GRB => ref *(Double3*)UndefinedData;
public ref Double3 GRB => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
@@ -1093,7 +1094,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 GBR => ref *(Double3*)UndefinedData;
public ref Double3 GBR => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="G"/>, <see cref="B"/>, <see cref="G"/>.
@@ -1121,7 +1122,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 BRG => ref *(Double3*)UndefinedData;
public ref Double3 BRG => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="B"/>, <see cref="R"/>, <see cref="B"/>.
@@ -1135,7 +1136,7 @@ public unsafe partial struct Double3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Double3 BGR => ref *(Double3*)UndefinedData;
public ref Double3 BGR => ref *(Double3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Double3"/> value with the components <see cref="B"/>, <see cref="G"/>, <see cref="G"/>.
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+10 -9
ファイルの表示
@@ -36,7 +36,8 @@ public unsafe partial struct Float2
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref float this[int i] => ref *(float*)UndefinedData;
[UnscopedRef]
public ref float this[int i] => ref *(float*)UndefinedData;
/// <summary>
/// Gets a <see cref="Float2"/> value with all components set to 0.
@@ -62,13 +63,13 @@ public unsafe partial struct Float2
/// Gets a reference to the <see cref="float"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float X => ref this.x;
public ref float X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float Y => ref this.y;
public ref float Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -82,14 +83,14 @@ public unsafe partial struct Float2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 XY => ref *(Float2*)UndefinedData;
public ref Float2 XY => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 YX => ref *(Float2*)UndefinedData;
public ref Float2 YX => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -270,13 +271,13 @@ public unsafe partial struct Float2
/// Gets a reference to the <see cref="float"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float R => ref this.x;
public ref float R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float G => ref this.y;
public ref float G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -290,14 +291,14 @@ public unsafe partial struct Float2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 RG => ref *(Float2*)UndefinedData;
public ref Float2 RG => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 GR => ref *(Float2*)UndefinedData;
public ref Float2 GR => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="G"/>, <see cref="G"/>.
+32 -31
ファイルの表示
@@ -39,7 +39,8 @@ public unsafe partial struct Float3
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref float this[int i] => ref *(float*)UndefinedData;
[UnscopedRef]
public ref float this[int i] => ref *(float*)UndefinedData;
/// <summary>
/// Gets a <see cref="Float3"/> value with all components set to 0.
@@ -70,19 +71,19 @@ public unsafe partial struct Float3
/// Gets a reference to the <see cref="float"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float X => ref this.x;
public ref float X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float Y => ref this.y;
public ref float Y => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>Z</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float Z => ref this.z;
public ref float Z => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -96,21 +97,21 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 XY => ref *(Float2*)UndefinedData;
public ref Float2 XY => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="X"/>, <see cref="Z"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 XZ => ref *(Float2*)UndefinedData;
public ref Float2 XZ => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 YX => ref *(Float2*)UndefinedData;
public ref Float2 YX => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -124,21 +125,21 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 YZ => ref *(Float2*)UndefinedData;
public ref Float2 YZ => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="Z"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 ZX => ref *(Float2*)UndefinedData;
public ref Float2 ZX => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="Z"/>, <see cref="Y"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 ZY => ref *(Float2*)UndefinedData;
public ref Float2 ZY => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="Z"/>, <see cref="Z"/>.
@@ -187,7 +188,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 XYZ => ref *(Float3*)UndefinedData;
public ref Float3 XYZ => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="X"/>.
@@ -201,7 +202,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 XZY => ref *(Float3*)UndefinedData;
public ref Float3 XZY => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="Z"/>.
@@ -229,7 +230,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 YXZ => ref *(Float3*)UndefinedData;
public ref Float3 YXZ => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
@@ -257,7 +258,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 YZX => ref *(Float3*)UndefinedData;
public ref Float3 YZX => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Y"/>, <see cref="Z"/>, <see cref="Y"/>.
@@ -285,7 +286,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 ZXY => ref *(Float3*)UndefinedData;
public ref Float3 ZXY => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Z"/>, <see cref="X"/>, <see cref="Z"/>.
@@ -299,7 +300,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 ZYX => ref *(Float3*)UndefinedData;
public ref Float3 ZYX => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="Z"/>, <see cref="Y"/>, <see cref="Y"/>.
@@ -907,19 +908,19 @@ public unsafe partial struct Float3
/// Gets a reference to the <see cref="float"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float R => ref this.x;
public ref float R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float G => ref this.y;
public ref float G => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="float"/> value representing the <c>B</c> component.
/// </summary>
[UnscopedRef]
public readonly ref float B => ref this.z;
public ref float B => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -933,21 +934,21 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 RG => ref *(Float2*)UndefinedData;
public ref Float2 RG => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="R"/>, <see cref="B"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 RB => ref *(Float2*)UndefinedData;
public ref Float2 RB => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 GR => ref *(Float2*)UndefinedData;
public ref Float2 GR => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="G"/>, <see cref="G"/>.
@@ -961,21 +962,21 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 GB => ref *(Float2*)UndefinedData;
public ref Float2 GB => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="B"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 BR => ref *(Float2*)UndefinedData;
public ref Float2 BR => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Float2"/> value with the components <see cref="B"/>, <see cref="G"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float2 BG => ref *(Float2*)UndefinedData;
public ref Float2 BG => ref *(Float2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float2"/> value with the components <see cref="B"/>, <see cref="B"/>.
@@ -1024,7 +1025,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 RGB => ref *(Float3*)UndefinedData;
public ref Float3 RGB => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="R"/>.
@@ -1038,7 +1039,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 RBG => ref *(Float3*)UndefinedData;
public ref Float3 RBG => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="B"/>.
@@ -1066,7 +1067,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 GRB => ref *(Float3*)UndefinedData;
public ref Float3 GRB => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
@@ -1094,7 +1095,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 GBR => ref *(Float3*)UndefinedData;
public ref Float3 GBR => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="G"/>, <see cref="B"/>, <see cref="G"/>.
@@ -1122,7 +1123,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 BRG => ref *(Float3*)UndefinedData;
public ref Float3 BRG => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="B"/>, <see cref="R"/>, <see cref="B"/>.
@@ -1136,7 +1137,7 @@ public unsafe partial struct Float3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Float3 BGR => ref *(Float3*)UndefinedData;
public ref Float3 BGR => ref *(Float3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Float3"/> value with the components <see cref="B"/>, <see cref="G"/>, <see cref="G"/>.
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+10 -9
ファイルの表示
@@ -36,7 +36,8 @@ public unsafe partial struct Int2
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref int this[int i] => ref *(int*)UndefinedData;
[UnscopedRef]
public ref int this[int i] => ref *(int*)UndefinedData;
/// <summary>
/// Gets a <see cref="Int2"/> value with all components set to 0.
@@ -62,13 +63,13 @@ public unsafe partial struct Int2
/// Gets a reference to the <see cref="int"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int X => ref this.x;
public ref int X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int Y => ref this.y;
public ref int Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -82,14 +83,14 @@ public unsafe partial struct Int2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 XY => ref *(Int2*)UndefinedData;
public ref Int2 XY => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 YX => ref *(Int2*)UndefinedData;
public ref Int2 YX => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -270,13 +271,13 @@ public unsafe partial struct Int2
/// Gets a reference to the <see cref="int"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int R => ref this.x;
public ref int R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int G => ref this.y;
public ref int G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -290,14 +291,14 @@ public unsafe partial struct Int2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 RG => ref *(Int2*)UndefinedData;
public ref Int2 RG => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 GR => ref *(Int2*)UndefinedData;
public ref Int2 GR => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="G"/>, <see cref="G"/>.
+32 -31
ファイルの表示
@@ -39,7 +39,8 @@ public unsafe partial struct Int3
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref int this[int i] => ref *(int*)UndefinedData;
[UnscopedRef]
public ref int this[int i] => ref *(int*)UndefinedData;
/// <summary>
/// Gets a <see cref="Int3"/> value with all components set to 0.
@@ -70,19 +71,19 @@ public unsafe partial struct Int3
/// Gets a reference to the <see cref="int"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int X => ref this.x;
public ref int X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int Y => ref this.y;
public ref int Y => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>Z</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int Z => ref this.z;
public ref int Z => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -96,21 +97,21 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 XY => ref *(Int2*)UndefinedData;
public ref Int2 XY => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="X"/>, <see cref="Z"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 XZ => ref *(Int2*)UndefinedData;
public ref Int2 XZ => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 YX => ref *(Int2*)UndefinedData;
public ref Int2 YX => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -124,21 +125,21 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 YZ => ref *(Int2*)UndefinedData;
public ref Int2 YZ => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="Z"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 ZX => ref *(Int2*)UndefinedData;
public ref Int2 ZX => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="Z"/>, <see cref="Y"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 ZY => ref *(Int2*)UndefinedData;
public ref Int2 ZY => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="Z"/>, <see cref="Z"/>.
@@ -187,7 +188,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 XYZ => ref *(Int3*)UndefinedData;
public ref Int3 XYZ => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="X"/>.
@@ -201,7 +202,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 XZY => ref *(Int3*)UndefinedData;
public ref Int3 XZY => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="Z"/>.
@@ -229,7 +230,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 YXZ => ref *(Int3*)UndefinedData;
public ref Int3 YXZ => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
@@ -257,7 +258,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 YZX => ref *(Int3*)UndefinedData;
public ref Int3 YZX => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Y"/>, <see cref="Z"/>, <see cref="Y"/>.
@@ -285,7 +286,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 ZXY => ref *(Int3*)UndefinedData;
public ref Int3 ZXY => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Z"/>, <see cref="X"/>, <see cref="Z"/>.
@@ -299,7 +300,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 ZYX => ref *(Int3*)UndefinedData;
public ref Int3 ZYX => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="Z"/>, <see cref="Y"/>, <see cref="Y"/>.
@@ -907,19 +908,19 @@ public unsafe partial struct Int3
/// Gets a reference to the <see cref="int"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int R => ref this.x;
public ref int R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int G => ref this.y;
public ref int G => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="int"/> value representing the <c>B</c> component.
/// </summary>
[UnscopedRef]
public readonly ref int B => ref this.z;
public ref int B => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -933,21 +934,21 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 RG => ref *(Int2*)UndefinedData;
public ref Int2 RG => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="R"/>, <see cref="B"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 RB => ref *(Int2*)UndefinedData;
public ref Int2 RB => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 GR => ref *(Int2*)UndefinedData;
public ref Int2 GR => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="G"/>, <see cref="G"/>.
@@ -961,21 +962,21 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 GB => ref *(Int2*)UndefinedData;
public ref Int2 GB => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="B"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 BR => ref *(Int2*)UndefinedData;
public ref Int2 BR => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="Int2"/> value with the components <see cref="B"/>, <see cref="G"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int2 BG => ref *(Int2*)UndefinedData;
public ref Int2 BG => ref *(Int2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int2"/> value with the components <see cref="B"/>, <see cref="B"/>.
@@ -1024,7 +1025,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 RGB => ref *(Int3*)UndefinedData;
public ref Int3 RGB => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="R"/>.
@@ -1038,7 +1039,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 RBG => ref *(Int3*)UndefinedData;
public ref Int3 RBG => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="B"/>.
@@ -1066,7 +1067,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 GRB => ref *(Int3*)UndefinedData;
public ref Int3 GRB => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
@@ -1094,7 +1095,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 GBR => ref *(Int3*)UndefinedData;
public ref Int3 GBR => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="G"/>, <see cref="B"/>, <see cref="G"/>.
@@ -1122,7 +1123,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 BRG => ref *(Int3*)UndefinedData;
public ref Int3 BRG => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="B"/>, <see cref="R"/>, <see cref="B"/>.
@@ -1136,7 +1137,7 @@ public unsafe partial struct Int3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref Int3 BGR => ref *(Int3*)UndefinedData;
public ref Int3 BGR => ref *(Int3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="Int3"/> value with the components <see cref="B"/>, <see cref="G"/>, <see cref="G"/>.
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+22 -10
ファイルの表示
@@ -150,18 +150,24 @@ public unsafe partial struct <#=fullTypeName#>
/// Gets a reference to a specific row in the current <see cref="<#=fullTypeName#>"/> instance.
/// </summary>
/// <param name="row">The row to access.</param>
/// <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>
/// <remarks>
/// <para>Unlike with vector types, these properties cannot validate in advance which combinations are writeable, so callers should ensure proper use.</para>
/// <para>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</para>
/// </remarks>
[UnscopedRef]
public readonly ref <#=rowTypeName#> this[int row] => ref *(<#=rowTypeName#>*)UndefinedData;
public ref <#=rowTypeName#> this[int row] => ref *(<#=rowTypeName#>*)UndefinedData;
/// <summary>
/// Gets a swizzled reference to a specific sequence of items in the current <see cref="<#=fullTypeName#>"/> instance.
/// </summary>
/// <param name="xy0">The identifier of the first item to index.</param>
/// <param name="xy1">The identifier of the second item to index.</param>
/// <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>
/// <remarks>
/// <para>Unlike with vector types, these properties cannot validate in advance which combinations are writeable, so callers should ensure proper use.</para>
/// <para>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</para>
/// </remarks>
[UnscopedRef]
public readonly ref <#=typeName#>2 this[MatrixIndex xy0, MatrixIndex xy1] => ref *(<#=typeName#>2*)UndefinedData;
public ref <#=typeName#>2 this[MatrixIndex xy0, MatrixIndex xy1] => ref *(<#=typeName#>2*)UndefinedData;
/// <summary>
/// Gets a swizzled reference to a specific sequence of items in the current <see cref="<#=fullTypeName#>"/> instance.
@@ -169,9 +175,12 @@ public unsafe partial struct <#=fullTypeName#>
/// <param name="xy0">The identifier of the first item to index.</param>
/// <param name="xy1">The identifier of the second item to index.</param>
/// <param name="xy2">The identifier of the third item to index.</param>
/// <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>
/// <remarks>
/// <para>Unlike with vector types, these properties cannot validate in advance which combinations are writeable, so callers should ensure proper use.</para>
/// <para>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</para>
/// </remarks>
[UnscopedRef]
public readonly ref <#=typeName#>3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => ref *(<#=typeName#>3*)UndefinedData;
public ref <#=typeName#>3 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2] => ref *(<#=typeName#>3*)UndefinedData;
/// <summary>
/// Gets a swizzled reference to a specific sequence of items in the current <see cref="<#=fullTypeName#>"/> instance.
@@ -180,9 +189,12 @@ public unsafe partial struct <#=fullTypeName#>
/// <param name="xy1">The identifier of the second item to index.</param>
/// <param name="xy2">The identifier of the third item to index.</param>
/// <param name="xy3">The identifier of the fourth item to index.</param>
/// <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>
/// <remarks>
/// <para>Unlike with vector types, these properties cannot validate in advance which combinations are writeable, so callers should ensure proper use.</para>
/// <para>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</para>
/// </remarks>s
[UnscopedRef]
public readonly ref <#=typeName#>4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => ref *(<#=typeName#>4*)UndefinedData;
public ref <#=typeName#>4 this[MatrixIndex xy0, MatrixIndex xy1, MatrixIndex xy2, MatrixIndex xy3] => ref *(<#=typeName#>4*)UndefinedData;
<#
for (int i = 1; i <= rows; i++)
for (int j = 1; j <= columns; j++)
@@ -197,14 +209,14 @@ public unsafe partial struct <#=fullTypeName#>
{
#>
[UnscopedRef]
public readonly ref <#=elementTypeName#> M<#=i#><#=j#> => ref Unsafe.As<int, bool>(ref this.m<#=i#><#=j#>);
public ref <#=elementTypeName#> M<#=i#><#=j#> => ref Unsafe.As<int, bool>(ref this.m<#=i#><#=j#>);
<#
}
else
{
#>
[UnscopedRef]
public readonly ref <#=elementTypeName#> M<#=i#><#=j#> => ref this.m<#=i#><#=j#>;
public ref <#=elementTypeName#> M<#=i#><#=j#> => ref this.m<#=i#><#=j#>;
<#
}
#>
+10 -9
ファイルの表示
@@ -35,7 +35,8 @@ public unsafe partial struct UInt2
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref uint this[int i] => ref *(uint*)UndefinedData;
[UnscopedRef]
public ref uint this[int i] => ref *(uint*)UndefinedData;
/// <summary>
/// Gets a <see cref="UInt2"/> value with all components set to 0.
@@ -61,13 +62,13 @@ public unsafe partial struct UInt2
/// Gets a reference to the <see cref="uint"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint X => ref this.x;
public ref uint X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint Y => ref this.y;
public ref uint Y => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -81,14 +82,14 @@ public unsafe partial struct UInt2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 XY => ref *(UInt2*)UndefinedData;
public ref UInt2 XY => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 YX => ref *(UInt2*)UndefinedData;
public ref UInt2 YX => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -269,13 +270,13 @@ public unsafe partial struct UInt2
/// Gets a reference to the <see cref="uint"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint R => ref this.x;
public ref uint R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint G => ref this.y;
public ref uint G => ref this.y;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -289,14 +290,14 @@ public unsafe partial struct UInt2
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 RG => ref *(UInt2*)UndefinedData;
public ref UInt2 RG => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 GR => ref *(UInt2*)UndefinedData;
public ref UInt2 GR => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="G"/>, <see cref="G"/>.
+32 -31
ファイルの表示
@@ -38,7 +38,8 @@ public unsafe partial struct UInt3
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref uint this[int i] => ref *(uint*)UndefinedData;
[UnscopedRef]
public ref uint this[int i] => ref *(uint*)UndefinedData;
/// <summary>
/// Gets a <see cref="UInt3"/> value with all components set to 0.
@@ -69,19 +70,19 @@ public unsafe partial struct UInt3
/// Gets a reference to the <see cref="uint"/> value representing the <c>X</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint X => ref this.x;
public ref uint X => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>Y</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint Y => ref this.y;
public ref uint Y => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>Z</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint Z => ref this.z;
public ref uint Z => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="X"/>, <see cref="X"/>.
@@ -95,21 +96,21 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 XY => ref *(UInt2*)UndefinedData;
public ref UInt2 XY => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="X"/>, <see cref="Z"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 XZ => ref *(UInt2*)UndefinedData;
public ref UInt2 XZ => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="Y"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 YX => ref *(UInt2*)UndefinedData;
public ref UInt2 YX => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="Y"/>, <see cref="Y"/>.
@@ -123,21 +124,21 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 YZ => ref *(UInt2*)UndefinedData;
public ref UInt2 YZ => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="Z"/>, <see cref="X"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 ZX => ref *(UInt2*)UndefinedData;
public ref UInt2 ZX => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="Z"/>, <see cref="Y"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 ZY => ref *(UInt2*)UndefinedData;
public ref UInt2 ZY => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="Z"/>, <see cref="Z"/>.
@@ -186,7 +187,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 XYZ => ref *(UInt3*)UndefinedData;
public ref UInt3 XYZ => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="X"/>.
@@ -200,7 +201,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 XZY => ref *(UInt3*)UndefinedData;
public ref UInt3 XZY => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="X"/>, <see cref="Z"/>, <see cref="Z"/>.
@@ -228,7 +229,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 YXZ => ref *(UInt3*)UndefinedData;
public ref UInt3 YXZ => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Y"/>, <see cref="Y"/>, <see cref="X"/>.
@@ -256,7 +257,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 YZX => ref *(UInt3*)UndefinedData;
public ref UInt3 YZX => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Y"/>, <see cref="Z"/>, <see cref="Y"/>.
@@ -284,7 +285,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 ZXY => ref *(UInt3*)UndefinedData;
public ref UInt3 ZXY => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Z"/>, <see cref="X"/>, <see cref="Z"/>.
@@ -298,7 +299,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 ZYX => ref *(UInt3*)UndefinedData;
public ref UInt3 ZYX => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="Z"/>, <see cref="Y"/>, <see cref="Y"/>.
@@ -906,19 +907,19 @@ public unsafe partial struct UInt3
/// Gets a reference to the <see cref="uint"/> value representing the <c>R</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint R => ref this.x;
public ref uint R => ref this.x;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>G</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint G => ref this.y;
public ref uint G => ref this.y;
/// <summary>
/// Gets a reference to the <see cref="uint"/> value representing the <c>B</c> component.
/// </summary>
[UnscopedRef]
public readonly ref uint B => ref this.z;
public ref uint B => ref this.z;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="R"/>, <see cref="R"/>.
@@ -932,21 +933,21 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 RG => ref *(UInt2*)UndefinedData;
public ref UInt2 RG => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="R"/>, <see cref="B"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 RB => ref *(UInt2*)UndefinedData;
public ref UInt2 RB => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="G"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 GR => ref *(UInt2*)UndefinedData;
public ref UInt2 GR => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="G"/>, <see cref="G"/>.
@@ -960,21 +961,21 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 GB => ref *(UInt2*)UndefinedData;
public ref UInt2 GB => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="B"/>, <see cref="R"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 BR => ref *(UInt2*)UndefinedData;
public ref UInt2 BR => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a reference to the <see cref="UInt2"/> value with the components <see cref="B"/>, <see cref="G"/>.
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt2 BG => ref *(UInt2*)UndefinedData;
public ref UInt2 BG => ref *(UInt2*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt2"/> value with the components <see cref="B"/>, <see cref="B"/>.
@@ -1023,7 +1024,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 RGB => ref *(UInt3*)UndefinedData;
public ref UInt3 RGB => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="R"/>.
@@ -1037,7 +1038,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 RBG => ref *(UInt3*)UndefinedData;
public ref UInt3 RBG => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="R"/>, <see cref="B"/>, <see cref="B"/>.
@@ -1065,7 +1066,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 GRB => ref *(UInt3*)UndefinedData;
public ref UInt3 GRB => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="G"/>, <see cref="G"/>, <see cref="R"/>.
@@ -1093,7 +1094,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 GBR => ref *(UInt3*)UndefinedData;
public ref UInt3 GBR => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="G"/>, <see cref="B"/>, <see cref="G"/>.
@@ -1121,7 +1122,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 BRG => ref *(UInt3*)UndefinedData;
public ref UInt3 BRG => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="B"/>, <see cref="R"/>, <see cref="B"/>.
@@ -1135,7 +1136,7 @@ public unsafe partial struct UInt3
/// </summary>
/// <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>
[UnscopedRef]
public readonly ref UInt3 BGR => ref *(UInt3*)UndefinedData;
public ref UInt3 BGR => ref *(UInt3*)UndefinedData;
/// <summary>
/// Gets a readonly reference to the <see cref="UInt3"/> value with the components <see cref="B"/>, <see cref="G"/>, <see cref="G"/>.
ファイル差分が大きすぎるため表示されません。 差分を読み込み
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+6 -5
ファイルの表示
@@ -113,7 +113,8 @@ public unsafe partial struct <#=typeName#>
/// </summary>
/// <param name="i">The index of the component to access.</param>
/// <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 readonly ref <#=hlslElementTypeName#> this[int i] => ref *(<#=hlslElementTypeName#>*)UndefinedData;
[UnscopedRef]
public ref <#=hlslElementTypeName#> this[int i] => ref *(<#=hlslElementTypeName#>*)UndefinedData;
<#
// Generate the true/false and zero/one properties
@@ -194,7 +195,7 @@ public unsafe partial struct <#=typeName#>
string propertyType = propertyName.Length == 1 ? hlslElementTypeName : $"{elementTypeName}{propertyName.Length}";
bool isReadonly = propertyName.Distinct().Count() < propertyName.Length;
string refType = isReadonly ? "ref readonly" : "ref";
string refType = isReadonly ? "readonly ref readonly" : "ref";
// XML docs
WriteLine("/// <summary>");
@@ -211,11 +212,11 @@ public unsafe partial struct <#=typeName#>
if (isBoolType)
{
// For bool types, also reinterpret cast from int to bool (the backing field is int to ensure all 4 bytes are initialized)
WriteLine($"public readonly {refType} {propertyType} {propertyName} => ref Unsafe.As<int, bool>(ref this.{fieldName});");
WriteLine($"public {refType} {propertyType} {propertyName} => ref Unsafe.As<int, bool>(ref this.{fieldName});");
}
else
{
WriteLine($"public readonly {refType} {propertyType} {propertyName} => ref this.{fieldName};");
WriteLine($"public {refType} {propertyType} {propertyName} => ref this.{fieldName};");
}
}
else
@@ -230,7 +231,7 @@ public unsafe partial struct <#=typeName#>
// Property
WriteLine("[UnscopedRef]");
Write($"public readonly {refType} {propertyType} {propertyName} ");
Write($"public {refType} {propertyType} {propertyName} ");
WriteLine($"=> ref *({propertyType}*)UndefinedData;");
}
}