Giter Club home page Giter Club logo

Comments (2)

mnmaita avatar mnmaita commented on September 27, 2024

I just tested this with wgpu v0.20 on a Windows laptop and I had the same exact issue FWIW. Here's my current device info:

device_type: IntegratedGpu
driver: "AMD proprietary driver"
driver_info: "23.11.1 (AMD proprietary shader compiler)"
backend: Vulkan

I'll test later in a different machine (with an NVIDIA card) but what I figured out is that if you do the following:

impl Plugin for GameSetupPlugin {
    fn build(&self, app: &mut App) {
        app.add_plugins(DefaultPlugins.set(WindowPlugin {
                primary_window: Some(Window {
                    name: Some(String::from("cooktory")),
                    title: String::from("Cooktory"),
                    resolution: WindowResolution::new(600.0, 400.0),
                    present_mode: PresentMode::AutoVsync,
                    prevent_default_event_handling: false,
                    // Both Fullscreen and SizedFullscreen crash at startup:
                    mode: WindowMode::Fullscreen,
                    ..Default::default()
                }),
                ..Default::default()
            }));
    }
}

The app still crashes... Notice there was no need to toggle anything for the app to panic.

Seems like configure_surface() in bevy_render's src/renderer/render_device.rs is failing and, as far as I could see, this function panics if:

  • An old SurfaceTexture is still alive referencing an old surface.
  • Texture format requested is unsupported on the surface.
  • config.width or config.height is zero.

Assuming there's no way a wrong texture format is chosen, and that the Window does have a size, can we narrow this down to the first bullet point?

from bevy.

Elabajaba avatar Elabajaba commented on September 27, 2024

The issue here is that newer AMD drivers (and newer Nvidia drivers, idk about Intel) are giving us a dxgi flip mode swapchain on Windows, which doesn't support exclusive fullscreen.

Use borderless (there's no additional latency with dxgi flip mode swapchains in borderless fullscreen compared to the old exclusive fullscreen, and they have less latency than the legacy swapchain in windowed mode).

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.