D2D compute shader support tracking issue

Open
#552 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Start with the linked Microsoft D2D compute shader documentation and review the unchecked items under Milestones 2 and 3. Use the existing prototype work and the DX12 ThreadIds APIs as context; completion means implementing the remaining projection/generator and Win2D interop milestones.

Written by the indexing model from the issue text.

Description

proposal :bulb:

[!NOTE]
Tracking issue, closes #351

Description

This meta issue is for tracking all work related to adding support for D2D compute shaders.
See MS docs on D2D compute shaders for further reference.

Planned work

There's extensive work that will be needed to add full support, so it's being split into different milestones.

Milestone 1 (prototype):
  • Create a new ComputeShaderEffect native object that implements ID2D1EffectImpl and ID2D1ComputeTransform
    • Mostly the same stuff as the pixel shader effect minus the differences there
    • Can probably share/reuse a lot of code from that other type
  • Add a new ID2D1ComputeShader interface with appropriate hooks
  • Expose some D2D1ComputeShaderEffect interop API with methods to register shaders and whatnot
  • Manually implement a hello world D2D compute shader with this and get it to run
Milestone 2 (projection/generator support):
  • Expose similar ThreadIds APIs as for DX12 shaders
  • Expose some new D2D APIs for the compute shader exclusive stuff
  • Write a header for D2D compute shaders
  • D2D injects a custom constant buffer with additional info
  • Add a new source generator to transpile compute shaders too and generate supporting code
Milestone 3 (Win2D interop):
  • Add a new ComputeShaderEffect<T> effect for Win2D interop
Dominant language
C#
Stars
3.2k
Forks
148
Avg merge
4h 32m
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Sergio0694/ComputeSharp

All issues in Sergio0694/ComputeSharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.