bevy/crates/bevy_render/src/render_resource
JMS55 bb1616a212
Decoupled naga for wgpu testing (#18099)
# Objective
- Allow bevy and wgpu developers to test newer versions of wgpu without
having to update naga_oil.

## Solution

- Currently bevy feeds wgsl through naga_oil to get a naga::Module that
it passes to wgpu.
- Added a way to pass wgsl through naga_oil, and then serialize the
naga::Module back into a wgsl string to feed to wgpu, allowing wgpu to
parse it using it's internal version of naga (and not the version of
naga bevy_render/naga_oil is using).

## Testing
1. Run 3d_scene (it works)
2. Run 3d_scene with `--features bevy_render/decoupled_naga` (it still
works)
3. Add the following patch to bevy/Cargo.toml, run cargo update, and
compile again (it will fail)
```toml
[patch.crates-io]
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "2764e7a39920e23928d300e8856a672f1952da63" }
wgpu-core = { git = "https://github.com/gfx-rs/wgpu", rev = "2764e7a39920e23928d300e8856a672f1952da63" }
wgpu-hal = { git = "https://github.com/gfx-rs/wgpu", rev = "2764e7a39920e23928d300e8856a672f1952da63" }
wgpu-types = { git = "https://github.com/gfx-rs/wgpu", rev = "2764e7a39920e23928d300e8856a672f1952da63" }
```
4. Fix errors and compile again (it will work, and you didn't have to
touch naga_oil)
2025-03-09 21:49:48 +00:00
..
batched_uniform_buffer.rs Fix *most* clippy lints (#15906) 2024-10-14 20:52:35 +00:00
bind_group_entries.rs Move all_tuples to a new crate (#16161) 2024-12-03 17:41:09 +00:00
bind_group_layout_entries.rs Procedural atmospheric scattering (#16314) 2025-01-23 22:52:46 +00:00
bind_group_layout.rs Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
bind_group.rs Add a new #[data] attribute to AsBindGroup that allows packing data for multiple materials into a single array. (#17965) 2025-02-24 21:38:55 +00:00
bindless.rs Add a new #[data] attribute to AsBindGroup that allows packing data for multiple materials into a single array. (#17965) 2025-02-24 21:38:55 +00:00
buffer_vec.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
buffer.rs Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
gpu_array_buffer.rs Update render_resource gpu buffer doc comments (#17118) 2025-01-28 05:13:04 +00:00
mod.rs Use global binding arrays for bindless resources. (#17898) 2025-02-21 05:55:36 +00:00
pipeline_cache.rs Decoupled naga for wgpu testing (#18099) 2025-03-09 21:49:48 +00:00
pipeline_specializer.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
pipeline.rs Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
resource_macros.rs bevy_render: Apply #![deny(clippy::allow_attributes, clippy::allow_attributes_without_reason)] (#17194) 2025-01-06 23:10:58 +00:00
shader.rs Add support for experimental WESL shader source (#17953) 2025-03-09 19:26:55 +00:00
storage_buffer.rs Update render_resource gpu buffer doc comments (#17118) 2025-01-28 05:13:04 +00:00
texture.rs Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
uniform_buffer.rs Use target_abi = "sim" instead of ios_simulator feature (#17702) 2025-02-11 23:01:26 +00:00