Apply clamp and wrap to tex projection as well.

Not sure if this is the correct method or not, since it doesn't really
work properly right now.
Merge pull request #6251 from unknownbrackets/framebuf-clamp

Apply clamp and wrap to tex projection as well
Allocate textures names in blocks.

May improve performance slightly when loading or recycling textures.
Probably uploading the texture is bigger anyway.
Allocate vertexcache buffer names in chunks.

Partially implements #6045.
Reuse buffer objects when possible.

glBufferData() recreates anyway.
Don't allow the buf name cache to get too full.
Fix clamping to the correct texel.

This fixes things when edges bleed in from a larger framebuffer.  We need
to clamp to the internal texels of the range.
When projecting textures, flip V in frag shader.

Slower, but this way we actually project correctly.
Ensure stride in bytes matches FBO up/download.

Even if we should do the copy, we'll currntly use the wrong x/y/w/h.
This fixes incorrect uploads in God of War, which hurt performance a lot.

Unfortunately, in this game there's zero information to tell us the right
size of some small temp framebuffers it uses, so we overestimate their
sizes and the block transfer appears to fall into range.
Enable "simulate block transfer" by default.
Support Grand Knight History's line-by-line xfer.

This is a bit hacky, but what it's doing at least makes sense enough to
heuristically detect.  Still trying to avoid misdetecting God of War.
Merge pull request #6252 from unknownbrackets/gpu-minor

Allocate tex and buffer names in chunks
Let's see if there are any remaining fog INF/NAN issues out there
Merge pull request #6255 from unknownbrackets/gpu-blocktransfer

Enable "simulate block transfer" by default
Merge pull request #6254 from unknownbrackets/framebuf-clamp

Correct framebuf clamping, tex projection from framebuf
Add some sanity checks when looking up syscalls.

This may avoid crashing the emu when it starts executing junk (still not good of course, heh).