You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pointee of a vk::BufferPointer is considered to be a buffer and will be laid out as the user directs all buffers to be laid out
The problem is that I am not sure why type of buffer this is referring to. I assume it refers to structured buffers, but it could be a constant buffer, which are laid out differently. See the SPIR-V documentation for how different types are laid out.
The layout for the vk::RawBuffer* have been an issue for people, and we should avoid the same mistakes with vk::BufferPointer. The layout needs to be well documented, and tested.
The text was updated successfully, but these errors were encountered:
Any device that has the non-uvec2 variant (uint64_t) of Buffer Device Address, is extremely likely to have Scalar Layout as a feature as well.
P.S. SSBOs can be laid out as UBOs as well (and scalar laid out too), so there's at least 3 different possible layouts that can be applied there.
P.P.S. -fkv-use-scalar-layout makes all HLSL StructuredBuffers have a scalar layout, I'd just dodge the bullet and require RawBufferPointers to always be scalar instead of having a headache of supporting two layouts in the codegen for that.
Which document does this relate to?
https://github.com/microsoft/hlsl-specs/blob/9c42e278961dbf5b77d7d18b1e7ba7f6c0856154/proposals/0010-vk-buffer-ref.md
Describe the issue you see with the spec
In the Buffer Pointer Pointee Buffer Layout section, it says:
The problem is that I am not sure why type of buffer this is referring to. I assume it refers to structured buffers, but it could be a constant buffer, which are laid out differently. See the SPIR-V documentation for how different types are laid out.
Note that the types have to follow the standard storage buffer layout rules.
It is also worth considering the conversations in microsoft/DirectXShaderCompiler#4924.
Additional context
The layout for the
vk::RawBuffer*
have been an issue for people, and we should avoid the same mistakes withvk::BufferPointer
. The layout needs to be well documented, and tested.The text was updated successfully, but these errors were encountered: