Skip to content

Conversation

Sergio0694
Copy link
Owner

Description

This PR adds two new D2D1PixelShader APIs to create shader values from constant buffer data.

API breakdown

namespace ComputeSharp.D2D1.Interop;

public static class PixelShaderEffect
{
    public static T CreateFromConstantBuffer<T>(ReadOnlySpan<byte> span)
        where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>;

    public static bool TryCreateFromConstantBuffer<T>(ReadOnlySpan<byte> span, out T shader)
        where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>;
}

@Sergio0694 Sergio0694 added the feature 🎉 A brand new feature for ComputeSharp label Sep 30, 2023
@Sergio0694 Sergio0694 merged commit b19a517 into main Sep 30, 2023
@Sergio0694 Sergio0694 deleted the dev/create-from-buffer-apis branch September 30, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 A brand new feature for ComputeSharp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant