I don't know why we never did this. Almost every shader in shader-db that uses atomicAdd or imageAtomicAdd uses it with a constant of 1 or -1.
Results on Skylake across the whole series are below. There is some discussion in patch 2 about the 189 instructions (!) added. total instructions in shared programs: 14304116 -> 14304241 (<.01%) instructions in affected programs: 12811 -> 12936 (0.98%) helped: 21 HURT: 1 helped stats (abs) min: 1 max: 16 x̄: 3.05 x̃: 1 helped stats (rel) min: 0.05% max: 14.29% x̄: 1.95% x̃: 0.69% HURT stats (abs) min: 189 max: 189 x̄: 189.00 x̃: 189 HURT stats (rel) min: 4.87% max: 4.87% x̄: 4.87% x̃: 4.87% 95% mean confidence interval for instructions value: -12.55 23.91 95% mean confidence interval for instructions %-change: -3.27% -0.01% Inconclusive result (value mean confidence interval includes 0). total cycles in shared programs: 527552861 -> 527531194 (<.01%) cycles in affected programs: 1459195 -> 1437528 (-1.48%) helped: 18 HURT: 0 helped stats (abs) min: 2 max: 21328 x̄: 1203.72 x̃: 6 helped stats (rel) min: <.01% max: 5.29% x̄: 0.32% x̃: 0.03% 95% mean confidence interval for cycles value: -3701.36 1293.92 95% mean confidence interval for cycles %-change: -0.94% 0.29% Inconclusive result (value mean confidence interval includes 0). total spills in shared programs: 8025 -> 8033 (0.10%) spills in affected programs: 208 -> 216 (3.85%) helped: 1 HURT: 1 total fills in shared programs: 10989 -> 11040 (0.46%) fills in affected programs: 444 -> 495 (11.49%) helped: 1 HURT: 1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev