From d28366f7653ecc5918346ae8527ab26c794cb30b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 10 Dec 2022 19:21:50 +0100 Subject: [PATCH] Rename PixelShaderEffect.Value property to ConstantBuffer --- .../PixelShaderEffect{T}.ICanvasImageInterop.cs | 4 ++-- .../PixelShaderEffect{T}.Properties.Interop.cs | 8 ++++---- .../PixelShaderEffect{T}.Properties.cs | 2 +- src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasImageInterop.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasImageInterop.cs index 1510d1ed..e25ea0f3 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasImageInterop.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasImageInterop.cs @@ -194,7 +194,7 @@ unsafe partial class PixelShaderEffect // Note: the resource texture managers are deliberately not read back, as the only supported way to set // those is directly from the current effect instance. As such, they'd all either be the same instances // that are already stored locally, or trying to retrieve them would just throw an exception. - this.value = this.d2D1Effect.Get()->GetConstantBuffer(); + this.constantBuffer = this.d2D1Effect.Get()->GetConstantBuffer(); this.transformMapper = this.d2D1Effect.Get()->GetTransformMapper(); this.cacheOutput = this.d2D1Effect.Get()->GetCachedProperty(); this.d2D1BufferPrecision = this.d2D1Effect.Get()->GetPrecisionProperty(); @@ -265,7 +265,7 @@ unsafe partial class PixelShaderEffect } // Set the constant buffer for the effect - D2D1PixelShaderEffect.SetConstantBufferForD2D1Effect(this.d2D1Effect.Get(), in this.value); + D2D1PixelShaderEffect.SetConstantBufferForD2D1Effect(this.d2D1Effect.Get(), in this.constantBuffer); // If there is a transform mapper, set it in the effect if (this.transformMapper is not null) diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.Interop.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.Interop.cs index eb9d81d0..0e5c3bd3 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.Interop.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.Interop.cs @@ -22,15 +22,15 @@ unsafe partial class PixelShaderEffect return this.d2D1Effect.Get() switch { not null => this.d2D1Effect.Get()->GetConstantBuffer(), - _ => this.value + _ => this.constantBuffer }; } } /// - /// Sets the marshalled value for . + /// Sets the marshalled value for . /// - /// The value to set for . + /// The value to set for . private void SetConstantBuffer(in T value) { using ReferenceTracker.Lease _0 = GetReferenceTracker().GetLease(); @@ -45,7 +45,7 @@ unsafe partial class PixelShaderEffect else { // Otherwise, just store the value locally - this.value = value; + this.constantBuffer = value; } } } diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs index 74954eda..05098a6a 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs @@ -11,7 +11,7 @@ partial class PixelShaderEffect /// /// Gets or sets the current value in use. /// - public T Value + public T ConstantBuffer { get => GetConstantBuffer(); set => SetConstantBuffer(in value); diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs index 24264553..dd4d9c0a 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs @@ -45,9 +45,9 @@ public sealed partial class PixelShaderEffect : IReferenceTrackedObject, ICan private ComPtr d2D1Effect; /// - /// The backing field for . + /// The backing field for . /// - private T value; + private T constantBuffer; /// /// The backing field for .