[Sketch for discussion] Separate 3d-texture depth from 2d-array-texture layer#520
[Sketch for discussion] Separate 3d-texture depth from 2d-array-texture layer#520kainino0x wants to merge 1 commit intogpuweb:masterfrom
Conversation
Disentangles these two concepts. Also theoretically makes 3d array textures expressible.
|
As mentioned in #519 the concepts of layer and depth slices become very blurry with higher feature levels because texture views allows seeing a 3D texture as a 2Darray view or vice-versa. So I don't think we should disentangled the concept, since they become a single concept in the future. |
|
Should we do the opposite of this change - try to merge "arrayLayerCount" and "depth" in other places? (e.g. texture descriptor) |
|
This was discussed in the 2020-01-06 meeting |
|
As discussed, we can't completely merge the 2d-array with 3d textures, because it matters for the tiling modes (which are not exposed in the API). Separating them also makes sense for the view creation, given the ability to have arrays of cube or 3D textures. The only place where separation doesn't do good is transfer operations, but merging them only for the transfers would be inconsistent with the rest of the API... so it sounds like actually accepting this PR is most reasonable? |
|
@kvark why does 2d-array vs. 3d matter because of tiling modes? The declared dimensionality in the IIRC all APIs allow reinterpreting between 2D array and 3D and have the same overloaded semantic for Z in places. I think it is a pretty clear direction in API design and something we should take into account in WebGPU. |
|
The inverse of this change would be:
and this seems like a pretty good idea to me. |
|
@Kangz yeah, I think the concern about tiling is not valid, as long as we still specify the 2D/3D in the texture descriptor. |
|
IIUC: 2D array texture: View can be 3D texture: View can only be |
|
Closing in favor of doing the opposite change: consistently merge the two concepts. |
Now node.tsconfig.json only excludes files that use or transitively use import.meta.url. This is not available until more recent versions of Node.js.
Tries to disentangle these two concepts.
Also theoretically makes 3d array textures expressible.
Preview | Diff