On Thu Apr 6 06:54:41 2023 +0000, Rémi Bernon wrote:
The application depends on a different but related behavior, which
Wine does not test: Whether a context can share to a context that is not *sharing* yet, but has been made *current*. I think that's "Test 2" isn't it? If you mean the source context, then it's "Test 4", although yeah it also tests with a context which has already shared lists (though its peer has been destroyed since then, so maybe that has some importance). Imho you should probably clean these tests up, testing only one aspect at a time (and then the combined aspects), and add more tests if they don't cover this use case. Then, see if the fix implementation still fits, or adjust it. If some tests pass only under some specific driver, we can decide which behavior to chose, but at the same time it also has to mean that the application doesn't run on this hardware.
You're right, "Test 2" covers sharing to a context that has been made current. I overlooked it because that test still fails even with my fix because it's sharing from a context that is already sharing.
Based on your feedback, I think we need to test all 16 combinations of the 4 relevant booleans: source current, source sharing, destination current, and destination sharing. The tests will show that if we want to keep Wine's implementation simple, we will have to implement the AMD behavior in cases where AMD differs from Nvidia. And unless we find an application that depends on Nvidia's behavior, simplicity wins, right?