r600: compare structure elements instead of doing a memcmp