Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

[wgsl-in] Handle repeated or missing @workgroup_size #2435

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

fornwall
Copy link
Contributor

@fornwall fornwall commented Aug 13, 2023

Fixes #2271 and also fixes #2434.

@fornwall
Copy link
Contributor Author

fornwall commented Aug 13, 2023

Change for missing @workgroup_size (#2271):

With the below shader:

@compute
fn main() {}

Before:
Screenshot 2023-08-14 at 01 22 55

After:
Screenshot 2023-08-14 at 01 31 10

@fornwall
Copy link
Contributor Author

Change for repeated @workgroup_size (#2434):

For the below shader:

@compute @workgroup_size(1) @workgroup_size(1)
fn main() {}

Before:
Screenshot 2023-08-14 at 01 28 19

After:
Screenshot 2023-08-14 at 01 27 40

@fornwall fornwall force-pushed the validate-workgroup-size branch from 98dd99c to b9e36bf Compare August 13, 2023 23:31
@fornwall fornwall force-pushed the validate-workgroup-size branch from b9e36bf to 52b2f7c Compare August 14, 2023 11:09
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bigger question if we should make it optional at the IR level but this looks good for now.

Thanks for the recent contributions! :)

@teoxoy teoxoy merged commit f6e99a4 into gfx-rs:master Aug 17, 2023
@fornwall fornwall deleted the validate-workgroup-size branch August 17, 2023 12:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants