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

Base instance semantics on GLES backend #1573

Closed
kvark opened this issue Jun 30, 2021 · 1 comment
Closed

Base instance semantics on GLES backend #1573

kvark opened this issue Jun 30, 2021 · 1 comment
Labels
api: gles Issues with GLES or WebGL help required We need community help to make this happen. type: bug Something isn't working

Comments

@kvark
Copy link
Member

kvark commented Jun 30, 2021

Is your feature request related to a problem? Please describe.
GLES3 doesn't support the base instance natively. We work around it by re-binding the instance-rate vertex buffers and applying the offset. But this doesn't affect gl_InstanceIndex, which also needs to be adjusted.

Describe the solution you'd like
We'd need Naga to detect the use of "instance_index" semantics and emit a uniform uint _base_instance" uniform. Then for any access of "instance_index" we'd append this value of "_base_instance.
hal/gles needs to detect this and provide the value for this uniform whenever a draw call requires it.

Describe alternatives you've considered
Adding a downlevel flag for the base instance and not bothering to fix it.

Additional context
Follows #1510

@kvark kvark added help required We need community help to make this happen. type: enhancement New feature or request type: bug Something isn't working and removed type: enhancement New feature or request labels Jun 30, 2021
@teoxoy teoxoy added the api: gles Issues with GLES or WebGL label Dec 5, 2022
@cwfitzgerald
Copy link
Member

Superseded by #4276

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: gles Issues with GLES or WebGL help required We need community help to make this happen. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants