(D3D) Refactor D3D driver