summaryrefslogtreecommitdiffstats
path: root/src/gbm
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-02-15 03:45:00 +0100
committerRoland Scheidegger <[email protected]>2014-03-14 19:41:18 +0100
commit9954f0149799b726b8d57d723328ee5bec2b5070 (patch)
tree6751265c6ba131fc8652ac7fcfeb825a614bbb55 /src/gbm
parent88637e5764d475aa7ad140e20bdd12bcbe61cf18 (diff)
gallivm: use correct rounding for nearest wrap mode (in the aos int path)
The previous code used coords which were calculated as (int) (f_coord * tex_size * 256) >> 8. This is not only unnecessarily complex but can give the wrong texel due to rounding for negative coords (as an example, after denormalization coords from -1.0 to 0.0 should give -1, but this will give -1 for numbers from -1.0-1/256 - 0.0-1/256. Instead, juse use ifloor, dropping the shift stuff. Unfortunately, this will most likely be slower - with arch rounding available it shouldn't be too bad (trades a int shift for a round but also saves an int mul (which is shared by all coords) but otherwise it's a mess.
Diffstat (limited to 'src/gbm')
0 files changed, 0 insertions, 0 deletions