fixed a bug with new d3d routine

Signed-off-by: duketwo <duketwoqq@gmail.com>