(D3D) Refactor MinFilter/MagFilter code