This problem's a bit of a pain and likely to be a pain to solve, not least of all because it's wrapped up to do with some dodgy hardware. However, said dodgy hardware had been working mostly fine for 7 months until today, so I hope to at least be able to return to a semblance of working order. I haven't replaced the hardware yet because I'm not sure whether it's the motherboard or graphics card which is responsible and haven't had a chance to swap anything out.
So anyway, the context: today while gaming, I got flickering squares all over the screen and the game stopped. This is the symptom of the dodgy hardware (obviously dodgy because the problem can be reproduced/temporarily fixed by wiggling the graphics card in its slot) What was different today was that after giving the PC a nudge, it went to BSOD with a page fault in atikmdag.sys. I attempted to reboot, but instead of a login screen I get a black screen. However, moving the mouse causes the cursor to appear - for about three seconds, whereupon it disappears again. Moving it continuously yields a cursor most of the time, which every three seconds blinks back to the centre of the screen with a "busy" spinning animation, before shortly turning to a normal pointer.
There are no system restore points, startup repair just fails with a generic error message, resetting windows from the recovery environment got to about 34% before failing with another generic error message, and booting into any kind of safe mode except a bare command prompt yields the same problem as booting normally - a black screen with a mouse cursor disappearing after 3 seconds. A look at the boot log suggests this is because the system's trying to load dxgkrnl.sys repeatedly, and failing - as it appears with "DRIVER_NOT_LOADED" several times at the end of the boot log.
Since the graphics card is very suspect, I disabled it in the BIOS and switched my monitor to the onboard GPU. This is how I get the titular SESSION_HAS_VALID_VIEWS_ON_EXIT BSOD, which is apparently also often caused by a rogue video driver. However, I don't know what's going on: the graphics card is disabled, the AMD driver should just not run. The onboard GPU is not suspect at all. Everything works via either the onboard or separate graphics until the log-in screen or until booting into safe mode.
I've tried running sfc from the command prompt, but it always says there's a system repair pending. I don't know what's going on with that, I suppose it could also be why the other repair operations failed.
Now, since there's a question of hardware damage you might all be tempted to treat this is a lost cause, but I'm hoping someone has a better idea since a) I'm short on cash and b) it was working at least acceptably until today. By that I mean it was perfectly happy running furmark and prime95, or running taxing games at full settings, except occasionally squares would go everywhere and the graphics driver would crash. Therefore I wonder if this latest fit has involved a software issue, too - perhaps the driver went and corrupted itself while everything was going haywire - but I can't be sure. Nonetheless I clearly have fairly restricted options (basically only stuff which can be run from the command prompt from the recovery environment).