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
We've established a convention of defining values for extended enums in a non-continuous fashion. For example we've got UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000here and UR_DEVICE_INFO_BINDLESS_IMAGE_SUPPORT_EXP=0x2000here. This does make sense as long as we need to manually designate these as it more or less eliminates the possibility of collisions, but this system has introduced an issue with how we validate enums. Currently the validation is set up to assume any value <= the last enumerator is valid, which works as long as the enumerators are continuous, but at the time of writing the last device info enum is 0x2020 - and the majority of values between 0x0 and 0x2020 are not valid device info enums. A mask doesn't work for this as not all of our enums are bitfields, we might need to look into generating some kind of validation helper function for each non-bitfield enum.
The text was updated successfully, but these errors were encountered:
We've established a convention of defining values for extended enums in a non-continuous fashion. For example we've got
UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP = 0x1000
here andUR_DEVICE_INFO_BINDLESS_IMAGE_SUPPORT_EXP=0x2000
here. This does make sense as long as we need to manually designate these as it more or less eliminates the possibility of collisions, but this system has introduced an issue with how we validate enums. Currently the validation is set up to assume any value <= the last enumerator is valid, which works as long as the enumerators are continuous, but at the time of writing the last device info enum is 0x2020 - and the majority of values between 0x0 and 0x2020 are not valid device info enums. A mask doesn't work for this as not all of our enums are bitfields, we might need to look into generating some kind of validation helper function for each non-bitfield enum.The text was updated successfully, but these errors were encountered: