Introduce a new type, HandleVec<T, U>, which is basically a Vec<U>, except that it's indexed by values of type Handle<T>. This gives us a more strictly typed way to build tables of data parallel to some other Arena.
Change naga::back::pipeline_constants to use HandleVec instead of Vec. This removes many calls to Handle::index, and makes the types more informative.
In naga::back::spv, change Writer and BlockContext to use HandleVec instead of Vec for various handle-indexed tables.
Introduce a new type,
HandleVec<T, U>
, which is basically aVec<U>
, except that it's indexed by values of typeHandle<T>
. This gives us a more strictly typed way to build tables of data parallel to some otherArena
.Change
naga::back::pipeline_constants
to useHandleVec
instead ofVec
. This removes many calls toHandle::index
, and makes the types more informative.In
naga::back::spv
, changeWriter
andBlockContext
to useHandleVec
instead ofVec
for various handle-indexed tables.