Henri Verbeet : wined3d: Make sure we have an active GL context before calling d3dfmt_p8_upload_palette ().