softpipe: Add functions for computing relative mipmap level
authorKrzesimir Nowak <krzesimir@kinvolk.io>
Thu, 10 Sep 2015 12:15:57 +0000 (14:15 +0200)
committerBrian Paul <brianp@vmware.com>
Thu, 10 Sep 2015 15:45:14 +0000 (09:45 -0600)
commitd71a3be86008c275b5902de7759385643546a210
tree5bd5a0ec71a4e9fafa550e3fa75050285cac38f7
parentac3637dda04fe1315f19099bd142e4f8f6754b1d
softpipe: Add functions for computing relative mipmap level

These functions will be used by textureQueryLod.

v2:

  - renamed mip_level_* funcs to mip_rel_level_* to indicate that
    these functions return mip level relative to base level and
    documented them
  - renamed a level member in sp_filter_funcs struct to relative_level
  - changed mip_rel_level_none and mip_rel_level_nearest to return mip
    level relative to base level, mip_rel_level_linear already did
    that
  - documented clamp_lod function

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/softpipe/sp_tex_sample.c
src/gallium/drivers/softpipe/sp_tex_sample.h