D3D speedups

This PR picks 4 commits of galop1n's D3D branch which are simple d3d backend changes.
galop1n, I agree with you :)
The thing is, the other people are just arguing over the placement of the "&" character in relation to the type specifier.