iris: Fix fence leak in iris_fence_flush
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Thu, 12 Sep 2019 11:17:28 +0000 (14:17 +0300)
committerDanylo Piliaiev <danylo.piliaiev@gmail.com>
Mon, 16 Sep 2019 08:47:37 +0000 (08:47 +0000)
commit6f5a8617b40ebeca312a5cb28a5ef4375f126072
treea00041f7cbd45845de3b5879c1c75adaec1d90a6
parentc7b2a2fd363f57bb1ab4d7d6bad786af7e2924ef
iris: Fix fence leak in iris_fence_flush

Documentation for pipe_context::flush states:
 "NOTE: use screen->fence_reference() (or equivalent) to transfer
  new fence ref to **fence, to ensure that previous fence is unref'd"

Hence we need to unref previous out_fence.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_fence.c