mayingzhen / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

bug in FastClusterFit #84

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use FastClusterFit instead of other cluster fit code

What is the expected output? What do you see instead?
m_order array is not completly initialized.
the code crashes if m_colours->GetCount()<16

Please provide any additional information below.
Change "for( int i = 0; i < 16; ++i )" into "for( int i = 0, count =
m_colours->GetCount(); i < count; ++i )"

Original issue reported on code.google.com by marcoalt...@gmail.com on 7 Mar 2009 at 10:36

GoogleCodeExporter commented 8 years ago
Fast cluster fit requires 16 elements per block, due to the pre-computed data. 
This
is so by design. It may be possible to design the algorithm to avoid that
requirement, but I haven't done so, and I'm not planning to. Improving the
performance of this code is not high on my priority list.

In any case, fast cluster fit does not seem to be that fast, at least not on my
current CPU. I think that on my older Athlon64 it used to be the fastest, 
though. The
code in trunk uses WeightedClusterFit in all cases now.

Original comment by cast...@gmail.com on 9 Mar 2009 at 9:17

GoogleCodeExporter commented 8 years ago
Closing as WontFix. Feel free to reopen if you feel strongly about it.

Original comment by cast...@gmail.com on 18 Mar 2009 at 5:09