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

[Merged by Bors] - Replace old renderer with new renderer #3312

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ jobs:
sed -i "s|PATH_TO_CHANGE|$curr|" vk_swiftshader_icd.json;
- name: Build bevy
run: |
cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_wgpu,bevy_winit,render,png,hdr,x11,bevy_ci_testing"
cargo build --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing"
- name: Run examples
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo "running $example_name - "`date`
time CI_TESTING_CONFIG=$example VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_wgpu,bevy_winit,render,png,hdr,x11,bevy_ci_testing"
time CI_TESTING_CONFIG=$example VK_ICD_FILENAMES=$(pwd)/vk_swiftshader_icd.json DRI_PRIME=0 xvfb-run cargo run --example $example_name --no-default-features --features "bevy_dynamic_plugin,bevy_gilrs,bevy_gltf,bevy_winit,render,png,hdr,x11,bevy_ci_testing"
sleep 10
done

Expand Down
142 changes: 19 additions & 123 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@ repository = "https://github.com/bevyengine/bevy"

[workspace]
exclude = ["benches", "crates/bevy_ecs_compile_fail_tests"]
members = ["crates/*", "pipelined/*", "examples/ios", "tools/ci", "errors"]
members = ["crates/*", "examples/ios", "tools/ci", "errors"]

[features]
default = [
"bevy_audio",
"bevy_core_pipeline",
"bevy_gilrs",
"bevy_gltf2",
"bevy_wgpu",
"bevy_sprite2",
"bevy_render2",
"bevy_pbr2",
"bevy_ui2",
"bevy_text2",
"bevy_winit",
"render",
"png",
Expand All @@ -39,9 +31,11 @@ default = [
# Force dynamic linking, which improves iterative compile times
dynamic = ["bevy_dylib"]

# Rendering support (Also needs the bevy_wgpu feature or a third-party rendering backend)
# Rendering support
render = [
"bevy_internal/bevy_core_pipeline",
"bevy_internal/bevy_pbr",
"bevy_internal/bevy_gltf",
"bevy_internal/bevy_render",
"bevy_internal/bevy_sprite",
"bevy_internal/bevy_text",
Expand All @@ -50,20 +44,16 @@ render = [

# Optional bevy crates
bevy_audio = ["bevy_internal/bevy_audio"]
bevy_core_pipeline = ["bevy_internal/bevy_core_pipeline"]
bevy_render = ["bevy_internal/bevy_render"]
bevy_text = ["bevy_internal/bevy_text"]
bevy_pbr = ["bevy_internal/bevy_pbr"]
bevy_sprite = ["bevy_internal/bevy_sprite"]
bevy_dynamic_plugin = ["bevy_internal/bevy_dynamic_plugin"]
bevy_gilrs = ["bevy_internal/bevy_gilrs"]
bevy_gltf = ["bevy_internal/bevy_gltf"]
bevy_wgpu = ["bevy_internal/bevy_wgpu"]
bevy_winit = ["bevy_internal/bevy_winit"]

bevy_core_pipeline = ["bevy_internal/bevy_core_pipeline"]
bevy_render2 = ["bevy_internal/bevy_render2"]
bevy_sprite2 = ["bevy_internal/bevy_sprite2"]
bevy_pbr2 = ["bevy_internal/bevy_pbr2"]
bevy_gltf2 = ["bevy_internal/bevy_gltf2"]
bevy_ui2 = ["bevy_internal/bevy_ui2"]
bevy_text2 = ["bevy_internal/bevy_text2"]

trace_chrome = ["bevy_internal/trace_chrome"]
trace_tracy = ["bevy_internal/trace_tracy"]
trace = ["bevy_internal/trace"]
Expand Down Expand Up @@ -120,10 +110,6 @@ path = "examples/hello_world.rs"
name = "contributors"
path = "examples/2d/contributors.rs"

[[example]]
name = "mesh"
path = "examples/2d/mesh.rs"

[[example]]
name = "many_sprites"
path = "examples/2d/many_sprites.rs"
Expand All @@ -144,60 +130,35 @@ path = "examples/2d/sprite_sheet.rs"
name = "text2d"
path = "examples/2d/text2d.rs"

[[example]]
name = "text2d_pipelined"
path = "examples/2d/text2d_pipelined.rs"

[[example]]
name = "texture_atlas"
path = "examples/2d/texture_atlas.rs"

[[example]]
name = "pipelined_texture_atlas"
path = "examples/2d/pipelined_texture_atlas.rs"

# 3D Rendering
[[example]]
name = "3d_scene"
path = "examples/3d/3d_scene.rs"

[[example]]
name = "3d_scene_pipelined"
path = "examples/3d/3d_scene_pipelined.rs"

[[example]]
name = "many_cubes_pipelined"
path = "examples/3d/many_cubes_pipelined.rs"

[[example]]
name = "cornell_box_pipelined"
path = "examples/3d/cornell_box_pipelined.rs"
name = "lighting"
path = "examples/3d/lighting.rs"

[[example]]
name = "load_gltf"
path = "examples/3d/load_gltf.rs"
required-features = ["bevy_gltf"]

[[example]]
name = "load_gltf_pipelined"
path = "examples/3d/load_gltf_pipelined.rs"
name = "many_cubes"
path = "examples/3d/many_cubes.rs"

[[example]]
name = "msaa"
path = "examples/3d/msaa.rs"

[[example]]
name = "msaa_pipelined"
path = "examples/3d/msaa_pipelined.rs"

[[example]]
name = "orthographic"
path = "examples/3d/orthographic.rs"

[[example]]
name = "orthographic_pipelined"
path = "examples/3d/orthographic_pipelined.rs"

[[example]]
name = "parenting"
path = "examples/3d/parenting.rs"
Expand All @@ -207,46 +168,25 @@ name = "pbr"
path = "examples/3d/pbr.rs"

[[example]]
name = "pbr_pipelined"
path = "examples/3d/pbr_pipelined.rs"

[[example]]
name = "render_to_texture"
path = "examples/3d/render_to_texture.rs"

[[example]]
name = "shadow_biases_pipelined"
path = "examples/3d/shadow_biases_pipelined.rs"
name = "shadow_biases"
path = "examples/3d/shadow_biases.rs"

[[example]]
name = "shadow_caster_receiver_pipelined"
path = "examples/3d/shadow_caster_receiver_pipelined.rs"

[[example]]
name = "spawner"
path = "examples/3d/spawner.rs"
name = "shadow_caster_receiver"
path = "examples/3d/shadow_caster_receiver.rs"

[[example]]
name = "texture"
path = "examples/3d/texture.rs"

[[example]]
name = "texture_pipelined"
path = "examples/3d/texture_pipelined.rs"

[[example]]
name = "update_gltf_scene"
path = "examples/3d/update_gltf_scene.rs"
required-features = ["bevy_gltf"]

[[example]]
name = "wireframe"
path = "examples/3d/wireframe.rs"

[[example]]
name = "z_sort_debug"
path = "examples/3d/z_sort_debug.rs"

# Application
[[example]]
name = "custom_loop"
Expand Down Expand Up @@ -292,7 +232,6 @@ path = "examples/app/thread_pool_resources.rs"
[[example]]
name = "asset_loading"
path = "examples/asset/asset_loading.rs"
required-features = ["bevy_gltf"]

[[example]]
name = "custom_asset"
Expand All @@ -305,7 +244,6 @@ path = "examples/asset/custom_asset_io.rs"
[[example]]
name = "hot_asset_reloading"
path = "examples/asset/hot_asset_reloading.rs"
required-features = ["bevy_gltf"]

# Async Tasks
[[example]]
Expand Down Expand Up @@ -387,7 +325,6 @@ path = "examples/ecs/timers.rs"
[[example]]
name = "alien_cake_addict"
path = "examples/game/alien_cake_addict.rs"
required-features = ["bevy_gltf"]

[[example]]
name = "breakout"
Expand Down Expand Up @@ -457,47 +394,19 @@ name = "scene"
path = "examples/scene/scene.rs"

# Shaders
[[example]]
name = "animate_shader"
path = "examples/shader/animate_shader.rs"

[[example]]
name = "array_texture"
path = "examples/shader/array_texture.rs"

[[example]]
name = "hot_shader_reloading"
path = "examples/shader/hot_shader_reloading.rs"

[[example]]
name = "mesh_custom_attribute"
path = "examples/shader/mesh_custom_attribute.rs"

[[example]]
name = "shader_custom_material"
path = "examples/shader/shader_custom_material.rs"

[[example]]
name = "shader_defs"
path = "examples/shader/shader_defs.rs"

[[example]]
name = "custom_shader_pipelined"
path = "examples/shader/custom_shader_pipelined.rs"

[[example]]
name = "shader_defs_pipelined"
path = "examples/shader/shader_defs_pipelined.rs"
name = "shader_material"
path = "examples/shader/shader_material.rs"

# Tools
[[example]]
name = "bevymark"
path = "examples/tools/bevymark.rs"

[[example]]
name = "bevymark_pipelined"
path = "examples/tools/bevymark_pipelined.rs"

# UI (User Interface)
[[example]]
name = "button"
Expand All @@ -519,24 +428,11 @@ path = "examples/ui/text_debug.rs"
name = "ui"
path = "examples/ui/ui.rs"

[[example]]
name = "ui_pipelined"
path = "examples/ui/ui_pipelined.rs"

# Window
[[example]]
name = "clear_color"
path = "examples/window/clear_color.rs"

[[example]]
name = "clear_color_pipelined"
path = "examples/window/clear_color_pipelined.rs"

[[example]]
name = "multiple_windows"
path = "examples/window/multiple_windows.rs"
required-features = ["bevy_gltf"]

[[example]]
name = "scale_factor_override"
path = "examples/window/scale_factor_override.rs"
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/io/file_asset_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ impl AssetIo for FileAssetIo {
)))
}

fn watch_path_for_changes(&self, path: &Path) -> Result<(), AssetIoError> {
fn watch_path_for_changes(&self, _path: &Path) -> Result<(), AssetIoError> {
#[cfg(feature = "filesystem_watcher")]
{
let path = self.root_path.join(path);
let path = self.root_path.join(_path);
let mut watcher = self.filesystem_watcher.write();
if let Some(ref mut watcher) = *watcher {
watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ keywords = ["bevy"]

[dependencies]
# bevy
bevy_app = { path = "../../crates/bevy_app", version = "0.5.0" }
bevy_asset = { path = "../../crates/bevy_asset", version = "0.5.0" }
bevy_core = { path = "../../crates/bevy_core", version = "0.5.0" }
bevy_ecs = { path = "../../crates/bevy_ecs", version = "0.5.0" }
bevy_render2 = { path = "../bevy_render2", version = "0.5.0" }
bevy_app = { path = "../bevy_app", version = "0.5.0" }
bevy_asset = { path = "../bevy_asset", version = "0.5.0" }
bevy_core = { path = "../bevy_core", version = "0.5.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.5.0" }
bevy_render = { path = "../bevy_render", version = "0.5.0" }

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashSet;

use crate::ClearColor;
use bevy_ecs::prelude::*;
use bevy_render2::{
use bevy_render::{
camera::ExtractedCamera,
render_graph::{Node, NodeRunError, RenderGraphContext, SlotInfo},
render_resource::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy_ecs::world::World;
use bevy_render2::{
use bevy_render::{
render_graph::{Node, NodeRunError, RenderGraphContext},
renderer::RenderContext,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ mod main_pass_2d;
mod main_pass_3d;
mod main_pass_driver;

pub mod prelude {
#[doc(hidden)]
pub use crate::ClearColor;
}

pub use clear_pass::*;
pub use clear_pass_driver::*;
pub use main_pass_2d::*;
Expand All @@ -13,7 +18,7 @@ pub use main_pass_driver::*;
use bevy_app::{App, Plugin};
use bevy_core::FloatOrd;
use bevy_ecs::prelude::*;
use bevy_render2::{
use bevy_render::{
camera::{ActiveCameras, CameraPlugin},
color::Color,
render_graph::{EmptyNode, RenderGraph, SlotInfo, SlotType},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::Transparent2d;
use bevy_ecs::prelude::*;
use bevy_render2::{
use bevy_render::{
render_graph::{Node, NodeRunError, RenderGraphContext, SlotInfo, SlotType},
render_phase::{DrawFunctions, RenderPhase, TrackedRenderPass},
render_resource::{LoadOp, Operations, RenderPassColorAttachment, RenderPassDescriptor},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{AlphaMask3d, Opaque3d, Transparent3d};
use bevy_ecs::prelude::*;
use bevy_render2::{
use bevy_render::{
render_graph::{Node, NodeRunError, RenderGraphContext, SlotInfo, SlotType},
render_phase::{DrawFunctions, RenderPhase, TrackedRenderPass},
render_resource::{LoadOp, Operations, RenderPassDepthStencilAttachment, RenderPassDescriptor},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bevy_ecs::world::World;
use bevy_render2::{
use bevy_render::{
camera::{CameraPlugin, ExtractedCameraNames},
render_graph::{Node, NodeRunError, RenderGraphContext, SlotValue},
renderer::RenderContext,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/macros/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn parse_component_attr(ast: &DeriveInput) -> Result<Attrs> {
meta_item.path(),
format!(
"unknown component attribute `{}`",
meta_item.path().into_token_stream().to_string()
meta_item.path().into_token_stream()
),
));
}
Expand Down
Loading