Repository navigation
Tags
Tags
ddraw/tests: Skip test_map_synchronisation() when the draw time can't… … be estimated. test_map_synchronisation() sizes its vertex buffer from the difference between the time of a draw of 4096 triangles and that of a draw of one triangle, each followed by a readback. On Apple GPUs both draws are fast and the readbacks dominate (about 2.5 ms and 1 ms), so a delay in the second one makes the difference negative. tri_count then wraps to about four billion, the vertex buffer size wraps to about 3.9 GB, allocating its memory fails, and the test's write of the quads through the pointer it got from the lock faults near address 0. The access violation ends the process with status 5 (0xc0000005) and loses the buffered output after "Max user clip planes", which made it look like a silent exit; it happened in 2 to 4 percent of ddraw:ddraw7 runs on wined3d's OpenGL backend. Skip the test when the difference is not positive, or when it is so small that the estimate exceeds 0x555555 triangles. wined3d reports that number as MaxPrimitiveCount, above which the d3d8 and d3d9 versions of the test already skip.