stride icon indicating copy to clipboard operation
stride copied to clipboard

[Rendering] Adds support for DrawAuto and DrawIndirect to MeshDraw

Open tebjan opened this issue 3 years ago • 2 comments

PR Details

Adds a DrawAuto flag and ArgumentBufferBinding to MeshDraw.

Description

The new arguments will be read by the MeshRenderFeature to select the right draw call method.

Related Issue

Fixes #1481

Motivation and Context

Generate geometry on the GPU.

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] My change requires a change to the documentation.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

tebjan avatar Jul 26 '22 14:07 tebjan

Feels like it could be ignored by serialization as it's runtime only? Perhaps DrawIndirect instead of DrawAuto?

johang88 avatar Jul 27 '22 08:07 johang88

Feels like it could be ignored by serialization as it's runtime only?

You are right, it is a runtime technique. So then it needs the [DataMemberIgnore] attribute, is that correct?

Perhaps DrawIndirect instead of DrawAuto?

Yes, sorry didn't specify that correctly. The way I thought about it is that DrawAuto uses a vertex buffer from the stream out stage of another shader and with ArgumentBuffer I meant DrawIndirect, which takes the draw args like vertex count, instance count, and vertex buffer offsets as a buffer. I've corrected the title.

tebjan avatar Jul 27 '22 10:07 tebjan