b123ee707d
Previously when there was an & or | with two BitmaskEnums, the compiler would try to cast the RHS and find a matching overload, but there were many different casts (to the enum itself, to an integer, to a boolean, etc.) each with a matching overload which meant that it couldn't pick one and errored out due to an ambiguous overload. Fix this by explicitly providing an overload that takes a BitmaskEnum on the RHS. It has to also provide a BitmaskEnum output, so that subsequent operators with the result on the LHS (e.g. when or'ing together three BitmaskEnums without any parentheses tricks) also get the right overload. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>