diff --git a/src/webgpu/shader/execution/expression/expression.ts b/src/webgpu/shader/execution/expression/expression.ts index 1b9815117f89..29bb8d93674e 100644 --- a/src/webgpu/shader/execution/expression/expression.ts +++ b/src/webgpu/shader/execution/expression/expression.ts @@ -867,7 +867,7 @@ ${body} // Runtime eval ////////////////////////////////////////////////////////////////////////// let operation = ''; - if (inputSource === 'storage_rw') { + if (inputSource === 'storage_rw' && objectEquals(resultType, storageType(resultType))) { operation = ` outputs[i].value = ${storageType(resultType)}(inputs[i].lhs); outputs[i].value ${op} ${rhsType}(inputs[i].rhs);`;