bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.4k stars 3.59k forks source link

Compile error in bevy_core_pipeline/smaa when running gltf tests #16352

Closed greeble-dev closed 1 week ago

greeble-dev commented 2 weeks ago

Bevy version

Main branch 40640fd

What you did

git checkout 40640fdf42be1cf13eb651bd6816d742c369241a
cargo test --lib --package=bevy_gltf

What went wrong

error[E0425]: cannot find function `lut_placeholder` in this scope
   --> crates\bevy_core_pipeline\src\smaa\mod.rs:332:56
    |
332 |             .insert(SMAA_AREA_LUT_TEXTURE_HANDLE.id(), lut_placeholder());
    |                                                        ^^^^^^^^^^^^^^^ not found in this scope
    |
help: consider importing this function
    |
33  + use crate::tonemapping::lut_placeholder;
    |

Additional information

The error does not occur when running the CI tests (cargo run -p ci -- test).

I think the bug is a combination of:

  1. The smaa_luts feature is disabled when running that isolated test.
  2. The changes in 40640fd accidentally removed some code related to smaa_luts. Direct link to removed code.

Restoring the following code in smaa/mod.rs fixes the compile error, but I haven't visually confirmed if smaa still works.

#[cfg(not(feature = "smaa_luts"))]
use crate::tonemapping::lut_placeholder;

Commit in my fork: (https://github.com/greeble-dev/bevy/commit/21d09d08bc76b082f4376eb1c7c44d9e79a77ef0). I can submit a PR if desired.

BenjaminBrienen commented 2 weeks ago

Already addressed in https://github.com/bevyengine/bevy/pull/16337

You can help by reviewing the PR