gl_DrawID equivalent for Directx12 ExecuteIndirect HLSL

52 Views Asked by At

In OpenGL multidraw shaders we use gl_DrawID in the glsl shaders and access a array in a Shader Storage Buffer Object (SSBO). In DirectX12 with the advent of ExecuteIndirect I was wondering if there is a similar system variable defined for HLSL?

I know we can change the RootConstant for each draw as part of the indirect buffer structure, but if I wanted the same UAV Buffer or Structured Buffer bound in the root constant for each draw would it would be nice to use an equivalent gl_DrawID or is it just not available and I am forced to change root constants per draw?

0

There are 0 best solutions below