Use mapped memory for uploading large textures.
When TexImage2D/TexImage3D is called with an image that is larger than
the ring buffer, we had previously fallen back to calling
TexSubImage2D/TexSubImage3D multiple times. This is suboptimal because
we always issue a clear along with TexSubImage calls for security
reasons (the image is not being completely replaced so we do not want
to leak old texture data).
This CL now makes it so it falls back to using mapped memory instead. If
we run out of memory, then we fall back to TexSubImage2D as we did
before.
R=jbauman@chromium.org, piman@chromium.org
BUG=462078
Review URL: https://codereview.chromium.org/
1168853002
Cr-Commit-Position: refs/heads/master@{#333851}