Fixes Sim City 3000 Building Architect.
-- v5: ddraw/tests: Add tests for multiple devices. ddraw: Support multiple devices per ddraw object. ddraw: Sync wined3d render target in d3d_device_sync_rendertarget(). ddraw: Store wined3d state in d3d_device. wined3d: Factor out wined3d_texture_set_lod() function. ddraw: Don't apply state in ddraw_surface_blt(). ddraw: Store matrix handle in the global table. ddraw: Store surface handles in the global table. ddraw: Store material handles in the global table.