ERR_DERIV_INVALID_PREDICATE

Code: 4022 (4022)

As HRESULT:As NTSTATUS:

Documented in Win32

HLSL errors and warnings (comperrors.h): 4022

Derivative isn't defined in a different branch of flow-control so consider moving the derivative assignment before any flow control statements.