v3d: use inc/dec tmu operation with image atomic sub/add of 1
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 25 Jun 2019 13:02:56 +0000 (15:02 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 12 Jul 2019 09:51:22 +0000 (11:51 +0200)
commit85b78f96a663d11f2ec10ba6d34b4e5971f38077
tree5be4c834ae87ee41f77874219ef9d61532fccb72
parent2e22879115b9b24d401006ab35674fc8537f155f
v3d: use inc/dec tmu operation with image atomic sub/add of 1

This allows to remove a mov of 1/-1, as it is implicit with the
operation.

As with atomic inc/dec/add, usual shader-db set doesn't include any
GLES shader using it. So using as workaround vk-gl-cts shaders, we get
this:

total instructions in shared programs: 1217013 -> 1217006 (<.01%)
instructions in affected programs: 53 -> 46 (-13.21%)
helped: 2
HURT: 0

One of the helped shader went from 40 to 34 instructions.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/broadcom/compiler/v3d40_tex.c