spirv-execution-env icon indicating copy to clipboard operation
spirv-execution-env copied to clipboard

WebGPU MVP bans arrays of resources (allows Texture2DArray)

Open dneto0 opened this issue 6 years ago • 2 comments

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 avatar Jun 22 '19 00:06 dneto0

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 avatar Jul 25 '19 22:07 dneto0

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.

dneto0 avatar Jul 25 '19 22:07 dneto0