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

Handling cube textures in GLES backend #1614

Open
Tracked by #3674
kvark opened this issue Jul 8, 2021 · 1 comment
Open
Tracked by #3674

Handling cube textures in GLES backend #1614

kvark opened this issue Jul 8, 2021 · 1 comment
Labels
api: gles Issues with GLES or WebGL type: enhancement New feature or request

Comments

@kvark
Copy link
Member

kvark commented Jul 8, 2021

One of the restrictions listed in #1574 is that we have to choose the cube map target at texture creation, not at view creation.
Using any kind of heuristic for it is quite unfortunate...

I believe there is a robust way to implement it, but it comes at a cost. If we detect at texture creation that it could be a cube, we can create another texture for the cube, internally. Then whenever we see a subresource transition onto SAMPLED, we can perform a copy from the 2D array texture into the Cube one. The cost here is 2x VRAM, plus copy operations.

@teoxoy
Copy link
Member

teoxoy commented Dec 11, 2024

An update on this front: we should probably add support for textureBindingViewDimension in TextureDescriptor.

This is in the current proposal for compat: https://github.com/gpuweb/gpuweb/blob/main/proposals/compatibility-mode.md

I did start to work on it a while back but didn't finish it: https://github.com/teoxoy/wgpu/tree/texture_binding_view_dimension

@teoxoy teoxoy removed the type: question Further information is requested label Dec 11, 2024
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 type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants