You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While its wonderful to finally have a method in DX12 to access the current ExecuteIndirect "counter", doing this via a "hardwired" root-constant in the RootSig feels strange and frankly out of step with how other equivalent counters are visible in shaders. Relying on root-signature "trickery" to expose this value to the shader seems:
simultaneously inconsistent with how everything else works;
prone to error as there is little preventing a user from attempting to manually write a value to the RootSig slot that would then be overwritten by the system (at least as I understand it)
not automatically obvious what the value of this root constant will be if the shader is not invoked from inside an EI
expects that a user must acknowledge at shader authoring time exactly how the shader will be invoked/dispatched, which may not always be the case, and thus again prone to user error.
root-signature setup is often heavily abstracted in many engines making this often very hard for users to work with
lack of discoverability of this portion of the API by users, as it doesn't function consistently with everything else.
What would seem more aligned with the rest of the API design would be a SV_ system semantic similar to SV_PrimitiveID, SV_VertexID, SV_InstanceID, and so forth. Presumably this could have a name like SV_ExecutionID, be mapped to a uint and default to zero if not called from inside an EI. Ideally it should be accessible in any shader stage as well. Its important to be able to trivially discover which element in a list is being processed out of an EI workset, and doing it in a way consistent with the rest of the API would certainly be preferred.
The text was updated successfully, but these errors were encountered:
While its wonderful to finally have a method in DX12 to access the current ExecuteIndirect "counter", doing this via a "hardwired" root-constant in the RootSig feels strange and frankly out of step with how other equivalent counters are visible in shaders. Relying on root-signature "trickery" to expose this value to the shader seems:
What would seem more aligned with the rest of the API design would be a SV_ system semantic similar to SV_PrimitiveID, SV_VertexID, SV_InstanceID, and so forth. Presumably this could have a name like SV_ExecutionID, be mapped to a uint and default to zero if not called from inside an EI. Ideally it should be accessible in any shader stage as well. Its important to be able to trivially discover which element in a list is being processed out of an EI workset, and doing it in a way consistent with the rest of the API would certainly be preferred.
The text was updated successfully, but these errors were encountered: