wined3d: fix a memory leak and a performance regression in gen_arbfp_ffp_shader

Jeff Zaroyko jeffzaroyko at gmail.com
Wed Sep 3 08:06:17 CDT 2008


On Wed, Sep 3, 2008 at 10:25 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> 2008/9/3 Jeff Zaroyko <jeffzaroyko at gmail.com>:
>> Please ignore the previous patch sent two days ago, this one fixes a
>> performance regression as well as removing the memory leak.
>>
>> -Jeff
>>
> Do you have some kind of benchmark data for this change? I don't think
> allocating relatively large buffers like that on the stack is a good
> idea. If it does make a lot of difference in terms of performance, it
> probably makes sense to allocate the buffer in arbfp_alloc() instead
> and just reuse it. In that case it probably also makes sense to do
> that for the ARB and GLSL shader backends as well.
>
>
>

None as such since difference in performance is so large.  I can say
that without a doubt using HeapAlloc and HeapFree in this function
causes noticeable delays such that in Battlefield 1942 the framerate
is falls so much that it is unplayable, changing the allocation leaves
no trace of this.



More information about the wine-patches mailing list