[1/6] wined3d: add rhw=1.0 optimization to position_float4
stefan at codeweavers.com
Sun Dec 30 16:09:39 CST 2007
Am Montag, 31. Dezember 2007 03:02:07 schrieb Alexander Dorofeyev:
> Hi. I found out that versions around ~0.9.50 had rhw==1.0f check here for
> optimization, before that special case was lost in rewrite. Unfortunately
> when I restored special case for zero/near zero rhw I was comparing to much
> older version which had no rhw==1.0f optimization. But I guess it makes
> sense to restore that too.
I am not sure how much this check gains. We're saving divisions at the cost of
a conditional. Wether it gains anything or not depends on the application(how
many vertices with rhw = 1.0 does it send in). I think in the past it was
used for avoiding the divisions in the D3DDECLTYPE_FLOAT3 case.
It was a bad thing that I removed this optimization in my patch, but I don't
think we should add it back, unless benchmarks clearly say that it helps.
More information about the wine-patches