So far we don't know
1) whether you can make a machine have qualia
2) whether cognition corresponds to computation
I think these can be answered.
1) Currently, humans only have the capability of creating machines that manipulate the physical word - protons, neutrons, electrons, and such particles. The motion of these things on their own is meaningless, which is evidence to me that qualia must supersede the physical. If so, then a machine cannot be made that has qualia.
Adding to this, current machines aren't designed in any way to "have" qualia anyways: Computers are merely simulators. As a favorite quote of mine goes, "You can simulate water in a computer, but you can't make it wet."
2) I'm not sure what you mean by cognition, but I think you're referring to the ability to possess an "idea" - one by which you have the qualia "within the mind" rather than through some "external" senses/stimuli. Am I right?
In that case, I think it's quite evident that computation *alone* does not result in cognition. For current computers, what happens is merely the shuffling around of electrons. The locations (and motions) of these electrons are meaningless. (After all, we can abstract this machine by noting that the machine is designed to have specific paths of travel of electrons but that these paths are independent of actual hardware or tangible manifestation. Like making figure 8s with clouds in the sky, they could be made bigger, smaller, elongated, and morphed in ugly ways that ensures that any "special" arrangement that might otherwise result in cognizance doesn't happen even though the computation ability of the computer is retained. In other words, I can design a circuit board any way I want as long as the electrons go to the correct parts.)
In fact, we can go on to say that the entirety of the computer and all its operations are perfectly meaningless. They only possess meaning when something is projected onto their monitors and then examined by some external viewer. This is not because somehow meaning can only be obtained through an external viewer, but because the fundamental design of the machine (the computer) was only meant to be meaningful in its interaction with (that is, in its conveying of information to) human beings.
Like I said, computers are merely simulators. AI will never transcend the limitations of the machine in which it runs, so unless it is reproduced in a "better" machine, it won't be any better.
Now obviously, if someone believes that the physical world is all that exists, then these questions form a concerning dilemma. But, at least in my opinion, you have to really want that conclusion (that is, the conclusion that the world is only physical) to ignore the fact that the motion of electrons is completely meaningless on its own.
But Want is a powerful thing, no?
My implied stance here is that meaning means correlating one experience with another and ultimately back to some "experience" - a word I interpret as relating to qualia.