The argument-buffer and the bindless examples currently pass an empty RenderPassDescriptor to CommandBuffer::new_render_command_encoder, which causes the function to return NULL (instead of an actual render command encoder object).
This in turn means that all the code following it basically does nothing (as it sends messages to a NULL value, which Objective-C just ignores).
To very clearly see how this is unsound and confusing, try putting the following statement after new_render_command_encoder:
Found while working on https://github.com/gfx-rs/metal-rs/pull/241.
The
argument-buffer
and thebindless
examples currently pass an emptyRenderPassDescriptor
toCommandBuffer::new_render_command_encoder
, which causes the function to return NULL (instead of an actual render command encoder object).This in turn means that all the code following it basically does nothing (as it sends messages to a NULL value, which Objective-C just ignores).
To very clearly see how this is unsound and confusing, try putting the following statement after
new_render_command_encoder
: