-
Notifications
You must be signed in to change notification settings - Fork 193
Implement Binding Arrays #1845
Implement Binding Arrays #1845
Conversation
1b95694
to
d22b70a
Compare
fn to_global_or_argument(&self) -> Result<GlobalOrArgument, ExpressionError> { | ||
fn to_global_or_argument( | ||
&self, | ||
expression_arena: &Arena<crate::Expression>, |
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.
this becomes bad with this argument. If the function input is not one expression but multiple ones, it shouldn't be a method on the Expression
any more. Let's turn it to a freestanding function (accepting an arena and a handle)? Or put it on the arena?
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 looked at the core parts, and it all seems very reasonable.
Amazing (and titanic) work on your part, excited to see this landing!
Should we also implement this for the SPIR-V frontend? (related to gfx-rs/wgpu#4463) |
Ideally both spirv and glsl, but those can be future prs |
d22b70a
to
825ca93
Compare
I'm going to merge this, and if you want a different representation of that function, I'll do a follow up PR |
The duplicate entry was introduced accidentally in gfx-rs#1845.
The duplicate entry was introduced accidentally in gfx-rs#1845.
The duplicate entry was introduced accidentally in #1845.
Closes #751
Sorry that this PR is larger than I'd like, I couldn't really land any part of it without other parts, so in an attempt to make things easier to review, I have segmented the PR into sections based on the section of code. While the commits are not standalone and this PR needs to be squashed, you can review this pr commit by commit.
This PR implements Binding Arrays and their indexing in the IR, Validator, wgsl-in, and {msl,hlsl,spv}-out.