r600: Correct evaluation of cube array index and face
authorGert Wollny <gert.wollny@collabora.com>
Tue, 17 Jul 2018 17:04:09 +0000 (19:04 +0200)
committerGert Wollny <gw.fossdev@gmail.com>
Fri, 20 Jul 2018 12:55:12 +0000 (14:55 +0200)
commit016807161bbedd658ff8a691527078075f6c507a
treede560ddaab8983fe1292c00c9dbb2426136a77dc
parent01766c1db60e2b43dd15466b7e2f08a0ac0e708c
r600: Correct evaluation of cube array index and face

The array index needs to be corrected and it must be insured that it is
rounded and its value is non-negative before it is combined with the
face id.

v5: Use RNDNE instead of ADD 0.5 and FLOOR (Ilia Mirkin)

v6: Fix type (Roland Scheidegger)

Fixes 182 from android/cts/master/gles31-master.txt:
  dEQP-GLES31.functional.texture.filtering.cube_array.formats.*
  dEQP-GLES31.functional.texture.filtering.cube_array.sizes.*
  dEQP-GLES31.functional.texture.filtering.cube_array.combinations.nearest_mipmap_*
  dEQP-GLES31.functional.texture.filtering.cube_array.combinations.linear_mipmap_*
  dEQP-GLES31.functional.texture.filtering.cube_array.no_edges_visible.*

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/r600/r600_shader.c