-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
area: graphicsGraphics related issueGraphics related issueenhancementRequest for a new featureRequest for a new feature
Description
Some observations of the current texture API:
setSource
only works with 'browser interface' objects (not arrays of data) and the function correctly tracks which mipmap levels are dirty using_levelsUpdated
.getSource
will return browser interface objects and also arrays of data which it strictly probably shouldn't (since it is matched withsetSource
).lock
andunlock
work with arrays data and the entire texture is always re-uploaded if any mipmap level is locked, whether for read or write.
Ideally we'd have an API that:
- has a single way of updating both types of texture data
- tracks which face/mipmap levels have been updated and only upload those to GPU
- makes it simple to get, set and dirtify individual faces/levels
Also, the current API assumes textures have CPU-side data which is uploaded to GPU. However we often have GPU-side texture data which we want to copy back to CPU.
@mvaligursky are there any additional restrictions or requirements imposed by webgpu on texture handling?
Metadata
Metadata
Assignees
Labels
area: graphicsGraphics related issueGraphics related issueenhancementRequest for a new featureRequest for a new feature