D3D9: Add a pitch test for a 1x1 texture
stefan at codeweavers.com
Tue Sep 26 12:22:41 CDT 2006
Am Dienstag 26 September 2006 18:03 schrieb H. Verbeet:
> On 26/09/06, Stefan Dösinger <stefan at codeweavers.com> wrote:
> > I think we should switch to NP2 repacking by default(and fix it if it is
> > broken), with that we can offer the correct pitch without the NPOT
> > extension too.
> Hmm. Personally I consider repacking a hack for broken games. I'm not
> sure if those exact sizes are in any way guaranteed by d3d either...
> to me it would appear as something that might be different between
> drivers. At least for the test case I think we should just check the
It is really easy to do, and I think just repacking is less a hack than
offering 2 methods. To get proper performance with repacking we can just
count how often a surface is locked and stop releasing the copy in local
memory if the app locks it too often, simmilar to converted surfaces.
Related to the driver dependence: That is why I am testing system memory
surfaces. I don't think they depend on the driver, and if they do the test
case will catch that on windows and it is interesting to get notified about
One other thing I suspect is that there are some corner cases, like 1x1
surfaces in ddraw. I noticed that Anarchy Online goes crazy if I report a
pitch of 4 on a 1x1 D3DFMT_A4R4G4B4 surface. It seems it overwrites loads of
memory, even if I allocate 256 bytes for the surface it overflows.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060926/0dc4c103/attachment.pgp
More information about the wine-devel