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

Not detecting gpu #3645

Closed
molor824 opened this issue Jan 12, 2022 · 3 comments
Closed

Not detecting gpu #3645

molor824 opened this issue Jan 12, 2022 · 3 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior O-Windows Specific to the Windows desktop operating system

Comments

@molor824
Copy link

Bevy version

Bevy 0.6.0

Operating system & version

Windows 10

What you did

Compile a code that uses quad mesh in release

What you expected to happen

Run smoothly

What actually happened

Fps very unstable, input delayed and in the log, it was using 'Microsoft basic driver' and not the gpu

Additional information

Tried changing WGPU_BACKEND to every different backends (gl, vulkan, dx11) and only dx12 works but still using cpu to render

@molor824 molor824 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jan 12, 2022
@mockersf mockersf added A-Rendering Drawing game state to the screen O-Windows Specific to the Windows desktop operating system and removed S-Needs-Triage This issue needs to be labelled labels Jan 12, 2022
@Roboadam
Copy link

I have a similar issue. I'm on Windows 11 with an Nvidia GPU. DX11 and Vulkan backends don't run, DX12 backend runs for a while but FPS is unstable and it eventually crashes.

DX11:

thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!', C:\Users\adam\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_render-0.6.0\src\renderer\mod.rs:74:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\bevy_stuff.exe` (exit code: 101)

Vulkan:

2022-01-16T15:51:13.418449Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        setupLoaderTrampPhysDevs:  Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
2022-01-16T15:51:13.419624Z ERROR wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x2755fe22f00, name: ?)    
2022-01-16T15:51:13.422883Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)]
        setupLoaderTrampPhysDevs:  Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
2022-01-16T15:51:13.424018Z ERROR wgpu_hal::vulkan::instance:   objects: (type: INSTANCE, hndl: 0x2755fe22f00, name: ?)
thread 'main' panicked at 'Unable to find a GPU! Make sure you have installed required drivers!', C:\Users\adam\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_render-0.6.0\src\renderer\mod.rs:74:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\bevy_stuff.exe` (exit code: 101)

DX12 backend runs for a while and eventually crashes with:

2022-01-16T15:52:35.685962Z  INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 2060 with Max-Q Design", vendor: 4318, device: 7954, device_type: DiscreteGpu, backend: Dx12 }
2022-01-16T15:52:43.222141Z ERROR present_frames: wgpu_hal::dx12::instance: ID3D12CommandQueue::Present: Resource state (0x800: D3D12_RESOURCE_STATE_COPY_SOURCE) (promoted from COMMON state) of resource (0x00000266274EDFD0:'Unnamed ID3D12Resource Object') (subresource: 0) must be in COMMON state when transitioning to use in a different Command List type, because resource state on previous Command List type : D3D12_COMMAND_LIST_TYPE_COPY, is actually incompatible and different from that on the next Command List type : D3D12_COMMAND_LIST_TYPE_DIRECT. [ RESOURCE_MANIPULATION ERROR #990: RESOURCE_BARRIER_MISMATCHING_COMMAND_LIST_TYPE]
error: process didn't exit successfully: `target\debug\bevy_stuff.exe` (exit code: 1)

@PitiBouchon
Copy link

PitiBouchon commented Mar 12, 2022

I had the same issue on my laptop. I have 2 GPU (one from my cpu and my main gpu)

Normally if you disable one of your graphics card (in Windows : Device manager > Display adapders > Disable device) it should work.

However it worked when I tried to use the Vulkan backend like this : (using bevy 0.6)

use bevy::prelude::*;
use bevy::render::options::{Backends, WgpuOptions};

fn main() {
    App::new()
        .insert_resource(WgpuOptions {
            backends: Some(Backends::VULKAN),
            ..Default::default()
        })
        .add_plugins(DefaultPlugins)
        .run();
}

@mockersf
Copy link
Member

closing to centralise in #3191

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 O-Windows Specific to the Windows desktop operating system
Projects
None yet
Development

No branches or pull requests

4 participants