freedreno: clear last_fence after resource tracking

The resource tracking in the clear/draw_vbo/blit paths could itself
trigger a flush.  Which would update last_fence.  So we need to clear
last_fence *after* all the dependency tracking.

Fixes: ddb7fada ("freedreno: avoid no-op flushes by re-using last-fence")
Closes: mesa/mesa#2992
Signed-off-by: Rob Clark <robdclark@chromium.org>
49 jobs for !5192 with wip/glamor-fix-19.3.x in 36 minutes and 10 seconds (queued for 5 seconds)
latest detached
Status Job ID Name Coverage
  Container
passed #2803943
debian-10:amd64

00:00:20

passed #2803945
aarch64
debian-10:arm64

00:00:22

passed #2803944
debian-9:amd64

00:00:19

passed #2803942
lava-container:arm64

00:00:15

passed #2803941
lava-container:armhf

00:00:20

 
  Build
passed #2803947
lava-build:arm64

00:05:10

passed #2803946
lava-build:armhf

00:05:03

passed #2803950
aarch64
meson-arm64

00:08:49

passed #2803949
aarch64
meson-armhf

00:06:32

passed #2803952
meson-clang

00:07:49

passed #2803955
meson-clover

00:06:57

passed #2803956
meson-clover-old-llvm

00:05:33

passed #2803958
meson-i386

00:05:21

passed #2803948
meson-main

00:09:29

passed #2803959
meson-mingw32-x86_64

00:05:39

passed #2803951
meson-swr-glvnd

00:06:05

passed #2803957
meson-vulkan

00:06:25

passed #2803960
scons

00:09:19

passed #2803961
scons-old-llvm

00:12:13

passed #2803953
scons-swr

00:06:05

passed #2803954
scons-win64

00:06:47

 
  Test
passed #2803986
db410c
arm64_a306_gles2 1/4

00:13:00

passed #2803987
db410c
arm64_a306_gles2 2/4

00:22:22

passed #2803988
db410c
arm64_a306_gles2 3/4

00:03:42

passed #2803989
db410c
arm64_a306_gles2 4/4

00:03:56

passed #2803975
mesa-cheza
arm64_a630_gles2

00:03:52

passed #2803976
mesa-cheza
arm64_a630_gles31 1/4

00:04:45

passed #2803977
mesa-cheza
arm64_a630_gles31 2/4

00:06:14

passed #2803978
mesa-cheza
arm64_a630_gles31 3/4

00:05:44

passed #2803979
mesa-cheza
arm64_a630_gles31 4/4

00:06:06

passed #2803980
mesa-cheza
arm64_a630_gles3 1/6

00:03:19

passed #2803981
mesa-cheza
arm64_a630_gles3 2/6

00:03:25

passed #2803982
mesa-cheza
arm64_a630_gles3 3/6

00:03:17

passed #2803983
mesa-cheza
arm64_a630_gles3 4/6

00:03:25

passed #2803984
mesa-cheza
arm64_a630_gles3 5/6

00:03:17

passed #2803985
mesa-cheza
arm64_a630_gles3 6/6

00:03:34

passed #2803965
lava-meson-gxl-s905x-libretech-cc
lima-test:arm64

00:02:59

passed #2803964
lava-sun8i-h3-libretech-all-h3-cc
lima-test:armhf

00:05:59

passed #2803962
lava-rk3288-veyron-jaq
panfrost-t760-test:armhf

00:06:02

passed #2803963
lava-rk3399-gru-kevin
panfrost-t860-test:arm64

00:04:55

passed #2803966
test-llvmpipe-gles2 1/4

00:02:43

passed #2803967
test-llvmpipe-gles2 2/4

00:03:08

passed #2803968
test-llvmpipe-gles2 3/4

00:02:42

passed #2803969
test-llvmpipe-gles2 4/4

00:02:50

passed #2803970
test-softpipe-gles2 1/4

00:01:17

passed #2803971
test-softpipe-gles2 2/4

00:01:37

passed #2803972
test-softpipe-gles2 3/4

00:02:23

passed #2803973
test-softpipe-gles2 4/4

00:02:32

passed #2803974
test-softpipe-gles3-limited

00:03:22