-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add limits for acceleration structures #7845
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
Conversation
@@ -862,6 +894,32 @@ impl Limits { | |||
} | |||
} | |||
|
|||
/// The minimum guaranteed limits for acceleration structures if you enable [`Features::EXPERIMENTAL_RAY_TRACING_ACCELERATION_STRUCTURE`] | |||
#[must_use] | |||
pub const fn using_minimum_supported_acceleration_structure_values(self) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer this to be internal (for example just accessible to the tests). I think that we should encourage users to set these limits based on their needs rather than some large default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that users should be encouraged not to use the full limits, but I'm not sure that it would encourage users, I have used 500,000 as my limit for max_binding_array_elements_per_shader_stage
because the docs say that it is guaranteed to be supported. I wouldn't be surprised many apps would just request it in development while requirements are changing, and then never change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed this with Connor, we probably want a different way to provide something like using_minimum_supported_acceleration_structure_values
with implications for other extensions to the API. This is probably going to need a bit of experimentation so let's not block this PR for that.
I'm fine with landing this PR as is although it is very likely that using_minimum_supported_acceleration_structure_values
will be replaced with something else (hopefully soon but as always it depends on whether someone finds the time). If you'd prefer to avoid the public API churn you should restrc the visibility of the function.
I'm going to land this and then do the limits transform today. |
Yeah, I'm happy if it gets replaced with something better.
I think that this function would be used once, so I'm not sure that it would be less inconvenient than new limits being added (which happens quite frequently). Edit: if it gets replaced within the next release, it would just be normal trunk churn anyways. |
Connections
Fixes #6803
Description
Adds acceleration structure limits which default to 0, as well as a function to add the minimum supported limits if acceleration structures are supported.
Testing
Adds tests, fixes tests broken by this.
Squash or Rebase?
Squash
Checklist
cargo fmt
.cargo clippy --tests
.cargo xtask test
to run tests.CHANGELOG.md
entry.