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
{{ message }}
Repository navigation
[SPIR-V] Get on an immediate return value of a function of type vk::BufferPointer misgenerates code #7302
For some reason there's an extra OpLoad of the struct type being emitted on the pointer before the access chain that resolves the .Get().a which is then done an a SSA return value and not the thing loaded
fatal error: generated SPIR-V is invalid: The Base <id> '20[%20]' in OpAccessChain instruction must be a pointer.
%21 = OpAccessChain %_ptr_Function_int %20 %int_0
The load is gabage anyway because .Get() isn't supposed to result in a load to Function storage space, and member access is just supposed to form access chains which are still in the PhysicalStorageBuffer space.
If I save the return value of the bitcast function, it fixes the problem.
Activity
[spirv] Handles rvalue as implicit object argument of vk::BufferPoint…
[spirv] Handles rvalue as implicit object argument of vk::BufferPoint…