d3d8, d3d9: Don't rely on the wined3d buffer type.