Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for feature level 10_0 #483

Closed
wants to merge 1 commit into from

Conversation

smoogipoo
Copy link
Contributor

Do not merge

I'm making this branch both as a tracking branch for our own fork where we use feature level 10_0 to target older devices like 9800gt, and as a place to discuss how this could be mainlined if at all.

For example, should I track the selected feature level to retarget the shader version?

break;
case ShaderStages.Compute:
profile = "cs_5_0";
profile = "cs_4_0";
Copy link
Contributor

@frenzibyte frenzibyte Apr 23, 2023

Choose a reason for hiding this comment

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

A major limitation in cs_4_0 is the inability to bind RWTexture2D UAVs (known as "typed UAVs", although RWStructuredBuffer is still supported), and the inability to bind more than one UAV resource. This should be handled somewhere in Veldrid (probably as a feature in GraphicsDeviceFeatures).

See https://learn.microsoft.com/en-us/windows/win32/direct3d11/direct3d-11-advanced-stages-compute-shader#using-compute-shader-on-direct3d-10x-hardware for more information.

It would be quite nicer to use newer shader profiles if the device supports it, as that would save from doing unnecessary work to pass a UAV buffer instead of a texture (if I'm understanding device initialisation correctly, this should be as easy as doing featureLevel >= 11.0 ? cs_5_0 : cs_4_0).

@smoogipoo smoogipoo closed this Apr 24, 2023
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.

2 participants