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

Images can't be showed #10916

Open
Dangerise opened this issue Dec 9, 2023 · 4 comments
Open

Images can't be showed #10916

Dangerise opened this issue Dec 9, 2023 · 4 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Comments

@Dangerise
Copy link

Bevy version

0.12.1 with dynamic linking

Relevant system information

Windows 10
Rust 1.76.0 nightly

  • wgpu for rendering problems
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 .

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<AssetServer>) {
    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

[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

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

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

Further More

I cloned this simple game and compiled it
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

@Dangerise Dangerise added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 9, 2023
@ickshonpe ickshonpe added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Dec 9, 2023
@OwlyCode
Copy link

OwlyCode commented Dec 14, 2023

I've the same issue when upgrading from 0.12.0 to 0.12.1. Looks like a system ordering issue because it works intermittently with some runs and not others.

Here are two cargo run with no code change, showing UI is made with bevy_egui:

image
image

@OwlyCode
Copy link

I gave another try at this and the dynamic linking option has nothing to do with the issue.

@Dangerise
Copy link
Author

Yes, even the official examples can't be correctly run
Maybe it caused by the os, I changed to linux and it's sloved

@TheoDulka
Copy link

TheoDulka commented Feb 14, 2024

Yes, even the official examples can't be correctly run

@Dangerised Did you try running the examples on bevy main? You seem to be experiencing #8037, because the wgpu log is noting you have an outdated Intel driver that suffers from this issue.

Edit: Now you can just try updating to 0.13 to see if it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

No branches or pull requests

4 participants