-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2013-08-19 13:53, schrieb Henri Verbeet: > On 19 August 2013 13:38, Stefan Dösinger <ste...@codeweavers.com> > wrote: >> I guess in theory any kind of payload could be added to your >> implementation, but growing this larger than >> RESOURCE_ALIGNMENT(=16) bytes moots the point I guess. > The point is mostly that I don't think we want the > wined3d_heap_memory structure to need a separate allocation. I > suppose you could also just embed it inside the wined3d_resource > structure. Storing the pointer inside the wined3d_resource structure won't work for the command stream, but I'll ignore those considerations until I send actual CS patches and know for sure that my cache is an actual improvement.
>> properly aligned. Your code and mine differ when HeapAlloc >> happens to return an aligned pointer. >> > That's actually a bug in what I posted. What's your suggested fix? Allocating size + align + alignment, and adding alignment to mem if mem happens to be already aligned? -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSEg2mAAoJEN0/YqbEcdMwOEoP/iWfAY48+3DnewhUbKbuN2L/ 1hy4E/4/66lQYn/Zjh0OppmyyKYbVmphUGMFOsoVEgMr2pXuoorkoixaSR/gA2k2 8UBKHxKahRUIIfHrUUiHopD4WqN7D0RNFppPF7kc3o/lrFUgTGSbTCSbu4+1v/1S 0Bku9tQ+0pG4zv5aHivtXNUcZeEmK+8NjXwk9HOL4ro6Eg8by1QpSW/ZdsnsPWci aH8HhfShQN6jmGfe04r2L/dP/EILhsNgJ8bRzrxi48M+IHX8jUdX10bwlGYy9BRi 89YvxFXb/jyHk2NdpYfHjntDLy1wWs/tMI5F9ns/p95L6VVSnKQUROMFz4iyRrT8 vJRmeiXeIFTyMLs+XfXioDzZTh6+iMtnmuCk/xTH4pzTeMWJTosJs2vcWQVf5aka SF5fFxg3HuT3VNFqql5s5oTKXJ1MiB3sDkPHgo6s68AS/TpCFicCUca+WPHfriQO FrW7kr/wUe9Krzh4bQQQt8SB5rJJWVYYXNPV9A+BOAZzSAbGMMXIi2QVTb9FHDu5 znspnnZbHUs4fyehJpzCQEwR1WcAkaEVT9t9owNefxvwrZhbGq4GTd8YwNtr61UL xkixy8z4cA0ul1lW/QGpBMswtYYBKa1m43HzLcZ+1sqtftLkgApDbOxW5BCMdDLO 56TMnG+BJCGaRgQVzoov =nHsF -----END PGP SIGNATURE-----