bevyengine / bevyengine/bevy

Images can't be showed

Open
#10,916 4 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## Bevy version
0.12.1 with `dynamic linking`

## Relevant system information
Windows 10
Rust 1.76.0 nightly

- [`wgpu`](https://github.com/gfx-rs/wgpu) for rendering problems
```ignore
PS C:\Users\22375\Documents\Projects\cloned\wgpu> cargo run --bin wgpu-examples storage_texture
Finished dev [unoptimized + debuginfo] target(s) in 0.70s
Running `target\debug\wgpu-examples.exe storage_texture`
[2023-12-09T03:35:39.963446000Z WARN wgpu_hal::vulkan::instance] InstanceFlags::VALIDATION requested, but unable to find layer: VK_LAYER_KHRONOS_validation
[2023-12-09T03:35:40.015586800Z INFO wgpu_hal::vulkan::instance] Debug utils not enabled: debug_utils_user_data not passed to Instance::from_raw
[2023-12-09T03:35:40.071041700Z WARN wgpu_hal::vulkan::adapter] Disabling robustBufferAccess2 and robustImageAccess2: IntegratedGpu Intel Driver is outdated. Found with version 0x1925C0, less than the known good version 0x194843 (31.0.101.2115)
[2023-12-09T03:35:40.130428500Z INFO wgpu_core::instance] Adapter Vulkan AdapterInfo { name: "Intel(R) HD Graphics 530", vendor: 32902, device: 6418, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }
[2023-12-09T03:35:40.174634600Z INFO wgpu_examples::storage_texture] Wgpu context set up.
[2023-12-09T03:35:40.189785200Z INFO wgpu_examples::storage_texture] Output buffer mapped
[2023-12-09T03:35:40.190489800Z INFO wgpu_examples::storage_texture] GPU data copied to local.
[2023-12-09T03:35:40.219708600Z INFO wgpu_examples::utils] PNG file encoded in memory.
[2023-12-09T03:35:40.221087500Z INFO wgpu_examples::utils] PNG file written to disc as "storage_texture".
[2023-12-09T03:35:40.221744700Z INFO wgpu_examples::storage_texture] Done.
```

## What you did
just run code below

also I tried to run some examples , but they didn't go correctly either .

```rust
use bevy::prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, (show_ball, spawn_camera))
.run();
}

fn show_ball(mut command: Commands, asset_server: Res) {
let texture = asset_server.load("star.png");
command.spawn(SpriteBundle {
transform: Transform::from_xyz(50., 50., 50.),
texture,
visibility: Visibility::Visible,
..Default::default()
});
}

fn spawn_camera(mut command: Commands) {
command.spawn(Camera2dBundle {
transform: Transform::from_xyz(50., 50., 50.),
..Default::default()
});
}
```

Cargo.toml
```toml
[package]
name = "bevy_try"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bevy = { version = "0.12.1", features = ["dynamic_linking"] }

[profile.dev]
opt-level = 1
debug = 0

```

Output
```ignore
PS C:\Users\22375\Documents\Projects\rust_test\bevy_try> cargo run
Blocking waiting for file lock on package cache
Compiling bevy_try v0.1.0 (C:\Users\22375\Documents\Projects\rust_test\bevy_try)
Finished dev [optimized] target(s) in 10.02s
Running `target\debug\bevy_try.exe`
2023-12-09T02:49:05.047112Z INFO bevy_winit::system: Creating new window "App" (0v0)
) HD Graphics 530", vendor: 32902, device: 6418, device_type: IntegratedGpu, driver: "Intel Corporation", driver
2023-12-09T02:49:05.562732Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) HD Graphics 530", vendor: 32902, device: 6418, device_type: IntegratedGpu, driver:
"Intel Corporation", driver_info: "Intel driver", backend: Vulkan }
2023-12-09T02:53:53.420923Z INFO bevy_window::system: No windows are open, exiting
2023-12-09T02:53:53.422132Z INFO bevy_winit::system: Closing window 0v0
```

## What went wrong

The window shows nothing.

![image](https://github.com/bevyengine/bevy/assets/88434542/0650a072-a3ae-4c47-9134-c073c6c9570e)

## Also
Things also happened in the official examples

Output
```
PS C:\Users\22375\Documents\Projects\cloned\bevy> cargo run --example 2d_gizmos
Finished dev [unoptimized + debuginfo] target(s) in 3.24s
Running `target\debug\examples\2d_gizmos.exe`
2023-12-09T03:48:08.859617Z INFO bevy_winit::system: Creating new window "App" (0v0)
2023-12-09T03:48:09.302625Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) HD Graphics 530", vendor: 32902, device: 6418, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }
2023-12-09T03:48:11.411021Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 10 Pro", kernel: "19045", cpu: "Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz", core_count: "4", memory: "7.9 GiB" }
2023-12-09T03:50:05.839863Z WARN log: NewEvents emitted without explicit RedrawEventsCleared
2023-12-09T03:50:05.845005Z WARN log: RedrawEventsCleared emitted without explicit MainEventsCleared
2023-12-09T03:50:05.859587Z INFO bevy_window::system: No windows are open, exiting
2023-12-09T03:50:05.866204Z INFO bevy_winit::system: Closing window 0v0
```

![image](https://github.com/bevyengine/bevy/assets/88434542/560d077a-085b-4e94-8373-73be91da0804)

## Further More

I cloned this simple game and compiled it
[Battle City](https://github.com/NightsWatchGames/battle-city)

The ui works well , and the whole window turn to be black after I started the game , but I can hear the voice of the game .

![Battle City Problem](https://github.com/bevyengine/bevy/assets/88434542/cc78620a-e469-42e0-8dd3-ef1d2e79a776)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the minimal Rust program with Bevy 0.12.1 and dynamic linking on the reported Windows 10 system, then compare it with the official `2d_gizmos` example and the linked Battle City project. Check whether the blank window affects only the reported Intel Vulkan setup or all rendering; done means identifying a reproducible cause and confirming a rendering fix or documenting the environment limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.