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] - Make ktx2 and zstd default features #7696

Closed
wants to merge 3 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
Jump to file
Failed to load files.
Loading
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 @@ -190,14 +190,14 @@ jobs:
- name: Build bevy
# this uses the same command as when running the example to ensure build is reused
run: |
TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome,ktx2,zstd"
TRACE_CHROME=trace-alien_cake_addict.json CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,trace,trace_chrome"
- name: Run examples
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo -n $example_name > last_example_run
echo "running $example_name - "`date`
time TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome,ktx2,zstd"
time TRACE_CHROME=trace-$example_name.json CI_TESTING_CONFIG=$example xvfb-run cargo run --example $example_name --features "bevy_ci_testing,trace,trace_chrome"
sleep 10
done
zip traces.zip trace*.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validation-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ jobs:
shell: bash
# this uses the same command as when running the example to ensure build is reused
run: |
WGPU_BACKEND=dx12 CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing,ktx2,zstd"
WGPU_BACKEND=dx12 CI_TESTING_CONFIG=.github/example-run/alien_cake_addict.ron cargo build --example alien_cake_addict --features "bevy_ci_testing"
- name: Run examples
shell: bash
run: |
for example in .github/example-run/*.ron; do
example_name=`basename $example .ron`
echo "running $example_name - "`date`
time WGPU_BACKEND=dx12 CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing,ktx2,zstd"
time WGPU_BACKEND=dx12 CI_TESTING_CONFIG=$example cargo run --example $example_name --features "bevy_ci_testing"
sleep 10
done
Expand Down
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ repository = "https://github.com/bevyengine/bevy"
rust-version = "1.67.0"

[workspace]
exclude = ["benches", "crates/bevy_ecs_compile_fail_tests", "crates/bevy_reflect_compile_fail_tests"]
exclude = [
"benches",
"crates/bevy_ecs_compile_fail_tests",
"crates/bevy_reflect_compile_fail_tests",
]
members = [
"crates/*",
"examples/mobile",
Expand All @@ -40,10 +44,12 @@ default = [
"bevy_ui",
"png",
"hdr",
"ktx2",
"zstd",
"vorbis",
"x11",
"filesystem_watcher",
"android_shared_stdcxx"
"android_shared_stdcxx",
]

# Force dynamic linking, which improves iterative compile times
Expand Down Expand Up @@ -426,7 +432,6 @@ wasm = true
[[example]]
name = "pbr"
path = "examples/3d/pbr.rs"
required-features = ["ktx2", "zstd"]

[package.metadata.example.pbr]
name = "Physically Based Rendering"
Expand Down Expand Up @@ -467,7 +472,6 @@ wasm = true
[[example]]
name = "skybox"
path = "examples/3d/skybox.rs"
required-features = ["ktx2", "zstd"]

[package.metadata.example.skybox]
name = "Skybox"
Expand Down
12 changes: 0 additions & 12 deletions crates/bevy_render/src/texture/image_texture_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,3 @@ impl std::fmt::Display for FileTextureError {
)
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_supported_file_extensions() {
for ext in FILE_EXTENSIONS {
assert!(image::ImageFormat::from_extension(ext).is_some());
}
}
}
6 changes: 0 additions & 6 deletions examples/3d/load_gltf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,11 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
.looking_at(Vec3::new(0.0, 0.3, 0.0), Vec3::Y),
..default()
},
#[cfg(all(feature = "ktx2", feature = "zstd"))]
EnvironmentMapLight {
diffuse_map: asset_server.load("environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2"),
specular_map: asset_server.load("environment_maps/pisa_specular_rgb9e5_zstd.ktx2"),
},
));
#[cfg(not(all(feature = "ktx2", feature = "zstd")))]
{
warn!("feature ktx2 or zstd wasn't enabled.");
warn!("rerun this example with `--features=\"ktx2 zstd\" to get environment maps for ambient light");
}

commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight {
Expand Down
6 changes: 0 additions & 6 deletions examples/tools/scene_viewer/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ fn setup_scene_after_load(
},
..default()
},
#[cfg(all(feature = "ktx2", feature = "zstd"))]
EnvironmentMapLight {
diffuse_map: asset_server
.load("assets/environment_maps/pisa_diffuse_rgb9e5_zstd.ktx2"),
Expand All @@ -137,11 +136,6 @@ fn setup_scene_after_load(
},
camera_controller,
));
#[cfg(not(all(feature = "ktx2", feature = "zstd")))]
{
warn!("feature ktx2 or zstd wasn't enabled.");
warn!("rerun this example with `--features=\"ktx2 zstd\" to get environment maps for ambient light");
}

// Spawn a default light if the scene does not have one
if !scene_handle.has_light {
Expand Down