neoragex2015 / nvidia-texture-tools

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

ColorSet.reamp is uninitialized when compressing maipmaps smaller than 4x4 #154

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please review this one because i don't think it's a proper fix :)

i fixed it by simply adding this:

    memset(remap, 0, sizeof(int)*16); 

after this line:

    memcpy(W, weights, sizeof(float)*count);

without this fix, the code is accessing remap indexes which are uninitialized  
because of this code: ( see it multiplies * 4.. instead of * w )

uint idx = y * 4 + x;

I am not 100% sure if my fix is correct.  (it seems to be pretty hacky to me. 
but at the size of 2x2 or 1x1.. i don't think anyone would notice.)

Original issue reported on code.google.com by pope...@gmail.com on 6 Dec 2010 at 9:04

GoogleCodeExporter commented 9 years ago
See issue 152 for status.

Original comment by cast...@gmail.com on 8 Dec 2010 at 8:14