Giter Site home page Giter Site logo

Comments (11)

rkschamer avatar rkschamer commented on September 10, 2024 2

Thank you so much for the clarifications. I think, I know now that's happening:

  1. 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
  1. 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.

tasogare3710 avatar tasogare3710 commented on September 10, 2024 1

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://community.intel.com/t5/Graphics/how-can-you-have-opengl-3-3-on-intel-hd-graphics-3000-on-windows/td-p/653357

https://www.reddit.com/r/lowendgaming/comments/tpf5e2/intel_hd_graphics_3000_opengl_33/

from wgpu.

Wumpf avatar Wumpf commented on September 10, 2024

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.

Wumpf avatar Wumpf commented on September 10, 2024

output of cargo run --bin wgpu-info might be helpful as well, this lists all the adapters as seen by wgpu

from wgpu.

rkschamer avatar rkschamer commented on September 10, 2024

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.

Wumpf avatar Wumpf commented on September 10, 2024

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.

Wumpf avatar Wumpf commented on September 10, 2024

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.

rkschamer avatar rkschamer commented on September 10, 2024

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.

Wumpf avatar Wumpf commented on September 10, 2024

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.

Wumpf avatar Wumpf commented on September 10, 2024

That said, I don't know if this is an issue with your system configuration or wgpu

from wgpu.

rkschamer avatar rkschamer commented on September 10, 2024

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)

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.