wined3d: Merge two if conditions in buffer.c.