Comments (11)
Thank you so much for the clarifications. I think, I know now that's happening:
- wgpu is prioritizing the GL backend adapter. I was using
cargo run --bin wgpu-info -- -v
to see additional information about it and indeed, the workgroups are reported as zero:
Max Compute Invocations Per Workgroup: 0
Compute Workgroup Size X: 0
Compute Workgroup Size Y: 0
Compute Workgroup Size Z: 0
- Hence, the adapter does not meet the limits and hence, the its initialization fails.
I was mistakenly thinking that the HD Graphics 3000 should support the limits nevertheless, because vulkaninfo
reported it. However, vulkaninfo
was never showing the details of the HD Graphics 3000, but only the details of the software rasterizer (which is not picked by wgpu).
The reason it's working for X11 is that for X11 wgpu only sees a single adapter, the software rasterizer, which supports the necessary limits.
So, as @Wumpf has suggested, I could either
- force the selection of the software rasterizer adapter
- or create custom limits that meet the capabilities of the HD Graphics 3000 (if possible)
TLDR: the entire thing is not a bug at all and I will close the issue.
Thank you again for your support and I'm sorry about the fuzz I've created.
from wgpu.
Hi, this error about compute shaders is normal, since GL3.3 is a 4.0 backport.
vulkaninfo
showed WorkGroupCount 65535 * 65535 * 65535 is the minimum value if CS is supported. It is possible that some layer is reporting an incorrect value.
Well at least this page here claims ogl 3.1, haven't looked deeper into it but that would be problematic. Mesa says 3.3 though, so still likely an actual capability issue there.
I agree. GL3.1 is the final driver for windows and mesa emulated GL3.3.
https://www.reddit.com/r/lowendgaming/comments/tpf5e2/intel_hd_graphics_3000_opengl_33/
from wgpu.
Likely it's not even picking the Vulkan adapter for some reason. Sound quite familiar, I guess we have ticket like that somewhere already.
Can you run again with RUST_LOG=trace
?
from wgpu.
output of cargo run --bin wgpu-info
might be helpful as well, this lists all the adapters as seen by wgpu
from wgpu.
Likely it's not even picking the Vulkan adapter for some reason. Sound quite familiar, I guess we have ticket like that somewhere already. Can you run again with
RUST_LOG=trace
?
Thank you for looking into this. Here is the trace log: trace.zip
output of cargo run --bin wgpu-info might be helpful as well, this lists all the adapters as seen by wgpu
The output is:
Adapter 0:
Backend: Vulkan
Name: llvmpipe (LLVM 17.0.6, 256 bits)
VendorID: 0x10005
DeviceID: 0x0
Type: Cpu
Driver: llvmpipe
DriverInfo: Mesa 24.1.4 - kisak-mesa PPA (LLVM 17.0.6)
WebGPU Compliant: true
Adapter 1:
Backend: Gl
Name: Mesa Intel(R) HD Graphics 3000 (SNB GT2)
VendorID: 0x8086
DeviceID: 0x0
Type: IntegratedGpu
Driver: <empty>
DriverInfo: 3.3 (Core Profile) Mesa 24.1.4 - kisak-mesa PPA
WebGPU Compliant: false
from wgpu.
Right, so this indeed only finds a software rasterizer for Vulkan and a GL backend (which it also picks when you run the example according to logs) which apparently doesn't have compute shader support (thus max_compute_workgroups_per_dimension == 0
)
I suspect you get a different list of adapters when you run WAYLAND_DISPLAY="" cargo run --bin wgpu-info
?
from wgpu.
oh, realizing now that HD Graphics 3000
is actually old enough to actually not have compute shader support.
Edit: Well at least this page here claims ogl 3.1, haven't looked deeper into it but that would be problematic. Mesa says 3.3 though, so still likely an actual capability issue there.
So for some reason you get the software rasterizer when you force X11..?
Sounds almost like the behavior is practically worse then.
from wgpu.
So for some reason you get the software rasterizer when you force X11..?
Sounds almost like the behavior is practically worse then.
Yes, indeed. On X11 only the software rasterizer is available:
WAYLAND_DISPLAY="" cargo run --bin wgpu-info
Finished dev [unoptimized + debuginfo] target(s) in 1.06s
Running `target/debug/wgpu-info`
[2024-07-25T14:45:56Z ERROR wgpu_hal::gles::egl] EGL 'eglCreateContext' code 0x3005: eglCreateContext
Adapter 0:
Backend: Vulkan
Name: llvmpipe (LLVM 17.0.6, 256 bits)
VendorID: 0x10005
DeviceID: 0x0
Type: Cpu
Driver: llvmpipe
DriverInfo: Mesa 24.1.4 - kisak-mesa PPA (LLVM 17.0.6)
WebGPU Compliant: true
You're also right: the HD Graphics 3000 is pretty old and at least on Reddit people say that it don't support Vulkan.
Is there any way to use OGL instead of Vulkan? OGL should be available, as glxinfo
reports:
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 3000 (SNB GT2)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 24.1.4 - kisak-mesa PPA
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
from wgpu.
Not being able to using opengl here is kind of specific to the example: It first picks an adapter preferring non-software rasterize if available, and then requesting a device. The device request then fails because there's no device with the required limits available. Those limits could be lowered on a case by case basis, so in your own application you might decide to be quite a bit more compatible. Also you can prefer whatever adapter you please, wgpu will just pick non-software raster over software raster and Vulkan over OpenGL.
The way I see it this means that all in all the issue here is that X11 doesn't crash for you 😬 . It just happens not to do so because for some reason it fails detecting the OpenGL adapter.
from wgpu.
That said, I don't know if this is an issue with your system configuration or wgpu
from wgpu.
However, I've no idea why the adapter is not picked up by wgpu in case X11 is forced.
Please feel free to re-open the issue, in case you want to investigate this.
from wgpu.
Related Issues (20)
- Report overflow when shl overflows into sign bit HOT 1
- mem leak HOT 5
- multi_draw_indirect_count set incorrect count buffer id. HOT 2
- WGSL: xyzw and rgba are not allowed to apear in same swizzle
- Refcount traffic due to lazy buffer initialization could be reduced
- Examples shouldn't use bytemuck to cast out of a get_mapped_range() BufferView HOT 4
- requires directive does not appear to be supported (specifically pointer_composite_access)
- `Instance::request_adapter` silently fails when browser doesn't support WebGPU and `wgpu` compiled without `webgl` feature.
- WebGPU backend: "Cannot perform %TypedArray%.prototype.set on a detached ArrayBuffer" if buffer is destroyed
- Support the `readonly_and_readwrite_storage_textures` WGSL language extension HOT 2
- [d3d12] Make sure WARP device creation works properly HOT 2
- [naga wgsl-out] `let`declarations are wrongly detected as const HOT 4
- [glsl-in] lost statement of multi part loop-expression
- WGL and EGL's context activation is unsound
- Unable to break out of the loop in SPIR-V
- Limits on maximum buffer size (MaxBufferSize or MaxStorageBufferBindingSize) is not being correctly applied HOT 5
- Texture usages TextureUsages(STORAGE_BINDING) are not allowed on a texture of type R8Uint HOT 1
- `Texture` from `ID3D12Resource/ID3D11Resource`? HOT 4
- `const_assert` doesn't evaluate conditions properly HOT 5
- Are `wgpu_hal::CommandEncoder::set_bind_group`'s guarantees too weak / too strong? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wgpu.