Commit Graph
9013 Commits
Author SHA1 Message Date
Jacob Hughes 27f2ce397a Re-export Naga (#4172) 2023-09-25 13:23:03 -07:00
Jim Blandy 3bcb114adb snapshots: Change messages for generating output.
Change printlns in the backend functions to say "generating" instead
of "writing" before calling the Naga backends. "Writing" suggests
writing output to a file; "generating" seems more accurate for calling
a backend.
2023-09-25 07:59:41 -07:00
Jim Blandy 5af7ebc955 snapshots: Consolidate path handling.
Add a new type, `Input`, representing a particular Naga input file,
with methods to generate related paths - output files with a
particular extension, parameter files, and the input file itself.
Use this throughout `snapshots.rs` to generate paths.

Give `Input` utility methods for reading and writing files.
2023-09-25 07:59:41 -07:00
Jim Blandy 4329a6a51b snapshots: Name convert_glsl_variations_check output consistently.
Rather than adding a `-glsl` suffix to the name, just rely on
`check_targets`' standard naming behavior, treating
`tests/in/variations.glsl` like any other snapshot input.
2023-09-25 07:59:41 -07:00
Jim Blandy 0c69735f59 Change naga::back::spv::DebugInfo::file_name to a &Path.
This makes it a bit easier to use in the CLI and snapshot tests.
2023-09-25 07:59:41 -07:00
Jim Blandy 7060246357 Give convert_glsl_folder's output more consistent names.
Don't replace dots with dashes in the output filenames for no reason.
Instead, give them names consistent with those generated by
`write_output_glsl`.
2023-09-25 07:59:41 -07:00
Jim Blandy bc0fc97b26 Delete output files no longer generated by snapshot tests. 2023-09-25 07:59:41 -07:00
Evan Mark Hopkins dc3d2b1e78 [glsl-out] Polyfill frexp 2023-09-25 13:17:50 +02:00
Jim Blandy 711aa1a834 snapshots: convert_spv: Don't validate the module twice.
Remove the call to `Validator::validate` in `convert_spv`, since it
directly follows the call to `check_targets`, which also called
`Validator::validate`.

The only difference between the two is whether `Parameters::god_mode`
is respected, but this difference doesn't seem to have been
deliberate: at the time the call to `check_targets` was added to
`convert_spv` (5f21cf360, 2021-02-17), the two calls were exactly the
same.
2023-09-25 12:25:15 +02:00
dependabot[bot] 7e0d6c971f Bump glam from 0.24.1 to 0.24.2 (#4171)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 00:09:48 -04:00
Jim Blandy 8e393ca213 Add some missing Debug implementations. (#4166) 2023-09-22 23:00:07 -04:00
Fredrik Fornwall 85e2141355 Fix using trunk version on mac (#4164)
Overriding the metal version in the workspace Cargo.toml using a patch
section does not work for projects building against the trunk version:

wgpu = { git = "https://github.com/gfx-rs/wgpu", branch = "trunk" }

Instead specify the metal dependencies only once in wgpu-hal.
2023-09-22 14:58:33 +02:00
Jim Blandy 57bebbcd20 [wgsl-in] Use deterministic ordering for dependency ordering.
Use `FastIndexSet`, rather than `FastHashSet`, for tracking global
declarations' dependencies, so that the order in which functions are
inserted into the `Module` is not dependent on the hash function.
2023-09-21 23:18:18 -07:00
Jim Blandy 1b1ea37f15 [spv-out] Use FastIndexMap for Frontend::switch_cases. 2023-09-21 21:37:32 -07:00
Jim Blandy 89523aec08 Use FastIndexMap for SpecialTypes::predeclared_types. 2023-09-21 21:37:32 -07:00
Jim Blandy 6a254d904d [wgsl-in] Use FastIndexMap for temporary named expressions table. 2023-09-21 21:37:32 -07:00
Jim Blandy ae0423835d Introduce FastIndexMap type alias, and use it for NamedExpressions. 2023-09-21 21:37:32 -07:00
Jim Blandy 9105036be7 Use FastIndexSet for UniqueArena. 2023-09-21 21:37:32 -07:00
Connor Fitzgerald 855fefc10e Update CODEOWNERS with new wgpu team (#4162) 2023-09-21 06:01:35 +00:00
dependabot[bot] 3ff04c31e6 Bump smallvec from 1.11.0 to 1.11.1 (#4161)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 02:36:45 +00:00
Aaron Hill 2b4a8b318f wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12 (#4116)
* wgpu-core: Only produce StageError::InputNotConsumed on DX11/DX12

This error only exists due to an issue with naga's HLSL support:
https://github.com/gfx-rs/naga/issues/1945
The WGPU spec itself allows vertex shader outputs that are
not consumed by the fragment shader.

Until the issue is fixed, we can allow unconsumed outputs on
all platforms other than DX11/DX12.

* Add Features::SHADER_UNUSED_VERTEX_OUTPUT to allow disabling check

* Pick an unused feature id
2023-09-20 21:02:37 -04:00
Neil Sarkar 3c37c2afe5 Bring back xtask alias (#4160) 2023-09-20 19:07:40 +00:00
AlphyrandConnor Fitzgerald 82f0cd9ee6 Fix Features::TEXTURE_COMPRESSION_ASTC* doc (#4157)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-20 18:45:09 +00:00
Jim Blandy b586631efe Small cleanups to backend naming. (#2491)
Document `FunctionType` better.

Use `FunctionCtx` name key methods where appropriate in the WGSL and
HLSL backends.
2023-09-20 19:20:47 +02:00
Jim Blandy 8b267218a4 Implement module compaction.
Add a new Naga feature, `"compact"`, which adds a new function
`naga::compact::compact`, which removes unused expressions, types, and
constants from a `Module`.
2023-09-20 18:46:33 +02:00
Jim Blandy 0b7afb3943 cli: Move file output into its own function. 2023-09-20 18:46:33 +02:00
Jim Blandy 55a2ee445c cli: Gather up SPIR-V output options settings. 2023-09-20 18:46:33 +02:00
Jim Blandy 187aed8e11 cli: Put a full naga::front::spv::Options in Parameters.
This lets us gather up the code that influences SPV input.
2023-09-20 18:46:33 +02:00
Jim Blandy 23860c0e29 cli: Change --generate-debug-symbols from option to switch.
Change `--generate-debug-symbols` from an option that requires a
value, "true" or "false", to a switch, whose mere presence enables the
feature.
2023-09-20 18:46:33 +02:00
Jim Blandy 2a47a15f03 cli: Populate dot backend options in Parameters early.
This is a step towards having the output loop depend only on `params`,
rather than both `params` and `args`.
2023-09-20 18:46:33 +02:00
Jim Blandy 54df410b94 [wgsl-in] make RuntimeExpressionContext::local_table a shared ref. (#2481)
The `front::wgsl::lowerer::RuntimeExpressionContext::local_table`
field does not need to be a mutable reference, as expressions never
introduce new local bindings.
2023-09-20 05:12:48 +00:00
Frederik Magnus Johansen VestreandTeodor Tanasoaia dc5beac8c9 Support dual source blending (#4022)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-09-19 13:26:30 +02:00
andriyDev d8b7573b9e Prevent using multiple push constant variables in one entry point. (#2484) 2023-09-19 12:59:32 +02:00
dependabot[bot] 5c26841d66 Bump termcolor from 1.2.0 to 1.3.0 (#4152)
Bumps [termcolor](https://github.com/BurntSushi/termcolor) from 1.2.0 to 1.3.0.
- [Commits](https://github.com/BurntSushi/termcolor/compare/1.2.0...1.3.0)

---
updated-dependencies:
- dependency-name: termcolor
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:35:12 +02:00
dependabot[bot] 87a0cd0e69 Bump profiling from 1.0.10 to 1.0.11 (#4153)
Bumps [profiling](https://github.com/aclysma/profiling) from 1.0.10 to 1.0.11.
- [Changelog](https://github.com/aclysma/profiling/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aclysma/profiling/commits)

---
updated-dependencies:
- dependency-name: profiling
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:35:02 +02:00
Andreas ReichandConnor Fitzgerald 507101987b Make StoreOp an enum instead of a bool (#4147)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-18 14:58:41 -04:00
Teodor Tanasoaia 8adab25905 [d3d12] Document map_blend_factor (#4151) 2023-09-18 10:43:11 -04:00
Jim Blandy 471229a48f Update Naga to df8107b7 (2023-9-15). (#4149) 2023-09-17 15:39:16 -04:00
Jim Blandy f2bd557186 Tests for wgpu#4139. (#4148) 2023-09-17 14:08:42 -04:00
Andreas Reich 0ffdae31a1 Metal encoder & pass timestamp support (#4008)
Implements timer queries via write_timestamp on Metal for encoders (whenever timer queries are available) and passes (for Intel/AMD GPUs, where we should advertise TIMESTAMP_QUERY_INSIDE_PASSES now).

Due to some bugs in Metal this was a lot harder than expected. I believe the solution is close to optimal with the current restrictions in place. For details see code comments.
2023-09-16 20:01:46 +00:00
Kevin Reid 7c575a0b40 Add details to RequestDeviceError. (#4145) 2023-09-16 00:16:49 -04:00
Jim Blandy df8107b788 Fix documentation comments for proc::Layouter::update. (#2478) 2023-09-15 16:10:25 +00:00
dependabot[bot] 40cc2ee88a Bump libc from 0.2.147 to 0.2.148 (#4134)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 16:39:48 -04:00
dependabot[bot] 4bc7d8788a Bump serde_json from 1.0.106 to 1.0.107 (#4133)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 16:39:39 -04:00
Connor Fitzgerald b488e03d9f Workaround NV bug (#4132) 2023-09-14 16:38:21 -04:00
Nicolas SilvaandNicolas Silva 90b022d437 Print errors in a more readable format in the player. (#4137)
Co-authored-by: Nicolas Silva <nical@fastnmail.com>
2023-09-14 18:12:35 +02:00
Bruce Mitchener 266634e822 clippy: Fix unnecessary_mut_passed warning. (#2476)
The `ModuleInfo` was not used mutably.
2023-09-13 16:11:10 +02:00
Bruce Mitchener ae9c1f7847 clippy: Remove extra Iterator bounds. (#2475)
`Iterator` is a supertrait of `ExactSizeIterator`, so specifying `ExactSizeIterator` is enough.
2023-09-13 15:45:50 +02:00
Bruce Mitchener d2c29f012e Remove useless calls to into_iter(). (#2474)
The `splice()` call takes `IntoIterator`, so calling `into_iter()` is not needed.
2023-09-13 15:44:50 +02:00
Bruce Mitchener 79c5cb2d04 spv-out: Remove empty else branch. (#2473) 2023-09-13 15:44:02 +02:00