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

Wgpu 23 (GLES) no longer works on devices with max_color_attachments == 4. #6986

Open
adrian17 opened this issue Jan 24, 2025 · 2 comments
Open
Labels
area: api Issues related to API surface type: bug Something isn't working

Comments

@adrian17
Copy link

adrian17 commented Jan 24, 2025

Description
On v22 and before, wgpu initialized on devices with max_color_attachments == 4. This includes some Android and Windows devices, and possibly some browsers with WebGL2. On v23 and above, it fails with Limit 'max_color_attachments' value 8 is better than allowed 4.

Repro steps
If you don't happen to have such a device, you can use JS to easily pretend, just enter this snippet in devtools console before the wgpu application with webgl backend initializes:

var temp = WebGL2RenderingContext.prototype.getParameter; WebGL2RenderingContext.prototype.getParameter = function(n){    if (n == 0x8CDF) { return 4; } return temp.call(this, n);  }

Expected vs observed behavior
Making it possible to support these devices again. AFAIK, dropping support for them was not documented in changelog.

If it turns out that the limit was always supposed to be 8 and allowing these devices to use wgpu was an accident, then we'd still appreciate some optional way to drop it back to 4 - since we don't even need 4 for our use cases AFAIK.

@adrian17
Copy link
Author

For the record: we use wgpu::Limits::downlevel_webgl2_defaults. They are documented as

These default limits are guaranteed to be compatible with GLES-3.0, and D3D11, and WebGL2

But the GLES3 minimum for MAX_COLOR_ATTACHMENTS is 4.

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Jan 24, 2025

Sounds like the downlevel limits need to be reduced to 4 - can you submit a PR? This limit was previously not enforced

@cwfitzgerald cwfitzgerald added type: bug Something isn't working area: api Issues related to API surface labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface type: bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants