Isn't set_immediates failing to validate the values_offset it gets from RenderBundleEncoder::finish?
- Those commands arrive in wgpu_core when they're passed to
Global::render_bundle_encoder_finish.
- Then
RenderBundleEncoder::finish passes them to set_immediates, which places values_offset in an ArcRenderCommand::SetImmediate.
- That will be consumed by
RenderBundle::execute here.
- Then this addition may overflow.
Granted, in the end it's just a panic, because the subslicing operation will catch it, but wgpu_core should give an error.
Originally posted by @jimblandy in #9205 (review)