On Wed Mar 20 21:36:19 2024 +0000, Paul Gofman wrote:
I have almost finished the update which implements that properly with deduplicating states per d3d device, hoping to finalize a bit of more tests and send that soon. Some bit of ad-hoc testing (on Win10) shows that state per different d3d devices is independent (which, well, was easy to expect). WRT Sim City 3000 Building Architect, it just doesn't destroy one device before creating another and never uses first device later, almost anything which will let another device be created and function will let it work.
I ran the tests on my WinXP machine (r200 GPU) and they pass as-is.
I experimented a bit, and it seems that although background handles are per-device, they do work cross-device. Your tests already try to get a handle from device1 and set it as background on a viewport created from device2. I tried to clear the viewport and checked the color in the surface, and it properly picks up the material's color. I also tried with a separate material that never received a handle from device2.