I found (presumably) a bug in commit be7407b75b12c70e1925c10117937ae2b9e6711f of mesa master. The function util_format_swizzle_4f() does not handle UTIL_FORMAT_SWIZZLE_W. The "<" should be replaced by "<=".