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
error: error:0:0 - OpStore Pointer <id> '15[%15]' storage class is read-only
OpStore %15 %float_0
|
= note: spirv-val failed
This happens because we're passing the InputOpVariable pointer as the pointer for xs.
Crucially, those are the semantics of an Operand::Move call arguments in MIR, transferring ownership from the caller to the callee. That's not correct, the caller doesn't own the global OpVariable, and should make a local copy (in a Function-scoped OpVariable), before passing a pointer to that in the call.
For MIR calls, this is where that's implemented, and we pretty much have to do the same dance (note that OperandValue::Ref(_).store(dest) does a memcpy).
The text was updated successfully, but these errors were encountered:
errors with:
This happens because we're passing the
Input
OpVariable
pointer as the pointer forxs
.Crucially, those are the semantics of an
Operand::Move
call arguments in MIR, transferring ownership from the caller to the callee. That's not correct, the caller doesn't own the globalOpVariable
, and should make a local copy (in aFunction
-scopedOpVariable
), before passing a pointer to that in the call.For MIR calls, this is where that's implemented, and we pretty much have to do the same dance (note that
OperandValue::Ref(_).store(dest)
does amemcpy
).The text was updated successfully, but these errors were encountered: