Optimize dynamic buffers.

In D3D11, we would previously always use a staging buffer to proxy
data to the GPU. This change allows users which specify DYNAMIC_DRAW
to skip the staging buffer as long as they only write to index or
vertex buffers.

This improves performance on all tested GPU vendors, but in D3D11
on AMD and Intel our SubData calls are still significantly slower
than in D3D9.

BUG=angle:705
BUG=365078

Change-Id: I4f83164176d67ff00119bdd0a6a80d7c84fd0f03
Reviewed-on: https://chromium-review.googlesource.com/213813
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
7 files changed