terrafx / terrafx.interop.windows

Interop bindings for Windows.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[IDEA] Add helpers for creating D3D12 pipeline state streams

DethRaid opened this issue · comments

D3D12 has a mechanism known as "pipeline state streams" where essentially you assemble a stream of commands for the driver and GPU to create a pipeline state object (pso) from. This mechanism is very flexible and extensible, but unfortunately requires more work from the application programmer. Therefore, I'd like to propose adding some helpers for creating pipeline state streams

The D3D12 helper library d3dx12.h already has helper structs for all the commands in a pipeline state stream. I propose that we add those structs to this library as-is

We'd have to manually convert those structs to C#, work I've already started in my hobby engine (line numbers might change as I develop my code further). I plan to open a PR with my structs once they're complete

+1. One note is that they need ptr byte alignment from what I can see, so you might need to union them with a void*

I'm not really sure what you mean. Could you give a code example?