softpipe: Use mag texture filter also for clamped lod == 0
authorGert Wollny <gert.wollny@collabora.com>
Thu, 4 Apr 2019 09:34:26 +0000 (11:34 +0200)
committerGert Wollny <gert.wollny@collabora.com>
Fri, 5 Apr 2019 07:07:45 +0000 (09:07 +0200)
commit0dff1533f25951adda3c36be6d9efa944741befb
treebdebacd9ccb28056ecca383bd8cc885e6b724fea
parent361f3d19f1fe09852900369ea7c4e9d8d5df4be3
softpipe: Use mag texture filter also for clamped lod == 0

Follow the spec when selecting the magnification filter (OpenGL 4.5,
section 8.14):

  If λ(x, y) is less than or equal to the constant c (see section 8.15)
  the texture is said to be magnified;

While we're here also silence a potential warning about implicit float
to double conversion.

v2: Update commit message to contain a reference to the spec as pointed
    out by Eric.

Fixes a number of dEQP GLES2 and GLES3 test out of:
 dEQP-GLES2.functional.texture.filtering.*
 dEQP-GLES2.functional.texture.vertex.2d.filtering.*
 dEQP-GLES3.functional.texture.vertex.*.filtering.*
 dEQP-GLES3.functional.texture.filtering.*
 dEQP-GLES3.functional.texture.shadow.2d.*

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/softpipe/sp_tex_sample.c