Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

WebGPU MVP bans arrays of resources (allows Texture2DArray) #32

Open
dneto0 opened this issue Jun 22, 2019 · 2 comments
Open

WebGPU MVP bans arrays of resources (allows Texture2DArray) #32

dneto0 opened this issue Jun 22, 2019 · 2 comments

Comments

@dneto0
Copy link
Contributor

dneto0 commented Jun 22, 2019

From F2F 2019-05-16.
Minutes doc

Decision: No arrays of resources in MVP. Texture2DArray is allowed (it’s not an array in the shader language.) Reconsider resource count limit is increased much larger than 32.

@dneto0
Copy link
Contributor Author

dneto0 commented Jul 25, 2019

At the moment the WHLSL spec permits certain arrayed texture resource.
See https://github.com/gpuweb/WHLSL/blob/master/Spec/source/index.rst

Copying from there:

Texture1D<T>
RWTexture1D<T>
Texture1DArray<T>
RWTexture1DArray<T>
Texture2D<T>
RWTexture2D<T>
Texture2DArray<T>
RWTexture2DArray<T>
Texture3D<T>
RWTexture3D<T>
TextureCube<T>
TextureDepth2D<float>
RWTextureDepth2D<float>
TextureDepth2DArray<float>
RWTextureDepth2DArray<float>
TextureDepthCube<float>

and a TODO for Texture2DMS<T>, TextureDepth2DMS<float>

@dneto0
Copy link
Contributor Author

dneto0 commented Jul 25, 2019

In particular, that leaves out CubeArray. For index clamping CubeArray has an odd corner case where in Vulkan/SPIR-V the layer count and face index is folded together into the last component of the coordinate of the OpImageTexelPointer call. So even if we have a max layer of N we have to make sure 6*N does not overflow the integer.
Fortunately we can ignore that case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant