Added a way to specify the PrimitiveType when encoding commands in the RenderPass. This partially fixes the issue #142732