From d4501323d7dfce7c1619f7df839075275b0764b3 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 16 Apr 2022 13:03:49 +0200 Subject: [PATCH] Tweak ID2D1DrawTransformMethods rect APIs --- .../PixelShaderEffect.ID2D1DrawTransformMethods.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ComputeSharp.D2D1Interop/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs b/src/ComputeSharp.D2D1Interop/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs index 4b623e0d..ea5db4c0 100644 --- a/src/ComputeSharp.D2D1Interop/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs +++ b/src/ComputeSharp.D2D1Interop/Shaders/Interop/Effects/PixelShaderEffect.ID2D1DrawTransformMethods.cs @@ -120,12 +120,15 @@ partial struct PixelShaderEffect { @this = (PixelShaderEffect*)&((void**)@this)[-1]; - if (inputRectsCount != 1) + if (inputRectsCount != @this->numberOfInputs) { return E.E_INVALIDARG; } - inputRects[0] = *outputRect; + for (int i = 0; i < @this->numberOfInputs; i++) + { + inputRects[i] = *outputRect; + } return S.S_OK; } @@ -136,7 +139,7 @@ partial struct PixelShaderEffect { @this = (PixelShaderEffect*)&((void**)@this)[-1]; - if (inputRectCount != 1) + if (inputRectCount != @this->numberOfInputs) { return E.E_INVALIDARG; }