-
Notifications
You must be signed in to change notification settings - Fork 964
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
Switch Binding Arrays on Metal to Argument Buffers #6751
Switch Binding Arrays on Metal to Argument Buffers #6751
Conversation
1f67c9f
to
05236bc
Compare
7be0e51
to
8986532
Compare
cb8d1d7
to
793f047
Compare
@@ -48,7 +48,7 @@ env: | |||
CARGO_INCREMENTAL: false | |||
CARGO_TERM_COLOR: always | |||
WGPU_DX12_COMPILER: dxc | |||
RUST_LOG: info | |||
RUST_LOG: debug |
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 think this is a better setting anyway
{ | ||
return; | ||
} |
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.
Missed a feature check on this benchmark
@@ -10,6 +9,8 @@ use super::conv; | |||
use crate::auxil::map_naga_stage; | |||
use crate::TlasInstance; | |||
|
|||
use metal::foreign_types::ForeignType; |
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.
Trait import
(entry, layout) | ||
}); | ||
for (entry, layout) in layout_and_entry_iter { | ||
// Bindless path |
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.
The bindless path is entirely new, the bindful path is entirely the same.
6857fc9
to
4ce012c
Compare
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.
Looks good, left a question.
/// | ||
/// As such, we wrap all argument buffers in a struct that has a single generic `<T>` field. | ||
/// This allows `NagaArgumentBufferWrapper<metal::texture<..>>*` to work. The astute among | ||
/// you have noticed that this should be exactly the same to the compiler, and you're correct. |
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.
😅
&& self.supports_arrays_of_textures_write | ||
{ | ||
features.insert(F::STORAGE_RESOURCE_BINDING_ARRAY); | ||
} |
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 don't fully understand the old comment but removing this means that write only storage textures are no longer supported. Did this work before?
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.
Lines 573 to 578 in f6f9233
/// Supported platforms: | |
/// - Metal (with MSL 2.2+ on macOS 10.13+) | |
/// - Vulkan | |
/// | |
/// This is a native only feature. | |
const STORAGE_RESOURCE_BINDING_ARRAY = 1 << 29; |
Seems to be listed here.
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 don't fully understand the old comment but removing this means that write only storage textures are no longer supported. Did this work before?
No they hit a nice fat assert in naga and generated bad msl once through
Connections
Closes #3334
Closes #3640
Depends on #6732
Commits cannot be merged separately, but can be reviewed separately