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

dx12: Descriptor Pool limitations #2652

Open
msiglreith opened this issue Feb 25, 2019 · 7 comments
Open

dx12: Descriptor Pool limitations #2652

msiglreith opened this issue Feb 25, 2019 · 7 comments

Comments

@msiglreith
Copy link
Contributor

Descriptor pools map 1:1 to a slice in the global descriptor heap (1M descriptors, 2k samplers).
Overallocation would be troublesome, but Vulkan allows to have more. Even some CTS tests relay on it as well as some real world applications.
Emulating this is quite costly and I would love to avoid this. At the end this depends on what Khronos Working Group decides on.

@kvark
Copy link
Member

kvark commented Feb 25, 2019

FTR, Khronos TSG didn't decide to change these in any way since we said that it's possible on D3D12. I thought we had a rough plan on supporting multiple pools in play, and it's more a matter of implementation complexity than resulting performance.

@msiglreith
Copy link
Contributor Author

well, yes, it's doable but requires a lot of descriptor juggling. Performance impact is hard to estimate I would say. At the end, exposing a feature to restrict stuff might give the user the best of both worlds?

@kvark
Copy link
Member

kvark commented Feb 25, 2019

Do you have an idea of how this could sound in the spec? Saying something straightforward like "at no point should a draw call use bindings from multiple descriptor pools, unless there is one for samplers specifically" :)

@msiglreith
Copy link
Contributor Author

Exposing an upper limit of concurrently allocated descriptors types by descriptor pools coupled with error on descriptor pool allocating due to fragmentation etc.
This would allow to hide the heap as implementation detail. Maybe in far future Vulkan 3 will move towards Mantle definition of descriptor sets :P

@kvark
Copy link
Member

kvark commented Mar 14, 2019

Interestingly, the number of samplers is already capped in Vulkan: maxSamplerAllocationCount

@msiglreith
Copy link
Contributor Author

right, nonetheless, ordered array of samplers as found in descriptor sets are more of an issue. Even though we can create 2k samplers easily (still less than 4k guarenteed by vulkan) and would be able to store them in gpu heaps we still need to deal with the issue of the user being able to arbitrarily combine them.

@kvark kvark removed the api: hal label Jun 26, 2019
@kvark
Copy link
Member

kvark commented Oct 5, 2020

Sampler limitations are addressed in #3393

bors bot added a commit that referenced this issue Oct 6, 2020
3393: [dx12] Dota-related fixes and improvements r=msiglreith a=kvark

Fixes #2661
Fixes #2668
Fixes #2140
Fixes the sampler part of #2652
Fixes #1949 (I think? it enables dynamic storage buffers)
PR checklist:
- [ ] `make` succeeds (on *nix)
- [ ] `make reftests` succeeds
- [ ] tested examples with the following backends:


Co-authored-by: Dzmitry Malyshau <[email protected]>
Co-authored-by: Dzmitry Malyshau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants