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

Add more metal keywords #4707

Merged
merged 2 commits into from
Nov 17, 2023
Merged

Add more metal keywords #4707

merged 2 commits into from
Nov 17, 2023

Conversation

fornwall
Copy link
Contributor

@fornwall fornwall commented Nov 17, 2023

Fixes #4545.

I'm not totally sure if some name shadowing could be allowed?

Also moved clamped_lod_e from keywords to reserved prefixes.

@fornwall fornwall requested a review from a team as a code owner November 17, 2023 07:40
@fornwall fornwall force-pushed the metal-keywords branch 3 times, most recently from 846846c to 04e47ac Compare November 17, 2023 08:49
@teoxoy
Copy link
Member

teoxoy commented Nov 17, 2023

For the ones that have been removed, I compiled a list that mentions why they were unnecessary:

  • char8_t - C++20
  • co_await - C++20
  • co_return - C++20
  • co_yield - C++20
  • module - C++20
  • import - C++20
  • visible - metal function attribute
  • vec_step - clang specific for OpenCL
  • typeof - specific to gcc
  • non-temporal - can't find these in C++ nor Metal
  • dereferenceable - can't find these in C++ nor Metal
  • invariant - metal attribute
  • compute - this is kernel for metal
  • read_only - we use metal::access::read
  • write_only - we use metal::access::write
  • read_write - we use metal::access::read_write

@teoxoy
Copy link
Member

teoxoy commented Nov 17, 2023

I'm not totally sure if some name shadowing could be allowed?

We can't allow shadowing or else we might run into something like:
https://shader-playground.timjones.io/11df1fe53f589f9a52906a21c8454170

#4555 is tracking this issue.

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.

This looks great, but it seems packed_booln, halfnxm and floatnxm are missing.

@fornwall
Copy link
Contributor Author

This looks great, but it seems packed_booln, halfnxm and floatnxm are missing.

@teoxoy Thanks - added them in 52ee978

@fornwall fornwall requested a review from teoxoy November 17, 2023 13:25
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.

Looks great, thanks!

@teoxoy teoxoy merged commit a5c93ca into gfx-rs:trunk Nov 17, 2023
27 checks passed
@fornwall fornwall deleted the metal-keywords branch November 17, 2023 16:15
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 21, 2023
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy

Note: This revision contains the arcanization work

# Changelog

 * #4702 Add `WasmNotSendSync`
   By daxpedda in gfx-rs/wgpu#4702
 * #4707 Add more metal keywords
   By fornwall in gfx-rs/wgpu#4707
 * #4706 [naga] remove `span` and `validate` features
   By teoxoy in gfx-rs/wgpu#4706
 * #4709 [dx12] filter out haswell iGPUs
   By teoxoy in gfx-rs/wgpu#4709
 * #4712 Fix typo in pull request template.
   By jimblandy in gfx-rs/wgpu#4712
 * #4598 Add more lints
   By daxpedda in gfx-rs/wgpu#4598
 * #4713 [naga wgsl-in] Include base when printing pointer and array types.
   By jimblandy in gfx-rs/wgpu#4713
 * #4718 [vk] check that adapters are Vulkan compliant
   By teoxoy in gfx-rs/wgpu#4718
 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions.
   By jimblandy in gfx-rs/wgpu#4719
 * #4725 Corrects typo in examples FrameCounter
   By cantudo in gfx-rs/wgpu#4725
 * #3626 Arcanization of wgpu core resources
   By gents83 in gfx-rs/wgpu#3626

Differential Revision: https://phabricator.services.mozilla.com/D194048
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 21, 2023
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy

Note: This revision contains the arcanization work

# Changelog

 * #4702 Add `WasmNotSendSync`
   By daxpedda in gfx-rs/wgpu#4702
 * #4707 Add more metal keywords
   By fornwall in gfx-rs/wgpu#4707
 * #4706 [naga] remove `span` and `validate` features
   By teoxoy in gfx-rs/wgpu#4706
 * #4709 [dx12] filter out haswell iGPUs
   By teoxoy in gfx-rs/wgpu#4709
 * #4712 Fix typo in pull request template.
   By jimblandy in gfx-rs/wgpu#4712
 * #4598 Add more lints
   By daxpedda in gfx-rs/wgpu#4598
 * #4713 [naga wgsl-in] Include base when printing pointer and array types.
   By jimblandy in gfx-rs/wgpu#4713
 * #4718 [vk] check that adapters are Vulkan compliant
   By teoxoy in gfx-rs/wgpu#4718
 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions.
   By jimblandy in gfx-rs/wgpu#4719
 * #4725 Corrects typo in examples FrameCounter
   By cantudo in gfx-rs/wgpu#4725
 * #3626 Arcanization of wgpu core resources
   By gents83 in gfx-rs/wgpu#3626

Differential Revision: https://phabricator.services.mozilla.com/D194048
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 21, 2023
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy

Note: This revision contains the arcanization work

# Changelog

 * #4702 Add `WasmNotSendSync`
   By daxpedda in gfx-rs/wgpu#4702
 * #4707 Add more metal keywords
   By fornwall in gfx-rs/wgpu#4707
 * #4706 [naga] remove `span` and `validate` features
   By teoxoy in gfx-rs/wgpu#4706
 * #4709 [dx12] filter out haswell iGPUs
   By teoxoy in gfx-rs/wgpu#4709
 * #4712 Fix typo in pull request template.
   By jimblandy in gfx-rs/wgpu#4712
 * #4598 Add more lints
   By daxpedda in gfx-rs/wgpu#4598
 * #4713 [naga wgsl-in] Include base when printing pointer and array types.
   By jimblandy in gfx-rs/wgpu#4713
 * #4718 [vk] check that adapters are Vulkan compliant
   By teoxoy in gfx-rs/wgpu#4718
 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions.
   By jimblandy in gfx-rs/wgpu#4719
 * #4725 Corrects typo in examples FrameCounter
   By cantudo in gfx-rs/wgpu#4725
 * #3626 Arcanization of wgpu core resources
   By gents83 in gfx-rs/wgpu#3626

Differential Revision: https://phabricator.services.mozilla.com/D194048

UltraBlame original commit: eb839abb42abde594497e419517260997fa1fc4d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 21, 2023
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy

Note: This revision contains the arcanization work

# Changelog

 * #4702 Add `WasmNotSendSync`
   By daxpedda in gfx-rs/wgpu#4702
 * #4707 Add more metal keywords
   By fornwall in gfx-rs/wgpu#4707
 * #4706 [naga] remove `span` and `validate` features
   By teoxoy in gfx-rs/wgpu#4706
 * #4709 [dx12] filter out haswell iGPUs
   By teoxoy in gfx-rs/wgpu#4709
 * #4712 Fix typo in pull request template.
   By jimblandy in gfx-rs/wgpu#4712
 * #4598 Add more lints
   By daxpedda in gfx-rs/wgpu#4598
 * #4713 [naga wgsl-in] Include base when printing pointer and array types.
   By jimblandy in gfx-rs/wgpu#4713
 * #4718 [vk] check that adapters are Vulkan compliant
   By teoxoy in gfx-rs/wgpu#4718
 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions.
   By jimblandy in gfx-rs/wgpu#4719
 * #4725 Corrects typo in examples FrameCounter
   By cantudo in gfx-rs/wgpu#4725
 * #3626 Arcanization of wgpu core resources
   By gents83 in gfx-rs/wgpu#3626

Differential Revision: https://phabricator.services.mozilla.com/D194048

UltraBlame original commit: eb839abb42abde594497e419517260997fa1fc4d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 21, 2023
…6978ae2d251. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler,teoxoy

Note: This revision contains the arcanization work

# Changelog

 * #4702 Add `WasmNotSendSync`
   By daxpedda in gfx-rs/wgpu#4702
 * #4707 Add more metal keywords
   By fornwall in gfx-rs/wgpu#4707
 * #4706 [naga] remove `span` and `validate` features
   By teoxoy in gfx-rs/wgpu#4706
 * #4709 [dx12] filter out haswell iGPUs
   By teoxoy in gfx-rs/wgpu#4709
 * #4712 Fix typo in pull request template.
   By jimblandy in gfx-rs/wgpu#4712
 * #4598 Add more lints
   By daxpedda in gfx-rs/wgpu#4598
 * #4713 [naga wgsl-in] Include base when printing pointer and array types.
   By jimblandy in gfx-rs/wgpu#4713
 * #4718 [vk] check that adapters are Vulkan compliant
   By teoxoy in gfx-rs/wgpu#4718
 * #4719 [naga] Let constant evaluation of `As` preserve `Splat` expressions.
   By jimblandy in gfx-rs/wgpu#4719
 * #4725 Corrects typo in examples FrameCounter
   By cantudo in gfx-rs/wgpu#4725
 * #3626 Arcanization of wgpu core resources
   By gents83 in gfx-rs/wgpu#3626

Differential Revision: https://phabricator.services.mozilla.com/D194048

UltraBlame original commit: eb839abb42abde594497e419517260997fa1fc4d
@teoxoy teoxoy mentioned this pull request Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Declaring something with name 'half' causes broken MSL generated.
2 participants