Jump to content
  • Advertisement
mark_braga

3D [Metal] vertex_id value when using indirectBuffer

This topic is 482 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What is the value of the vertex_id attribute in a metal shader when using drawPrimitives with indirectBuffer?

I know it is relative to baseVertex when using normal draw but how does it work with indirect draw arguments?

It doesn't say anything in the spec so any info on this would really help.

Thank you.

Edited by mark_braga

Share this post


Link to post
Share on other sites
Advertisement

It is the same, it starts at zero.

 

At the metal level, if you look for ISA in PIX (if using DX12 and AMD), you would see that the shader receive the offset in a scalar register and the vid is just auto generated value, and it sums them prior to fetching the buffer values. Something nice on Consoles, we can so know both 0 based and absolute. On PC, we only have the later :(

 

 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!