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

maxStorageBufferRange limited to 4 GB #1016

Open
Snektron opened this issue Aug 8, 2019 · 3 comments
Open

maxStorageBufferRange limited to 4 GB #1016

Snektron opened this issue Aug 8, 2019 · 3 comments
Assignees

Comments

@Snektron
Copy link

Snektron commented Aug 8, 2019

Hello,

Plenty of current GPUs have memories exceeding 4 GB, however, in the vulkan specification the maximum size of a shader storage buffer that can be bound to a descriptor is limited to 4 GB because its stored in a uint32_t. Is there a reason for this limitation or is this simply an oversight? Or am i doing something wrong by trying to update a descriptor set with a range bigger than 4 GB?

@jeffbolznv
Copy link
Contributor

IMO this is a mistake and it should have been a VkDeviceSize, but even if it were it's likely that many implementations would still advertise 4GB-1 because it either matches HW limitations or simplifies/cheapens the implementation. In discussion, the group didn't consider this high priority.

As a workaround, you could use buffer_device_address which doesn't use bindings or have this bounds-checking. I think this is what many people consider the more future looking direction.

@krOoze
Copy link
Contributor

krOoze commented Aug 12, 2019

@jeffbolznv Wouldn't it also be a problem in GLSL, where .length() returns an int?

@jeffbolznv
Copy link
Contributor

Yeah, that seems like it would be an issue, too.

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

No branches or pull requests

3 participants