Skip to content

Hull, Domain and Geometry Shaders for WindowsDX#7242

Closed
cpt-max wants to merge 8 commits intoMonoGame:developfrom
cpt-max:shader
Closed

Hull, Domain and Geometry Shaders for WindowsDX#7242
cpt-max wants to merge 8 commits intoMonoGame:developfrom
cpt-max:shader

Conversation

@cpt-max
Copy link
Copy Markdown
Contributor

@cpt-max cpt-max commented Jul 22, 2020

This pull request is based on JSandusky's MonoGame branch.
It adds the missing DX11 shader stages to the framework and to the content pipeline (mgfxc).
I created this MonoGame sample project to test the new stages.

The MGFXVersion has been raised to 10 which means shader content need to be rebuilt.
The changes shouldn't break other platforms (theoretically), but they add some non-functional elements to the framework, like for example new PrimitiveTypes that only work with hull shaders. I could #if them out of those platforms for now, but I'd prefer to make them functional instead :)

The DX unit tests didn't work for me, every test that needs a DX device fails to create one. What am I missing? OpenGL unit tests work fine.

@tomspilman tomspilman added this to the 3.9 Release milestone Jul 22, 2020
@tomspilman
Copy link
Copy Markdown
Member

So for sure this needs to sit at least until 3.8 is out the door... we'll get this into 3.9.

Pixel,
Hull,
Domain,
Geometry,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document exactly what these are even with it being internal. Will help when we port to new platforms and also when we move to make the Shader API public.

@tomspilman
Copy link
Copy Markdown
Member

@cpt-max - You should add a new effect processor test for these new shader stages. These were moved here:

https://github.com/MonoGame/MonoGame/blob/develop/Tools/MonoGame.Tools.Tests/EffectProcessorTests.cs

You will need to put a #if DIRECTX around it keep it from running the tests on the Mac.

@cz-dev-ge
Copy link
Copy Markdown

cz-dev-ge commented Jul 28, 2020

@cpt-max - I had a look into your PR. Looks very promising, great work!

I noticed that PrimitiveType does not contain LineListAdj, LineStripAdj, TriangleListAdj and TriangleStripAdj - on purpose?

In SharpDX:

LineListWithAdjacency = 10, // 0x0000000A
LineStripWithAdjacency = 11, // 0x0000000B
TriangleListWithAdjacency = 12, // 0x0000000C
TriangleStripWithAdjacency = 13, // 0x0000000D

Cheers,
Georg

@cpt-max
Copy link
Copy Markdown
Contributor Author

cpt-max commented Jul 29, 2020

I noticed that PrimitiveType does not contain LineListAdj, LineStripAdj, TriangleListAdj and TriangleStripAdj

I'll add those when I update this PR.

@cpt-max
Copy link
Copy Markdown
Contributor Author

cpt-max commented Aug 11, 2020

@tomspilman I added the documentation and unit tests you requested. I don't think the DIRECTX symbol is defined though, so those tests don't run.
@georg-eckert-zeiss the adjacency primitive types are now available.

@tomspilman
Copy link
Copy Markdown
Member

Thanks @cpt-max . I'll find some time to review this in more detail this week.

@cz-dev-ge
Copy link
Copy Markdown

cz-dev-ge commented Aug 11, 2020

@georg-eckert-zeiss the adjacency primitive types are now available.

Great : ) Thank you @cpt-max. Really looking forward to this.

@cpt-max
Copy link
Copy Markdown
Contributor Author

cpt-max commented Aug 16, 2020

I didn't realize at first that some files in MGFXC are supposed to be autogenerated by TinyPG, rather than changed manually. With the latest commit they are autogenerated again.

@cpt-max
Copy link
Copy Markdown
Contributor Author

cpt-max commented May 12, 2024

Closing this PR, as it's contained in #7533

@cpt-max cpt-max closed this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants