From 5cddb4162527cdc5888406c11f12f67d5e4eec24 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 23 Jan 2023 11:37:36 +0100 Subject: [PATCH 1/2] Add projections for Mad HLSL intrinsic --- src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs | 1120 +++++++++++++++++ src/ComputeSharp.Core/Intrinsics/Hlsl.tt | 2 +- .../Intrinsics/Hlsl.ttinclude | 99 +- 3 files changed, 1219 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs b/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs index 2ebe9659..e5456939 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.g.cs @@ -11336,6 +11336,1126 @@ partial class Hlsl [HlslIntrinsicName("log2")] public static Float4x4 Log2(Float4x4 x) => default; + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static float Mad(float m, float a, float b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float2 Mad(Float2 m, Float2 a, Float2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float3 Mad(Float3 m, Float3 a, Float3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float4 Mad(Float4 m, Float4 a, Float4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float1x1 Mad(Float1x1 m, Float1x1 a, Float1x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float1x2 Mad(Float1x2 m, Float1x2 a, Float1x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float1x3 Mad(Float1x3 m, Float1x3 a, Float1x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float1x4 Mad(Float1x4 m, Float1x4 a, Float1x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float2x1 Mad(Float2x1 m, Float2x1 a, Float2x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float2x2 Mad(Float2x2 m, Float2x2 a, Float2x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float2x3 Mad(Float2x3 m, Float2x3 a, Float2x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float2x4 Mad(Float2x4 m, Float2x4 a, Float2x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float3x1 Mad(Float3x1 m, Float3x1 a, Float3x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float3x2 Mad(Float3x2 m, Float3x2 a, Float3x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float3x3 Mad(Float3x3 m, Float3x3 a, Float3x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float3x4 Mad(Float3x4 m, Float3x4 a, Float3x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float4x1 Mad(Float4x1 m, Float4x1 a, Float4x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float4x2 Mad(Float4x2 m, Float4x2 a, Float4x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float4x3 Mad(Float4x3 m, Float4x3 a, Float4x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Float4x4 Mad(Float4x4 m, Float4x4 a, Float4x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static double Mad(double m, double a, double b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double2 Mad(Double2 m, Double2 a, Double2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double3 Mad(Double3 m, Double3 a, Double3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double4 Mad(Double4 m, Double4 a, Double4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double1x1 Mad(Double1x1 m, Double1x1 a, Double1x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double1x2 Mad(Double1x2 m, Double1x2 a, Double1x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double1x3 Mad(Double1x3 m, Double1x3 a, Double1x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double1x4 Mad(Double1x4 m, Double1x4 a, Double1x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double2x1 Mad(Double2x1 m, Double2x1 a, Double2x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double2x2 Mad(Double2x2 m, Double2x2 a, Double2x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double2x3 Mad(Double2x3 m, Double2x3 a, Double2x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double2x4 Mad(Double2x4 m, Double2x4 a, Double2x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double3x1 Mad(Double3x1 m, Double3x1 a, Double3x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double3x2 Mad(Double3x2 m, Double3x2 a, Double3x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double3x3 Mad(Double3x3 m, Double3x3 a, Double3x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double3x4 Mad(Double3x4 m, Double3x4 a, Double3x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double4x1 Mad(Double4x1 m, Double4x1 a, Double4x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double4x2 Mad(Double4x2 m, Double4x2 a, Double4x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double4x3 Mad(Double4x3 m, Double4x3 a, Double4x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Double4x4 Mad(Double4x4 m, Double4x4 a, Double4x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static int Mad(int m, int a, int b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int2 Mad(Int2 m, Int2 a, Int2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int3 Mad(Int3 m, Int3 a, Int3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int4 Mad(Int4 m, Int4 a, Int4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int1x1 Mad(Int1x1 m, Int1x1 a, Int1x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int1x2 Mad(Int1x2 m, Int1x2 a, Int1x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int1x3 Mad(Int1x3 m, Int1x3 a, Int1x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int1x4 Mad(Int1x4 m, Int1x4 a, Int1x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int2x1 Mad(Int2x1 m, Int2x1 a, Int2x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int2x2 Mad(Int2x2 m, Int2x2 a, Int2x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int2x3 Mad(Int2x3 m, Int2x3 a, Int2x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int2x4 Mad(Int2x4 m, Int2x4 a, Int2x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int3x1 Mad(Int3x1 m, Int3x1 a, Int3x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int3x2 Mad(Int3x2 m, Int3x2 a, Int3x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int3x3 Mad(Int3x3 m, Int3x3 a, Int3x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int3x4 Mad(Int3x4 m, Int3x4 a, Int3x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int4x1 Mad(Int4x1 m, Int4x1 a, Int4x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int4x2 Mad(Int4x2 m, Int4x2 a, Int4x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int4x3 Mad(Int4x3 m, Int4x3 a, Int4x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static Int4x4 Mad(Int4x4 m, Int4x4 a, Int4x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static uint Mad(uint m, uint a, uint b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt2 Mad(UInt2 m, UInt2 a, UInt2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt3 Mad(UInt3 m, UInt3 a, UInt3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt4 Mad(UInt4 m, UInt4 a, UInt4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt1x1 Mad(UInt1x1 m, UInt1x1 a, UInt1x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt1x2 Mad(UInt1x2 m, UInt1x2 a, UInt1x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt1x3 Mad(UInt1x3 m, UInt1x3 a, UInt1x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt1x4 Mad(UInt1x4 m, UInt1x4 a, UInt1x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt2x1 Mad(UInt2x1 m, UInt2x1 a, UInt2x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt2x2 Mad(UInt2x2 m, UInt2x2 a, UInt2x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt2x3 Mad(UInt2x3 m, UInt2x3 a, UInt2x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt2x4 Mad(UInt2x4 m, UInt2x4 a, UInt2x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt3x1 Mad(UInt3x1 m, UInt3x1 a, UInt3x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt3x2 Mad(UInt3x2 m, UInt3x2 a, UInt3x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt3x3 Mad(UInt3x3 m, UInt3x3 a, UInt3x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt3x4 Mad(UInt3x4 m, UInt3x4 a, UInt3x4 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt4x1 Mad(UInt4x1 m, UInt4x1 a, UInt4x1 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt4x2 Mad(UInt4x2 m, UInt4x2 a, UInt4x2 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt4x3 Mad(UInt4x3 m, UInt4x3 a, UInt4x3 b) => default; + + /// + /// Performs an arithmetic multiply/add operation on three values. + /// + /// The multiplication value. + /// The first addition value. + /// The second addition value. + /// The result of * + . + /// + /// For more info, see . + /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. + /// + [HlslIntrinsicName("mad")] + public static UInt4x4 Mad(UInt4x4 m, UInt4x4 a, UInt4x4 b) => default; + /// /// Selects the greater between two inputs. /// diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.tt b/src/ComputeSharp.Core/Intrinsics/Hlsl.tt index 60fc7d8d..4dc9bc8d 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.tt +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.tt @@ -1,4 +1,4 @@ -<#@include file="Hlsl.ttinclude" #> +<#@include file="Hlsl.ttinclude" #> using ComputeSharp.Core.Intrinsics.Attributes; using ComputeSharp.Exceptions; diff --git a/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude b/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude index ba21edee..0311ca4e 100644 --- a/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude +++ b/src/ComputeSharp.Core/Intrinsics/Hlsl.ttinclude @@ -1,4 +1,4 @@ -<#@include file="Hlsl.MulOverloads.ttinclude" #> +<#@include file="Hlsl.MulOverloads.ttinclude" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Text" #> <#@ import namespace="System.Text.RegularExpressions" #> @@ -1665,6 +1665,103 @@ var Intrinsics = new[] } }, new + { + Name = "Mad", + HlslName = "mad", + Summary = "Performs an arithmetic multiply/add operation on three values.", + Url = "https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/mad", + Parameters = new[] + { + new { IsOut = false, Name = "m", Info = "The multiplication value." }, + new { IsOut = false, Name = "a", Info = "The first addition value." }, + new { IsOut = false, Name = "b", Info = "The second addition value." } + }, + Returns = "The result of {param=m} * {param=a} + {param=b}.", + Overloads = new[] + { + new { Return = "float", Params = new[] { "float", "float", "float" } }, + new { Return = "Float2", Params = new[] { "Float2", "Float2", "Float2" } }, + new { Return = "Float3", Params = new[] { "Float3", "Float3", "Float3" } }, + new { Return = "Float4", Params = new[] { "Float4", "Float4", "Float4" } }, + new { Return = "Float1x1", Params = new[] { "Float1x1", "Float1x1", "Float1x1" } }, + new { Return = "Float1x2", Params = new[] { "Float1x2", "Float1x2", "Float1x2" } }, + new { Return = "Float1x3", Params = new[] { "Float1x3", "Float1x3", "Float1x3" } }, + new { Return = "Float1x4", Params = new[] { "Float1x4", "Float1x4", "Float1x4" } }, + new { Return = "Float2x1", Params = new[] { "Float2x1", "Float2x1", "Float2x1" } }, + new { Return = "Float2x2", Params = new[] { "Float2x2", "Float2x2", "Float2x2" } }, + new { Return = "Float2x3", Params = new[] { "Float2x3", "Float2x3", "Float2x3" } }, + new { Return = "Float2x4", Params = new[] { "Float2x4", "Float2x4", "Float2x4" } }, + new { Return = "Float3x1", Params = new[] { "Float3x1", "Float3x1", "Float3x1" } }, + new { Return = "Float3x2", Params = new[] { "Float3x2", "Float3x2", "Float3x2" } }, + new { Return = "Float3x3", Params = new[] { "Float3x3", "Float3x3", "Float3x3" } }, + new { Return = "Float3x4", Params = new[] { "Float3x4", "Float3x4", "Float3x4" } }, + new { Return = "Float4x1", Params = new[] { "Float4x1", "Float4x1", "Float4x1" } }, + new { Return = "Float4x2", Params = new[] { "Float4x2", "Float4x2", "Float4x2" } }, + new { Return = "Float4x3", Params = new[] { "Float4x3", "Float4x3", "Float4x3" } }, + new { Return = "Float4x4", Params = new[] { "Float4x4", "Float4x4", "Float4x4" } }, + new { Return = "double", Params = new[] { "double", "double", "double" } }, + new { Return = "Double2", Params = new[] { "Double2", "Double2", "Double2" } }, + new { Return = "Double3", Params = new[] { "Double3", "Double3", "Double3" } }, + new { Return = "Double4", Params = new[] { "Double4", "Double4", "Double4" } }, + new { Return = "Double1x1", Params = new[] { "Double1x1", "Double1x1", "Double1x1" } }, + new { Return = "Double1x2", Params = new[] { "Double1x2", "Double1x2", "Double1x2" } }, + new { Return = "Double1x3", Params = new[] { "Double1x3", "Double1x3", "Double1x3" } }, + new { Return = "Double1x4", Params = new[] { "Double1x4", "Double1x4", "Double1x4" } }, + new { Return = "Double2x1", Params = new[] { "Double2x1", "Double2x1", "Double2x1" } }, + new { Return = "Double2x2", Params = new[] { "Double2x2", "Double2x2", "Double2x2" } }, + new { Return = "Double2x3", Params = new[] { "Double2x3", "Double2x3", "Double2x3" } }, + new { Return = "Double2x4", Params = new[] { "Double2x4", "Double2x4", "Double2x4" } }, + new { Return = "Double3x1", Params = new[] { "Double3x1", "Double3x1", "Double3x1" } }, + new { Return = "Double3x2", Params = new[] { "Double3x2", "Double3x2", "Double3x2" } }, + new { Return = "Double3x3", Params = new[] { "Double3x3", "Double3x3", "Double3x3" } }, + new { Return = "Double3x4", Params = new[] { "Double3x4", "Double3x4", "Double3x4" } }, + new { Return = "Double4x1", Params = new[] { "Double4x1", "Double4x1", "Double4x1" } }, + new { Return = "Double4x2", Params = new[] { "Double4x2", "Double4x2", "Double4x2" } }, + new { Return = "Double4x3", Params = new[] { "Double4x3", "Double4x3", "Double4x3" } }, + new { Return = "Double4x4", Params = new[] { "Double4x4", "Double4x4", "Double4x4" } }, + new { Return = "int", Params = new[] { "int", "int", "int" } }, + new { Return = "Int2", Params = new[] { "Int2", "Int2", "Int2" } }, + new { Return = "Int3", Params = new[] { "Int3", "Int3", "Int3" } }, + new { Return = "Int4", Params = new[] { "Int4", "Int4", "Int4" } }, + new { Return = "Int1x1", Params = new[] { "Int1x1", "Int1x1", "Int1x1" } }, + new { Return = "Int1x2", Params = new[] { "Int1x2", "Int1x2", "Int1x2" } }, + new { Return = "Int1x3", Params = new[] { "Int1x3", "Int1x3", "Int1x3" } }, + new { Return = "Int1x4", Params = new[] { "Int1x4", "Int1x4", "Int1x4" } }, + new { Return = "Int2x1", Params = new[] { "Int2x1", "Int2x1", "Int2x1" } }, + new { Return = "Int2x2", Params = new[] { "Int2x2", "Int2x2", "Int2x2" } }, + new { Return = "Int2x3", Params = new[] { "Int2x3", "Int2x3", "Int2x3" } }, + new { Return = "Int2x4", Params = new[] { "Int2x4", "Int2x4", "Int2x4" } }, + new { Return = "Int3x1", Params = new[] { "Int3x1", "Int3x1", "Int3x1" } }, + new { Return = "Int3x2", Params = new[] { "Int3x2", "Int3x2", "Int3x2" } }, + new { Return = "Int3x3", Params = new[] { "Int3x3", "Int3x3", "Int3x3" } }, + new { Return = "Int3x4", Params = new[] { "Int3x4", "Int3x4", "Int3x4" } }, + new { Return = "Int4x1", Params = new[] { "Int4x1", "Int4x1", "Int4x1" } }, + new { Return = "Int4x2", Params = new[] { "Int4x2", "Int4x2", "Int4x2" } }, + new { Return = "Int4x3", Params = new[] { "Int4x3", "Int4x3", "Int4x3" } }, + new { Return = "Int4x4", Params = new[] { "Int4x4", "Int4x4", "Int4x4" } }, + new { Return = "uint", Params = new[] { "uint", "uint", "uint" } }, + new { Return = "UInt2", Params = new[] { "UInt2", "UInt2", "UInt2" } }, + new { Return = "UInt3", Params = new[] { "UInt3", "UInt3", "UInt3" } }, + new { Return = "UInt4", Params = new[] { "UInt4", "UInt4", "UInt4" } }, + new { Return = "UInt1x1", Params = new[] { "UInt1x1", "UInt1x1", "UInt1x1" } }, + new { Return = "UInt1x2", Params = new[] { "UInt1x2", "UInt1x2", "UInt1x2" } }, + new { Return = "UInt1x3", Params = new[] { "UInt1x3", "UInt1x3", "UInt1x3" } }, + new { Return = "UInt1x4", Params = new[] { "UInt1x4", "UInt1x4", "UInt1x4" } }, + new { Return = "UInt2x1", Params = new[] { "UInt2x1", "UInt2x1", "UInt2x1" } }, + new { Return = "UInt2x2", Params = new[] { "UInt2x2", "UInt2x2", "UInt2x2" } }, + new { Return = "UInt2x3", Params = new[] { "UInt2x3", "UInt2x3", "UInt2x3" } }, + new { Return = "UInt2x4", Params = new[] { "UInt2x4", "UInt2x4", "UInt2x4" } }, + new { Return = "UInt3x1", Params = new[] { "UInt3x1", "UInt3x1", "UInt3x1" } }, + new { Return = "UInt3x2", Params = new[] { "UInt3x2", "UInt3x2", "UInt3x2" } }, + new { Return = "UInt3x3", Params = new[] { "UInt3x3", "UInt3x3", "UInt3x3" } }, + new { Return = "UInt3x4", Params = new[] { "UInt3x4", "UInt3x4", "UInt3x4" } }, + new { Return = "UInt4x1", Params = new[] { "UInt4x1", "UInt4x1", "UInt4x1" } }, + new { Return = "UInt4x2", Params = new[] { "UInt4x2", "UInt4x2", "UInt4x2" } }, + new { Return = "UInt4x3", Params = new[] { "UInt4x3", "UInt4x3", "UInt4x3" } }, + new { Return = "UInt4x4", Params = new[] { "UInt4x4", "UInt4x4", "UInt4x4" } } + } + }, + new { Name = "Max", HlslName = "max", From 02a52b1050cc7325c8ef3436000862029603c3e5 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 23 Jan 2023 11:53:20 +0100 Subject: [PATCH 2/2] Add unit tests for Mad intrinsic --- .../ComputeSharp.Tests/ShaderRewriterTests.cs | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs index cf9791de..0363872b 100644 --- a/tests/ComputeSharp.Tests/ShaderRewriterTests.cs +++ b/tests/ComputeSharp.Tests/ShaderRewriterTests.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using ComputeSharp.Tests.Attributes; using ComputeSharp.Tests.Extensions; @@ -771,4 +772,55 @@ public partial class ShaderRewriterTests destination[ThreadIds.X] = source[ThreadIds.X].AddAndGetSum(ThreadIds.X + 1); } } + + [CombinatorialTestMethod] + [AllDevices] + public void MiscHlslIntrinsics(Device device) + { + float[] data1 = { 1, 2, 0.4f, 3.14f, 2.4f, 0.8f, 0, 0 }; + int[] data2 = { 111, 222, 333, 2, 4, 8, 63, 42, 77, 0, 0, 0 }; + + using ReadWriteBuffer buffer1 = device.Get().AllocateReadWriteBuffer(data1); + using ReadWriteBuffer buffer2 = device.Get().AllocateReadWriteBuffer(data2); + + device.Get().For(1, new MiscHlslIntrinsicsShader(buffer1, buffer2)); + + float[] results1 = buffer1.ToArray(); + int[] results2 = buffer2.ToArray(); + + CollectionAssert.AreEqual( + expected: new[] { 1, 2, 0.4f, 3.14f, 2.4f, 0.8f, 2.8f, 7.08f }, + actual: results1, + comparer: Comparer.Create(static (x, y) => Math.Abs(x - y) < 0.000001f ? 0 : x.CompareTo(y))); + + CollectionAssert.AreEqual( + expected: new[] { 111, 222, 333, 2, 4, 8, 63, 42, 77, 285, 930, 2741 }, + actual: results2); + } + + [AutoConstructor] + internal readonly partial struct MiscHlslIntrinsicsShader : IComputeShader + { + public readonly ReadWriteBuffer buffer1; + public readonly ReadWriteBuffer buffer2; + + public void Execute() + { + float2 f1 = new(buffer1[0], buffer1[1]); + float2 f2 = new(buffer1[2], buffer1[3]); + float2 f3 = new(buffer1[4], buffer1[5]); + int3 i1 = new(buffer2[0], buffer2[1], buffer2[2]); + int3 i2 = new(buffer2[3], buffer2[4], buffer2[5]); + int3 i3 = new(buffer2[6], buffer2[7], buffer2[8]); + + float2 r1 = Hlsl.Mad(f1, f2, f3); + int3 r2 = Hlsl.Mad(i1, i2, i3); + + buffer1[6] = r1.X; + buffer1[7] = r1.Y; + buffer2[9] = r2.X; + buffer2[10] = r2.Y; + buffer2[11] = r2.Z; + } + } } \ No newline at end of file