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 representation of a RWBuffer in llvm-ir uses a spirv.Image target extension type. That target extension type corresponds exactly with the OpTypeImage instruction. The instruction has a sampled type, but it must be a scalar type. The difference between RWBuffer with a scalar template and one with a vector template is the result type on the load and the type of the object being stored in a store. See https://godbolt.org/z/b99G474TE for an example with a vector template.
We need to fix the type scavenging for the calls to @lvm.spv.resource.getpointer. They currently set the type of the pointer to the scalar type. It would look at the use to determine the type.
The text was updated successfully, but these errors were encountered:
The type inference for `spv_resource_getpointer` must look at the uses
of the intrinsic. The type of the handle will be a scalar type, but it
can still be read or written as a vector of that type.
Fixesllvm#124551.
The type inference for `spv_resource_getpointer` must look at the uses
of the intrinsic. The type of the handle will be a scalar type, but it
can still be read or written as a vector of that type.
Fixesllvm/llvm-project#124551.
Icohedron
pushed a commit
to Icohedron/llvm-project
that referenced
this issue
Feb 11, 2025
The type inference for `spv_resource_getpointer` must look at the uses
of the intrinsic. The type of the handle will be a scalar type, but it
can still be read or written as a vector of that type.
Fixesllvm#124551.
The representation of a RWBuffer in llvm-ir uses a
spirv.Image
target extension type. That target extension type corresponds exactly with theOpTypeImage
instruction. The instruction has a sampled type, but it must be a scalar type. The difference betweenRWBuffer
with a scalar template and one with a vector template is the result type on the load and the type of the object being stored in a store. See https://godbolt.org/z/b99G474TE for an example with a vector template.We need to fix the type scavenging for the calls to
@lvm.spv.resource.getpointer
. They currently set the type of the pointer to the scalar type. It would look at the use to determine the type.The text was updated successfully, but these errors were encountered: