Open msiglreith opened 5 years ago
Steps for completion:
(@msiglreith can you check my logic on this? I'm not sure if I'm right or not, not super familiar with d3d12 ;p)
@termhn Thanks! Command Signature is unrelated to this (Step 3). It defines the layout of the gpu commands in the buffers for indirect command execution. To extend on Step 2, see the comment here: https://github.com/gfx-rs/gfx/issues/2604#issuecomment-460385700
These two issues are basically the same, one for graphics pipelines and one for compute pipeline. We have 4 root constants spare IIRC, which will be shared for both pipeline types (basically like an union). In this case we need to allocate 2 u32 bit constants for these two builtins and patch spirv accordingly.
Nonzero base vertex or instance values are reflected properly when translating to HLSL. Recently a new feature has been added to spirv-cross to support this: https://github.com/KhronosGroup/SPIRV-Cross/pull/816
We need to a new root constant into graphics pipeline layouts for storing these two values and push them on draw calls. The
drawIndirectFirstInstance
can't be supported it seems.VkPI
Further investigation needed if we need to restrict it also to base vertex due to the
VertexIndex
semantic?