On Tue May 10 19:22:16 2022 +0000, Matteo Bruni wrote:
This kind of behavior is very suspicious. FWIW the same test was already reduced by 1c7323b1926dbab4c81fd4b22b04d330459c3748. It seems like that PreloadGlyphs() call causes some kind of memory corruption issue in native or something like that. Can you try to figure out if that's the case and e.g. whether changing the parameters make the issue go away? Depending on the results we might want to put the test inside an if (0){}, with a small comment explaining the details.
I agree that it is very suspicious. For me (0, 1000), (0, 3), (7, 10) and (997, 1000) actually work on my Windows 10 VM, but (0, 4), (0, 10), (6, 10) and (996, 1000) fail. So it seems like at least using only 4 glyphs works. The test with (0, 1000) got patched before, so that must be broken on some testbot VMs as well. I initially added the (0, 1000) in the d3dx9 side to test whether it could load more glyphs than there are glyphs that fit on the first texture. Using (0, 5) already doesn't serve that purpose anymore, so we may as well make it (0, 3) or any other 4 glyphs.
The reason could be that there is a bug in the Morton encoding in d3dx10_34, but of course that's all speculation. Note that it seems to have gotten fixed in d3dx10_35 and works in any version thereafter. So disabling the test seems like a waste.