bevyengine / bevyengine/bevy

Surface is not taken into account in wgpu adapter selection

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

Description

## Bevy version

master branch

```ignore
`SystemInfo { os: "Windows 11 Pro", kernel: "22631", cpu: "Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz", core_count: "6", memory: "15.9 GiB" }`
```

```ignore
`AdapterInfo { name: "NVIDIA GeForce GTX 1650", vendor: 4318, device: 8066, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "566.03", backend: Vulkan }`
```

## What you did

added
```rs
dbg!(&primary_window)
```
in bevy_render wgpu context initialization code

## What went wrong

it seems to always be None for me.
It should be some surface, for wgpu to make sure that the surface is compatible with the selected wgpu adapter (physical device)

## Additional information

it could be that the primary window is not initialized yet somehow?
Maybe system ordering problem as the same system would give a valid surface if ran at Startup

Contributor guide

Open the contributing guide

Research direction

Start in the bevy_render wgpu context initialization code and trace how primary_window and its surface are available during initialization. Compare the initialization path with Startup ordering, then reproduce the adapter selection on the reported Windows setup. Done means the relevant surface is available at selection time and adapter compatibility is verified.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.