diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ColorfulInfinity.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ColorfulInfinity.cs index 94ac59d22..aebb80fb0 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ColorfulInfinity.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ColorfulInfinity.cs @@ -11,6 +11,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct ColorfulInfinity : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ContouredLayers.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ContouredLayers.cs index 63b01ac66..1a7fa26c2 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ContouredLayers.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ContouredLayers.cs @@ -10,6 +10,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct ContouredLayers : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/FractalTiling.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/FractalTiling.cs index db30a226e..fab955e8f 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/FractalTiling.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/FractalTiling.cs @@ -11,6 +11,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct FractalTiling : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/HelloWorld.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/HelloWorld.cs index 497277206..2332ba771 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/HelloWorld.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/HelloWorld.cs @@ -9,6 +9,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct HelloWorld : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/MengerJourney.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/MengerJourney.cs index ff9758216..410b302a8 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/MengerJourney.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/MengerJourney.cs @@ -10,6 +10,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct MengerJourney : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/Octagrams.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/Octagrams.cs index aa16a6bba..be787a781 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/Octagrams.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/Octagrams.cs @@ -10,6 +10,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct Octagrams : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ProteanClouds.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ProteanClouds.cs index 762bf8106..068914f4e 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ProteanClouds.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/ProteanClouds.cs @@ -11,6 +11,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct ProteanClouds : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/PyramidPattern.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/PyramidPattern.cs index a272f95ce..4564cb0c5 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/PyramidPattern.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/PyramidPattern.cs @@ -11,6 +11,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct PyramidPattern : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TerracedHills.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TerracedHills.cs index 6669651c7..951a49710 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TerracedHills.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TerracedHills.cs @@ -10,6 +10,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct TerracedHills : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TriangleGridContouring.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TriangleGridContouring.cs index d472f8e6a..8c4352b39 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TriangleGridContouring.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TriangleGridContouring.cs @@ -10,6 +10,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct TriangleGridContouring : ID2D1PixelShader { diff --git a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TwoTiledTruchet.cs b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TwoTiledTruchet.cs index 00c763740..2deb4d94e 100644 --- a/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TwoTiledTruchet.cs +++ b/samples/ComputeSharp.SwapChain.Shaders.D2D1.Shared/TwoTiledTruchet.cs @@ -10,6 +10,7 @@ namespace ComputeSharp.SwapChain.Shaders.D2D1; [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct TwoTiledTruchet : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/D2D1PixelShaderTests.cs b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/D2D1PixelShaderTests.cs index 9c3b0f3e6..2a9bb7b22 100644 --- a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/D2D1PixelShaderTests.cs +++ b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/D2D1PixelShaderTests.cs @@ -32,6 +32,7 @@ public unsafe void ShaderWithAssemblyLevelAttributes() [D2DInputSimple(0)] [D2DInputSimple(1)] [D2DInputSimple(2)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithNoCompileAttributes : ID2D1PixelShader { public float4 Execute() @@ -66,6 +67,7 @@ public unsafe void ShaderWithAssemblyLevelAttributesAndOverriddenProfile() [D2DInputSimple(1)] [D2DInputSimple(2)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithOverriddenProfile : ID2D1PixelShader { public float4 Execute() @@ -100,6 +102,7 @@ public unsafe void ShaderWithAssemblyLevelAttributesAndOverriddenOptions() [D2DInputSimple(1)] [D2DInputSimple(2)] [D2DCompileOptions(D2D1CompileOptions.Debug | D2D1CompileOptions.AvoidFlowControl | D2D1CompileOptions.PartialPrecision)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithOverriddenOptions : ID2D1PixelShader { public float4 Execute() @@ -135,6 +138,7 @@ public unsafe void ShaderWithAssemblyLevelAttributesAndEverythingOverridden() [D2DInputSimple(2)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] [D2DCompileOptions(D2D1CompileOptions.Debug | D2D1CompileOptions.AvoidFlowControl | D2D1CompileOptions.PartialPrecision)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithOverriddenProfileAndOptions : ID2D1PixelShader { public float4 Execute() diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1EffectRegistrationDataTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1EffectRegistrationDataTests.cs index 712626f39..3de9777cc 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1EffectRegistrationDataTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1EffectRegistrationDataTests.cs @@ -114,6 +114,7 @@ public unsafe void EffectRegistrationData_Validate() [D2DInputCount(2)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private readonly partial struct TestRegistrationBlobShader : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs index ac7a715f4..04a2b4e34 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderEffectTests.cs @@ -120,6 +120,7 @@ public unsafe void NullConstantBuffer_DrawImageFails() [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct NullConstantBufferShader : ID2D1PixelShader { @@ -151,6 +152,7 @@ public unsafe void GetValueSize_ConstantBuffer() [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct ConstantBufferSizeTestShader : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderTests.cs index abbee5eb9..2bb2fd867 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1PixelShaderTests.cs @@ -40,6 +40,7 @@ public unsafe void GetInputType() [D2DInputComplex(3)] [D2DInputComplex(5)] [D2DInputSimple(6)] + [D2DGeneratedShaderMarshaller] partial struct ShaderWithMultipleInputs : ID2D1PixelShader { public Float4 Execute() @@ -67,6 +68,7 @@ public unsafe void GetOutputBufferChannelDepth() } [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] partial struct EmptyShader : ID2D1PixelShader { public Float4 Execute() @@ -77,6 +79,7 @@ public Float4 Execute() [D2DInputCount(0)] [D2DOutputBuffer(D2D1BufferPrecision.UInt16Normalized)] + [D2DGeneratedShaderMarshaller] partial struct OnlyBufferPrecisionShader : ID2D1PixelShader { public Float4 Execute() @@ -87,6 +90,7 @@ public Float4 Execute() [D2DInputCount(0)] [D2DOutputBuffer(D2D1ChannelDepth.Four)] + [D2DGeneratedShaderMarshaller] partial struct OnlyChannelDepthShader : ID2D1PixelShader { public Float4 Execute() @@ -97,6 +101,7 @@ public Float4 Execute() [D2DInputCount(0)] [D2DOutputBuffer(D2D1BufferPrecision.UInt8NormalizedSrgb, D2D1ChannelDepth.One)] + [D2DGeneratedShaderMarshaller] partial struct CustomBufferOutputShader : ID2D1PixelShader { public Float4 Execute() @@ -163,6 +168,7 @@ public unsafe void GetInputDescriptions_Custom() [D2DInputDescription(2, D2D1Filter.MinLinearMagPointMinLinear, LevelOfDetailCount = 4)] [D2DInputDescription(5, D2D1Filter.MinMagPointMipLinear)] [D2DInputDescription(6, D2D1Filter.MinPointMagMipLinear, LevelOfDetailCount = 3)] + [D2DGeneratedShaderMarshaller] partial struct ShaderWithInputDescriptions : ID2D1PixelShader { public Float4 Execute() @@ -215,6 +221,7 @@ public unsafe void GetResourceTextureDescriptions_Custom() [D2DInputComplex(1)] [D2DInputComplex(3)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] partial struct ShaderWithResourceTextures : ID2D1PixelShader { @@ -294,6 +301,7 @@ public unsafe void GetBytecode_FromEmbeddedBytecode_WithTargetProfileAndPackMatr [D2DInputSimple(1)] [D2DInputSimple(2)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader40Level91)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithEmbeddedBytecode : ID2D1PixelShader { public float4 Execute() @@ -343,6 +351,7 @@ public unsafe void GetBytecode_FromEmbeddedBytecode_WithCompileOptions() [D2DInputSimple(2)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader40Level91)] [D2DCompileOptions(D2D1CompileOptions.IeeeStrictness | D2D1CompileOptions.OptimizationLevel2)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithEmbeddedBytecodeAndCompileOptions : ID2D1PixelShader { public float4 Execute() @@ -374,6 +383,7 @@ public void LoadBytecode_VerifyEffectiveValues_ExplicitShaderProfile() [D2DInputCount(1)] [D2DInputSimple(0)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader40Level91)] + [D2DGeneratedShaderMarshaller] private readonly partial struct SimpleShaderWithExplicitShaderProfileAndNoCompileOptions : ID2D1PixelShader { public float4 Execute() @@ -385,6 +395,7 @@ public float4 Execute() [D2DInputCount(1)] [D2DInputComplex(0)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader40Level91)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ComplexShaderWithExplicitShaderProfileAndNoCompileOptions : ID2D1PixelShader { public float4 Execute() @@ -410,6 +421,7 @@ public void LoadBytecode_VerifyEffectiveValues_ExplicitCompileOptions() [D2DInputCount(1)] [D2DInputSimple(0)] [D2DCompileOptions(D2D1CompileOptions.OptimizationLevel2 | D2D1CompileOptions.IeeeStrictness)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithExplicitCompileOptionsAndNoShaderProfile : ID2D1PixelShader { public float4 Execute() @@ -458,6 +470,7 @@ public unsafe void GetConstantBuffer_Empty_Span() [D2DInputSimple(0)] [D2DInputDescription(0, D2D1Filter.MinMagMipPoint)] [D2DPixelOptions(D2D1PixelOptions.TrivialSampling)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ShaderWithNoCapturedValues : ID2D1PixelShader { public float4 Execute() @@ -605,6 +618,7 @@ private unsafe void ValidateShaderWithScalarVectorAndMatrixTypesConstantBuffer(R } [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private readonly partial struct ShaderWithScalarVectorAndMatrixTypes : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs index fdafabd9a..31f2ef8ca 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1ReflectionServicesTests.cs @@ -60,6 +60,7 @@ public void GetShaderInfo() [D2DInputComplex(2)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader41)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ReflectedShader : ID2D1PixelShader { private readonly float2 offset; @@ -119,6 +120,7 @@ public void GetShaderInfoWithDoublePrecisionFeature() [D2DInputCount(1)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] + [D2DGeneratedShaderMarshaller] private readonly partial struct ReflectedShaderWithDoubleOperations : ID2D1PixelShader { private readonly double amount; diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs index ecd7dce1c..be8f5f88a 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs @@ -171,6 +171,7 @@ public unsafe void SingleThreadedFactory_AssigningRCWManagerFails() [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] private partial struct DummyShaderWithResourceTexture : ID2D1PixelShader { [D2DResourceTextureIndex(0)] @@ -459,6 +460,7 @@ public unsafe void LoadPixelsFromResourceTexture2D_AlternatingResourceTextureMan [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] private partial struct IndexFrom2DResourceTextureShader : ID2D1PixelShader { [D2DResourceTextureIndex(0)] @@ -533,6 +535,7 @@ public unsafe void LoadPixelsFromResourceTexture3D() [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct IndexFrom3DResourceTextureShader : ID2D1PixelShader { @@ -620,6 +623,7 @@ public unsafe void UpdateResourceTexture1D(int width, int startOffset, int updat [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct CopyFromResourceTexture1DShader : ID2D1PixelShader { @@ -717,6 +721,7 @@ public unsafe void UpdateResourceTexture2D( [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct CopyFromResourceTexture2DShader : ID2D1PixelShader { @@ -823,6 +828,7 @@ public unsafe void UpdateResourceTexture3D( [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct CopyFromResourceTexture3DShader : ID2D1PixelShader { @@ -868,6 +874,7 @@ public unsafe void NullResourceTexture_DrawImageFails() [D2DInputCount(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] private partial struct NullResourceTextureShader : ID2D1PixelShader { [D2DResourceTextureIndex(0)] diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests.cs index 7b5b24ddc..0d05dc10e 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests.cs @@ -6,6 +6,7 @@ namespace ComputeSharp.D2D1.Tests; internal sealed partial class D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests { [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] public readonly partial struct MyShader : ID2D1PixelShader { // This test just needs to validate the project builds fine with this shader. diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs index ff4dcb6c7..0c8a37e57 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs @@ -198,6 +198,7 @@ static void Test(GCHandle transformMapperHandle) } [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] private partial struct DummyShader : ID2D1PixelShader { public float4 Execute() @@ -287,6 +288,7 @@ public override void MapOutputToInputs(in Rectangle output, Span inpu [D2DInputCount(1)] [D2DInputSimple(0)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct ShaderWithDispatchArea : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs index ef09dc4d9..e0d9a9bad 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs @@ -509,6 +509,7 @@ private sealed partial class VerticalConvolution [D2DOutputBuffer(D2D1BufferPrecision.Float32, D2D1ChannelDepth.Four)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] public readonly partial struct Shader : ID2D1PixelShader { @@ -558,6 +559,7 @@ private sealed partial class HorizontalConvolutionAndAccumulatePartials [D2DOutputBuffer(D2D1BufferPrecision.Float32, D2D1ChannelDepth.Four)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] [D2DRequiresScenePosition] + [D2DGeneratedShaderMarshaller] [AutoConstructor] public readonly partial struct Shader : ID2D1PixelShader { @@ -602,6 +604,7 @@ public float4 Execute() [D2DInputDescription(0, D2D1Filter.MinMagMipPoint)] [D2DOutputBuffer(D2D1BufferPrecision.Float32, D2D1ChannelDepth.Four)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct GammaHighlight : ID2D1PixelShader { @@ -624,6 +627,7 @@ public float4 Execute() [D2DInputDescription(0, D2D1Filter.MinMagMipPoint)] [D2DOutputBuffer(D2D1BufferPrecision.Float32, D2D1ChannelDepth.Four)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] internal readonly partial struct InverseGammaHighlight : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/CheckerboardClipEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/CheckerboardClipEffect.cs index 22ca046c7..5755e139f 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/CheckerboardClipEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/CheckerboardClipEffect.cs @@ -4,6 +4,7 @@ namespace ComputeSharp.D2D1.Tests.Effects; [D2DInputSimple(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] public partial struct CheckerboardClipEffect : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/InvertEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/InvertEffect.cs index b48972ccd..949cf282c 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/InvertEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/InvertEffect.cs @@ -3,6 +3,7 @@ namespace ComputeSharp.D2D1.Tests.Effects; [D2DInputCount(1)] [D2DInputSimple(0)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] public partial struct InvertEffect : ID2D1PixelShader { /// diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/InvertWithThresholdEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/InvertWithThresholdEffect.cs index 542ed4908..03b5505a6 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/InvertWithThresholdEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/InvertWithThresholdEffect.cs @@ -3,6 +3,7 @@ namespace ComputeSharp.D2D1.Tests.Effects; [D2DInputCount(1)] [D2DInputSimple(0)] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] public partial struct InvertWithThresholdEffect : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/PixelateEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/PixelateEffect.cs index 59ed43c79..07b491358 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/PixelateEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/PixelateEffect.cs @@ -4,9 +4,11 @@ namespace ComputeSharp.D2D1.Tests.Effects; [D2DInputComplex(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader40)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] public readonly partial struct PixelateEffect : ID2D1PixelShader { + [D2DGeneratedShaderMarshaller] [AutoConstructor] public readonly partial struct Constants { diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs index 8f68bced9..e4a6b8083 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/ZonePlateEffect.cs @@ -12,6 +12,7 @@ internal static class MathF [D2DInputCount(0)] [D2DRequiresScenePosition] [D2DShaderProfile(D2D1ShaderProfile.PixelShader50)] +[D2DGeneratedShaderMarshaller] [AutoConstructor] public readonly partial struct ZonePlateEffect : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs b/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs index 6bdccd446..3b1711075 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs +++ b/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs @@ -698,6 +698,7 @@ public void Dispose() } [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct ShaderWithNoInputs : ID2D1PixelShader { diff --git a/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs b/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs index 7440367f4..eaa83d7aa 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs +++ b/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs @@ -459,6 +459,7 @@ public unsafe void Interop_WrapperFactoryDetectsMismatchedDevices() } [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct ShaderWithSomeProperties : ID2D1PixelShader { @@ -475,6 +476,7 @@ public float4 Execute() } [D2DInputCount(1)] + [D2DGeneratedShaderMarshaller] [AutoConstructor] private partial struct ShaderWithSomePropertiesAndInputs : ID2D1PixelShader { @@ -487,6 +489,7 @@ public float4 Execute() } [D2DInputCount(0)] + [D2DGeneratedShaderMarshaller] private partial struct ShaderWith0Inputs : ID2D1PixelShader { public float4 Execute() @@ -497,6 +500,7 @@ public float4 Execute() [D2DInputCount(1)] [D2DInputSimple(0)] + [D2DGeneratedShaderMarshaller] private partial struct ShaderWith1Input : ID2D1PixelShader { public float4 Execute() @@ -508,6 +512,7 @@ public float4 Execute() [D2DInputCount(2)] [D2DInputSimple(0)] [D2DInputSimple(1)] + [D2DGeneratedShaderMarshaller] private partial struct ShaderWith2Inputs : ID2D1PixelShader { public float4 Execute()