Try to simplify alpha replace for poor compilers.
Clear stencil on switch from 565 buffer.

Fixes #2094, shadows in Kingdom Hearts in some scenes.

Not a complete solution, but should be a relatively safe one.
Add an experiment with using a texture for tests.

Using an option for now so it's easy to test, if it works well we can
maybe remove the option.
Actually cache the last bound test texture.
Skip binding when the test won't be used.
Merge pull request #6852 from unknownbrackets/gpu-minor

Clear stencil/alpha when switching from 565, minor frag shader simplication
d3d: Reduce D3DX leaks.
d3d: Report shader compilation failures.
d3d: Release vertex decls on shutdown.
d3d: Release shaders and fbos on shutdown.
d3d: Release on shutdown in headless.

Could sync it up, just want to be able to run tests without major leaks.
Update native (reduce d3d9 leaks.)
Merge pull request #6854 from unknownbrackets/d3d9

Report shader errors in Direct3D 9, plug some leaks
Use a more logical name for the test tex creator.
Merge pull request #6853 from unknownbrackets/testcache

Cache fragment test results using a texture
Fix crash in GE debugger when game quit.

Fixes #6856.
Disable the PC/LR buttons outside a game.

They don't want and can cause hangs if clicked after a game is stopped.
Refactor fbo binding into DrawPixels().
Arg, fix color testing from frag test cache.
Track the last drawn width/height/format.

This way we can apply render-to-self effects more correctly.