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

[naga wgsl-in] Automatic conversions for var initializers. #4755

Merged
merged 3 commits into from
Dec 6, 2023

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented Nov 23, 2023

Draft because it depends on #4743.

Checklist

  • Run cargo fmt.
  • Run cargo clippy.
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@jimblandy
Copy link
Member Author

Seems like the global var and const cases have some common code that could be factored out.

@jimblandy jimblandy force-pushed the global-var-automatic-conversions branch from 9b040f6 to a220510 Compare November 25, 2023 22:41
@jimblandy jimblandy changed the title [naga wgsl-in] Automatic conversions for global var initializers. [naga wgsl-in] Automatic conversions for var initializers. Nov 25, 2023
@jimblandy jimblandy force-pushed the global-var-automatic-conversions branch from a220510 to 3320637 Compare November 25, 2023 22:43
@jimblandy jimblandy force-pushed the global-var-automatic-conversions branch from 3320637 to 580ec96 Compare December 5, 2023 20:27
@jimblandy jimblandy marked this pull request as ready for review December 5, 2023 20:29
@jimblandy jimblandy requested a review from a team as a code owner December 5, 2023 20:29
@jimblandy
Copy link
Member Author

The new tests are kind of all over the place. At first I was trying to be exhaustive, but it started to get out of hand, so I checked the actual code coverage we were getting from snapshots and wgsl_errors for the changes in this PR, and it was fine. So I left the tests as they stood.

In the future, I think we should try to use coverage more to guide our test authoring.

@jimblandy
Copy link
Member Author

I believe the Linux failure is #4825, and this PR is safe to land.

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.

LGTM

@teoxoy teoxoy merged commit f470103 into gfx-rs:trunk Dec 6, 2023
26 of 27 checks passed
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Dec 9, 2023
…eb3c29ef785. r=webgpu-reviewers,supply-chain-reviewers,jimb

# Changelog

 * #4807 Bump wasm-bindgen-test from 0.3.38 to 0.3.39
   By dependabot[bot] in gfx-rs/wgpu#4807
 * #4830 Use Display instead of Debug to log errors.
   By nical in gfx-rs/wgpu#4830
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4832 vulkan: fix multi-planar texture creation
   By xiaopengli89 in gfx-rs/wgpu#4832
 * #4758 [vk] remove (old) unused blocklist for dual source blending
   By teoxoy in gfx-rs/wgpu#4758
 * #4828 Remove DX11 backend
   By valaphee in gfx-rs/wgpu#4828
 * #4836 [gl] add support for line and point polygon modes
   By valaphee in gfx-rs/wgpu#4836
 * #4820 Bump futures-lite from 2.0.1 to 2.1.0
   By dependabot[bot] in gfx-rs/wgpu#4820
 * #4811 Expose shader validation
   By daxpedda in gfx-rs/wgpu#4811
 * #3507 [wgpu-hal] Inline RayQuery Support
   By daniel-keitel in gfx-rs/wgpu#3507
 * #4726 Fix Javascript exception on repeated `BufferSlice::get_mapped_range` calls
   By DouglasDwyer in gfx-rs/wgpu#4726
 * #4841 Remove `expose-ids` Feature
   By cwfitzgerald in gfx-rs/wgpu#4841
 * #4843 Some Minor `wgpu-core` Cleanups
   By cwfitzgerald in gfx-rs/wgpu#4843
 * #4844 Work around cbindgen issue
   By nical in gfx-rs/wgpu#4844

Differential Revision: https://phabricator.services.mozilla.com/D195735
aosmond pushed a commit to aosmond/gecko that referenced this pull request Dec 10, 2023
…eb3c29ef785. r=webgpu-reviewers,supply-chain-reviewers,jimb

# Changelog

 * #4807 Bump wasm-bindgen-test from 0.3.38 to 0.3.39
   By dependabot[bot] in gfx-rs/wgpu#4807
 * #4830 Use Display instead of Debug to log errors.
   By nical in gfx-rs/wgpu#4830
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4832 vulkan: fix multi-planar texture creation
   By xiaopengli89 in gfx-rs/wgpu#4832
 * #4758 [vk] remove (old) unused blocklist for dual source blending
   By teoxoy in gfx-rs/wgpu#4758
 * #4828 Remove DX11 backend
   By valaphee in gfx-rs/wgpu#4828
 * #4836 [gl] add support for line and point polygon modes
   By valaphee in gfx-rs/wgpu#4836
 * #4820 Bump futures-lite from 2.0.1 to 2.1.0
   By dependabot[bot] in gfx-rs/wgpu#4820
 * #4811 Expose shader validation
   By daxpedda in gfx-rs/wgpu#4811
 * #3507 [wgpu-hal] Inline RayQuery Support
   By daniel-keitel in gfx-rs/wgpu#3507
 * #4726 Fix Javascript exception on repeated `BufferSlice::get_mapped_range` calls
   By DouglasDwyer in gfx-rs/wgpu#4726
 * #4841 Remove `expose-ids` Feature
   By cwfitzgerald in gfx-rs/wgpu#4841
 * #4843 Some Minor `wgpu-core` Cleanups
   By cwfitzgerald in gfx-rs/wgpu#4843
 * #4844 Work around cbindgen issue
   By nical in gfx-rs/wgpu#4844

Differential Revision: https://phabricator.services.mozilla.com/D195735
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 12, 2023
…eb3c29ef785. r=webgpu-reviewers,supply-chain-reviewers,jimb

# Changelog

 * #4807 Bump wasm-bindgen-test from 0.3.38 to 0.3.39
   By dependabot[bot] in gfx-rs/wgpu#4807
 * #4830 Use Display instead of Debug to log errors.
   By nical in gfx-rs/wgpu#4830
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4832 vulkan: fix multi-planar texture creation
   By xiaopengli89 in gfx-rs/wgpu#4832
 * #4758 [vk] remove (old) unused blocklist for dual source blending
   By teoxoy in gfx-rs/wgpu#4758
 * #4828 Remove DX11 backend
   By valaphee in gfx-rs/wgpu#4828
 * #4836 [gl] add support for line and point polygon modes
   By valaphee in gfx-rs/wgpu#4836
 * #4820 Bump futures-lite from 2.0.1 to 2.1.0
   By dependabot[bot] in gfx-rs/wgpu#4820
 * #4811 Expose shader validation
   By daxpedda in gfx-rs/wgpu#4811
 * #3507 [wgpu-hal] Inline RayQuery Support
   By daniel-keitel in gfx-rs/wgpu#3507
 * #4726 Fix Javascript exception on repeated `BufferSlice::get_mapped_range` calls
   By DouglasDwyer in gfx-rs/wgpu#4726
 * #4841 Remove `expose-ids` Feature
   By cwfitzgerald in gfx-rs/wgpu#4841
 * #4843 Some Minor `wgpu-core` Cleanups
   By cwfitzgerald in gfx-rs/wgpu#4843
 * #4844 Work around cbindgen issue
   By nical in gfx-rs/wgpu#4844

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

UltraBlame original commit: 0dfeaf41028d13f9dd98b106e262c1deb255398d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 12, 2023
…eb3c29ef785. r=webgpu-reviewers,supply-chain-reviewers,jimb

# Changelog

 * #4807 Bump wasm-bindgen-test from 0.3.38 to 0.3.39
   By dependabot[bot] in gfx-rs/wgpu#4807
 * #4830 Use Display instead of Debug to log errors.
   By nical in gfx-rs/wgpu#4830
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4832 vulkan: fix multi-planar texture creation
   By xiaopengli89 in gfx-rs/wgpu#4832
 * #4758 [vk] remove (old) unused blocklist for dual source blending
   By teoxoy in gfx-rs/wgpu#4758
 * #4828 Remove DX11 backend
   By valaphee in gfx-rs/wgpu#4828
 * #4836 [gl] add support for line and point polygon modes
   By valaphee in gfx-rs/wgpu#4836
 * #4820 Bump futures-lite from 2.0.1 to 2.1.0
   By dependabot[bot] in gfx-rs/wgpu#4820
 * #4811 Expose shader validation
   By daxpedda in gfx-rs/wgpu#4811
 * #3507 [wgpu-hal] Inline RayQuery Support
   By daniel-keitel in gfx-rs/wgpu#3507
 * #4726 Fix Javascript exception on repeated `BufferSlice::get_mapped_range` calls
   By DouglasDwyer in gfx-rs/wgpu#4726
 * #4841 Remove `expose-ids` Feature
   By cwfitzgerald in gfx-rs/wgpu#4841
 * #4843 Some Minor `wgpu-core` Cleanups
   By cwfitzgerald in gfx-rs/wgpu#4843
 * #4844 Work around cbindgen issue
   By nical in gfx-rs/wgpu#4844

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

UltraBlame original commit: 0dfeaf41028d13f9dd98b106e262c1deb255398d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 12, 2023
…eb3c29ef785. r=webgpu-reviewers,supply-chain-reviewers,jimb

# Changelog

 * #4807 Bump wasm-bindgen-test from 0.3.38 to 0.3.39
   By dependabot[bot] in gfx-rs/wgpu#4807
 * #4830 Use Display instead of Debug to log errors.
   By nical in gfx-rs/wgpu#4830
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4755 [naga wgsl-in] Automatic conversions for `var` initializers.
   By jimblandy in gfx-rs/wgpu#4755
 * #4832 vulkan: fix multi-planar texture creation
   By xiaopengli89 in gfx-rs/wgpu#4832
 * #4758 [vk] remove (old) unused blocklist for dual source blending
   By teoxoy in gfx-rs/wgpu#4758
 * #4828 Remove DX11 backend
   By valaphee in gfx-rs/wgpu#4828
 * #4836 [gl] add support for line and point polygon modes
   By valaphee in gfx-rs/wgpu#4836
 * #4820 Bump futures-lite from 2.0.1 to 2.1.0
   By dependabot[bot] in gfx-rs/wgpu#4820
 * #4811 Expose shader validation
   By daxpedda in gfx-rs/wgpu#4811
 * #3507 [wgpu-hal] Inline RayQuery Support
   By daniel-keitel in gfx-rs/wgpu#3507
 * #4726 Fix Javascript exception on repeated `BufferSlice::get_mapped_range` calls
   By DouglasDwyer in gfx-rs/wgpu#4726
 * #4841 Remove `expose-ids` Feature
   By cwfitzgerald in gfx-rs/wgpu#4841
 * #4843 Some Minor `wgpu-core` Cleanups
   By cwfitzgerald in gfx-rs/wgpu#4843
 * #4844 Work around cbindgen issue
   By nical in gfx-rs/wgpu#4844

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

UltraBlame original commit: 0dfeaf41028d13f9dd98b106e262c1deb255398d
@jimblandy jimblandy deleted the global-var-automatic-conversions branch December 13, 2023 16:31
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.

None yet

2 participants