bevy/crates/bevy_render/src
François 949487d92c
make glsl and spirv support optional (#8491)
# Objective

- Reduce compilation time

## Solution

- Make `spirv` and `glsl` shader format support optional. They are not
needed for Bevy shaders.
- on my mac (where shaders are compiled to `msl`), this reduces the
total build time by 2 to 5 seconds, improvement should be even better
with less cores

There is a big reduction in compile time for `naga`, and small
improvements on `wgpu` and `bevy_render`

This PR with optional shader formats enabled timings:
<img width="1478" alt="current main"
src="https://user-images.githubusercontent.com/8672791/234347032-cbd5c276-a9b0-49c3-b793-481677391c18.png">

This PR:
<img width="1479" alt="this pr"
src="https://user-images.githubusercontent.com/8672791/234347059-a67412a9-da8d-4356-91d8-7b0ae84ca100.png">


---

## Migration Guide

- If you want to use shaders in `spirv`, enable the
`shader_format_spirv` feature
- If you want to use shaders in `glsl`, enable the `shader_format_glsl`
feature
2023-04-25 19:30:48 +00:00
..
camera Changed (Vec2, Vec2) to Rect in Camera::logical_viewport_rect (#7867) 2023-04-24 15:24:52 +00:00
color Color::Lcha constructors (#8041) 2023-03-11 18:50:16 +00:00
mesh Compute vertex_count for indexed meshes on GpuMesh (#8460) 2023-04-22 17:28:58 +00:00
primitives Minor mistake in Frustum::intersects_obb (#8305) 2023-04-05 19:37:59 +00:00
render_graph Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
render_phase Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
render_resource make glsl and spirv support optional (#8491) 2023-04-25 19:30:48 +00:00
renderer Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
texture docs(bevy_render): Remove copy-pasted docstring (#8479) 2023-04-24 00:46:49 +00:00
view Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
extract_component.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
extract_param.rs Use UnsafeWorldCell to increase code quality for SystemParam (#8174) 2023-04-01 15:45:07 +00:00
extract_resource.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
globals.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
globals.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
lib.rs Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
pipelined_rendering.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
render_asset.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
settings.rs add OpenGL and DX11 backends (#7481) 2023-02-04 23:20:20 +00:00
spatial_bundle.rs enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00