wined3d: Add a separate function for palette initialization.