r600: force LOD range to be only one value when mip.min filter is NONE
authorGert Wollny <gw.fossdev@gmail.com>
Sun, 1 Jul 2018 17:32:09 +0000 (19:32 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Thu, 5 Jul 2018 05:57:28 +0000 (07:57 +0200)
commit5278436d6742fc2065aa72ae5cd4c41eb89f9c92
treef8f186fdebe8c922439606c6cc4f58df466a0e89
parente7dd1a84a078ef59f1ba537db730143b3f255b20
r600: force LOD range to be only one value when mip.min filter is NONE

For a texture that has only one LOD defined, but for which
GL_TEXTURE_MAX_LEVEL is the default (1000) and
GL_TEXTURE_MIN_LOD != GL_TEXTURE_MAX_LOD the reading from the texture does
not properly resolve the LOD level and texture lookup might fail. Hence,
when no mipmap filter is given (indicating that no mip-mapping takes place),
force the LOD range to contain only value.

Fixes:
  dEQP-GLES3.functional.shaders.texture_functions.texture*.(i|u)sampler2d*
  dEQP-GLES3.functional.texture.format.sized.cube.rgb*
  out of VK_GL_CTS/android/cts/master/gles3-master.txt
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/r600/evergreen_state.c