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

No texture swizzling on DX11 #2312

Open
fkaa opened this Issue Aug 11, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@fkaa
Copy link
Member

fkaa commented Aug 11, 2018

If you're not familiar with swizzling, it's a way to re-order the elements of a vector (and in Vulkan replace elements with constants). DirectX 11 doesn't support swizzling like DX12 and Vulkan do, so a workaround is needed.

A really wild thought would be to intercept bind calls, and if a bound image view is defined to be swizzled, we patch the shader in the right places with the swizzling pattern hardcoded! I don't see much reason as to why this wouldn't work, but this could lead to exponential shader permutations with regard to the amount of image views the shader uses (in the worst case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment