bevyengine / bevyengine/bevy

wgpu seems to ignore the wgpu::Limits config from RenderPlugin

Open
#13,690 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
13.2

## Relevant system information
Windows 11

```
AdapterInfo { name: "NVIDIA GeForce RTX 3080 Ti Laptop GPU", vendor: 4318, device: 9248, device_type: DiscreteGpu, driver: "", driver_info: "", backend: Dx12 }
```

## What you did
Configure RenderPlugin :
```
render_creation: bevy::render::settings::RenderCreation::Automatic(
WgpuSettings {
backends: Some( Backends::DX12),
limits: wgpu::Limits {
max_compute_invocations_per_workgroup: 65535,
max_compute_workgroup_size_x: 65535,
max_compute_workgroup_size_y: 65535,
max_compute_workgroup_size_z: 65535,
..Default::default()
}
```

ran spirv that contains normal amount of invocations
```
[numthreads(32, 32, 1)]
void GenerateTerrainUtilityTextures(uint3 id : SV_DispatchThreadID){ .... }
```

## What went wrong
What I expected: the invocation limit to dissapere.
What happened: It remained

wgpu error: Validation Error
```

Caused by:
In Device::create_compute_pipeline
note: label = `Terrain Util pipeline`
Error matching shader requirements against the pipeline
Shader entry point's workgroup size [32, 32, 1] (1024 total invocations) must be less or equal to the per-dimension limit [1024, 1024, 64] and the total invocation limit 768

```

Contributor guide

Open the contributing guide

Research direction

Start by tracing how RenderPlugin's WgpuSettings limits are passed into wgpu, then reproduce the reported compute-pipeline validation error using the shown DX12 configuration and workgroup size. Compare the configured limits with the limits observed during create_compute_pipeline validation. Done means the issue is fixed and covered by a regression test, or the supported behavior and limitation are clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.