Stefan Dösinger : wined3d: Read flags of the right resource type in check_device_format.