Coder Social home page Coder Social logo

Comments (13)

Astamor avatar Astamor commented on June 23, 2024 1

Yes after running Bevy app and seeing all those errors I updated all my drivers.

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

These are graphic driver problems. Have you updated your graphics driver recently?

from bevy.

Astamor avatar Astamor commented on June 23, 2024

Also when trying to launch an app in fullscreen mode with this code:

.add_plugins(DefaultPlugins
        .set(ImagePlugin::default_nearest())
        .set(WindowPlugin {
            primary_window: Some(Window {
                mode: bevy::window::WindowMode::Fullscreen,
                present_mode: bevy::window::PresentMode::AutoVsync,
                title: "ProcGame".into(),
                resolution: WindowResolution::new(WINDOW_WIDTH, WINDOW_HEIGHT).with_scale_factor_override(1.0),
                resizable: true,
                ..default()
            }),
            ..default()
        })
        .build(),
    )

The app crashes and here is console output:

thread 'Compute Task Pool (3)' panicked at C:\Users\Astamor.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.19.3\src\backend\wgpu_core.rs:724:18:
Error in Surface::configure: Validation Error

Caused by:
Parent device is lost

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Encountered a panic in system bevy_render::view::window::create_surfaces!
thread 'Compute Task Pool (3)' panicked at C:\Users\Astamor.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.13.2\src\pipelined_rendering.rs:49:67:
called Result::unwrap() on an Err value: RecvError
error: process didn't exit successfully: target\debug\bevy-project.exe (exit code: 101)

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

Can you test the examples upstream for winit and wgpu? I suspect that the bugs are ultimately arising there.

from bevy.

Astamor avatar Astamor commented on June 23, 2024

Any specific examples ?

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

hello_triangle for wgpu and window for winit should work. Simplest that can test that things are fundamentally working IMO.

from bevy.

Astamor avatar Astamor commented on June 23, 2024

hello_triangle console output:

[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
loader_get_json: Failed to open JSON file C:\Fps monitor\FPS Monitor\tools\fpsmonvk64.json
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x18503665130, name: ?)
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
loader_add_layer_properties: Multiple 'layer' nodes are deprecated starting in file version "1.0.1". Please use 'layers' : [] array instead in C:\ProgramData\GOG.com\Galaxy\redists\overlay\injected\galaxy_overlay_vklayer_x64.json.
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x18503665130, name: ?)
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
loader_get_json: Failed to open JSON file C:\Program Files (x86)\Overwolf\0.218.0.8\ow-vulkan-overlay64.json
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x18503665130, name: ?)
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
loader_get_json: Failed to open JSON file C:\Program Files (x86)\Overwolf\0.218.0.8\ow-graphics-vulkan64.json
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x18503665130, name: ?)
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)]
loader_get_json: Failed to open JSON file C:\Program Files\Rockstar Games\Social Club\SocialClubVulkanLayer.json
[2024-05-19T13:06:27Z ERROR wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x18503665130, name: ?)
[2024-05-19T13:06:27Z ERROR wgpu_hal::auxil::dxgi::exception] ID3D12CommandQueue::ExecuteCommandLists: Using ClearRenderTargetView on Command List (0x00000185113AD3C0:'Unnamed ID3D12GraphicsCommandList Object'): Resource state (0xB9354680: D3D12_RESOURCE_STATE_[COMMON|PRESENT]) of resource (0x00000185113A1EE0:'Unnamed ID3D12Resource Object') (subresource: 0) is invalid for use as a render target. Expected State Bits (all): 0xB9354660: D3D12_RESOURCE_STATE_RENDER_TARGET, Actual State: 0xB9354640: D3D12_RESOURCE_STATE_[COMMON|PRESENT], Missing State: 0x4: D3D12_RESOURCE_STATE_RENDER_TARGET. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
[2024-05-19T13:06:27Z ERROR wgpu_hal::auxil::dxgi::exception] ID3D12CommandQueue::ExecuteCommandLists: Using IDXGISwapChain::Present on Command List (0x00000185113394F0:'Internal DXGI CommandList'): Resource state (0xB9354210: D3D12_RESOURCE_STATE_RENDER_TARGET) of resource (0x00000185113A1EE0:'Unnamed ID3D12Resource Object') (subresource: 0) is invalid for use as a PRESENT_SOURCE. Expected State Bits (all): 0xB93541F0: D3D12_RESOURCE_STATE_[COMMON|PRESENT], Actual State: 0xB93541D0: D3D12_RESOURCE_STATE_RENDER_TARGET, Missing State: 0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT]. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]

Running window example from winit doesn't produce any errors

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

Okay, looks like a wgpu bug then :) Can you please open an issue there and link this one?

from bevy.

valaphee avatar valaphee commented on June 23, 2024

gfx-rs/wgpu#4247 Actually pretty easy fixable, it's because when initializing wgpu, it registers and VEH and it keeps the DX12 instance open, even though its not used.

Theoretically, either removing the dx12 feature, or setting WGPU_BACKEND=vulkan gets rid of this error

from bevy.

Astamor avatar Astamor commented on June 23, 2024

Well setting backend to vulkan does remove the erros from the console but it seems this bug goes deeper because as I said fullscreen mode doesn't work and crashes the app. Also not sure if it's related to that bug but performance is terrible. For example, I've tested really simple tilemap using 2 textures. I've created procedurally map that's 128x128 which is around 16000 sprites and bevy choked. Fps dropped to like 35. Meanwhile libgdx which is java framework rendered map of size 256x256 which is 65000+ sprites and maintained stable 144 fps and that's only because that's my monitor refresh rate. |

EDIT: Performance issue solved, it was becaause of that crate called world inspector egui. It was massively slowing down entire app for some reason.

from bevy.

GitGhillie avatar GitGhillie commented on June 23, 2024

Were you using a release build (e.g. cargo run --release) when you were checking performance? And make sure to follow this when building a debug build: https://bevyengine.org/learn/quick-start/getting-started/setup/#compile-with-performance-optimizations. With those it should be no problem to use that crate.

from bevy.

Astamor avatar Astamor commented on June 23, 2024

I've checked both debug and release, I've went through all bevy docs including the link you provided. After removing that crate bevy handles maps 1000x1000 tiles with 100fps even in debug mode. Also I've noticed Bevy is using some kind of 2d "culling" by default. The only error remaining is fullscreen mode crashing the app

from bevy.

alice-i-cecile avatar alice-i-cecile commented on June 23, 2024

The only error remaining is fullscreen mode crashing the app

Can you open up a new issue for this with details on the OS and hardware used? This is a nice clear problem that would be good to track :) The rest of this is largely resolved: I'm going to close this out now.

from bevy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.