Vertical artifacts are almost always limited to the display itself, not graphics cards or any other component. That the display passed a test with another computer suggests the problem was transient in nature.
Vertical artifacts are almost always display issues, because the pictures they display are a stack of display rows, exactly the same length, each drawn below the last. As long as the display RAM, rasterizer/display generator and cable are all working properly, that will enable the display of vertical lines. The moment anything screws up, the rows will no longer be the same length, and Vertical lines will no longer be vertical.
it is only inside the display itself where everything drawn into Mac memory comes back around to be displayed as a vertical line.
________
The litmus test for whether the display is in error (and therefore the graphics processor made this mess) is to grab a screenshot. A screenshot is made by copying what is in display RAM. If the screenshot has no artifacts, but the display has artifacts, the problem is in the display.