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

WebGPURenderer: Enable Subgroup Directives/Builtins #29053

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

cmhhelgeson
Copy link
Contributor

Add ability to generate the subgroup directives and subgroup attributes in WGSLNodeBuilder. Support for enabling the directive and utilizing subgroup builtins will be available in Chrome 128.

Copy link

github-actions bot commented Aug 1, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.1 kB (169.6 kB) 685.1 kB (169.6 kB) +0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
462 kB (111.5 kB) 462 kB (111.5 kB) +0 B
@mrdoob mrdoob requested a review from sunag August 2, 2024 01:52
@sunag sunag added this to the r168 milestone Aug 3, 2024
@@ -645,6 +645,18 @@ ${ flowData.code }

}

getSubgroupSize() {

return this.getBuiltin( 'subgroup_size', 'subgroupSize', 'u32', 'attribute' );
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could call enableSubGroups() here and getSubgroupIndex()? to add directive automatically..

I think enableDirective() should use Set classe instead of Array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds good by me, could probably also do the same for enableExtension if we want default behavior to be the same across extensions ( i.e enable or require )

@sunag sunag merged commit ff43819 into mrdoob:dev Aug 6, 2024
12 checks passed
@cmhhelgeson cmhhelgeson deleted the wgsl_enable_subgroup branch August 6, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants