iris: Only upload surface state for grid info when needed
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 5 Jun 2019 05:29:13 +0000 (22:29 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 12 Jun 2019 00:57:37 +0000 (17:57 -0700)
commit48d7e7a9b85d1391aaf2a605319b23e6e13fa096
treeb27a89829d592924afd899f44be57fd38c309e0a
parentf346b277d14c5ff103e2698f82d9914e5cfd0667
iris: Only upload surface state for grid info when needed

Special care is needed to ensure that when we have two consecutive
calls with the same grid size, we only bail in the second one if it
either don't need the surface state or the surface state was already
uploaded.

v2: Instead of having a new bool in ice->state to know whether we had
    a surface, check whether we have state->ref.  (Ken)
    Clean up the logic a little bit by adding 'grid_updated' local. (Ken)

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_draw.c