Textures With Indirect Command Buffer

I render with func drawIndexedPrimitives( type primitiveType: MTLPrimitiveType, indexType: MTLIndexType, indexBuffer: MTLBuffer, indexBufferOffset: Int, indirectBuffer: MTLBuffer, indirectBufferOffset: Int ), when I use Argument Buffer to set textures(e.g. to fragnent shader), everything is fine. But is there a way to set textures without Argument Buffer? Argument Buffer is the only way?

Replies

Yes, setting textures through argument buffers is the only way to pass textures into indirectly encoded render commands, on CPU or on GPU. There are only variations of set*Buffer or set_*_buffer on both render and compute indirect commands, which means that there's no way to pass a texture directly.