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

Improve workaround for wgpu's gles texture type inference #395

Closed
teoxoy opened this issue Feb 28, 2023 · 4 comments · Fixed by #557
Closed

Improve workaround for wgpu's gles texture type inference #395

teoxoy opened this issue Feb 28, 2023 · 4 comments · Fixed by #557
Labels
bug Something isn't working

Comments

@teoxoy
Copy link

teoxoy commented Feb 28, 2023

// Fixes weird cubemap bug.
let count = if *count == 6 { count + 1 } else { *count };

The current workaround is incomplete, count should not be 1 or divisible by 6.

See gfx-rs/wgpu#3124 (comment) for more context.

@StarArawn
Copy link
Owner

// Fixes weird cubemap bug.
let count = if *count == 6 { count + 1 } else { *count };

The current workaround is incomplete, count should not be 1 or divisible by 6.

See gfx-rs/wgpu#3124 (comment) for more context.

I'm not sure why count shouldn't be 1 or divisible by 6? It also looks like wgpu hasn't implemented a fix yet.

@rparrett
Copy link
Collaborator

I have been meaning to test this more with opengl on the desktop, but I think that on webgl2 our users aren't really affected by this because they need to use the atlas feature to avoid another bug anyway.

I attempted this earlier, but I think there are some other criteria that had me scratching my head at the time:
https://github.com/gfx-rs/wgpu/blob/9dc834a0ac694d576a584a89f72733a0bb2f4485/wgpu-hal/src/lib.rs#L884

@teoxoy
Copy link
Author

teoxoy commented Mar 27, 2023

I'm not sure why count shouldn't be 1 or divisible by 6?

Since we might use GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP or GL_TEXTURE_CUBE_MAP_ARRAY based on this heuristic instead of the intended GL_TEXTURE_2D_ARRAY.

@rparrett
Copy link
Collaborator

rparrett commented Aug 21, 2023

I think that the other bug I alluded to gfx-rs/wgpu#3197 has been fixed. It doesn't seem totally necessary to use the atlas feature now, so we should probably take a look at this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants