llvmpipe: Add a linear rasterizer optimized for 2D rendering.

This change adds:

- an alternative rasterizer, which rasterizes bins in a left->right &
  top->bottom linear fashion;

- triangle -> rectangle detection;

- 1:1 blit detection;

- a special TGSI -> LLVM IR code generation that uses 8-bit SSE integers
  in AoS fashion (as opposed to 32bits floats.)

Altogether these changes yield a 2x to 3x performance improvement for 2D
workloads.  It was designed to render Windows 7 Aero and other Windows
built-in 3D applications (like Windows Media Player, Internet Explorer
11, UWP applications) with minimum CPU utilization, but it should be
generally applicable to other 2D-on-3D applications, like desktop
compositors, HTML browsers, 3D based UI toolkits, etc.

This was mostly the brainchild of Keith Whitwell back in 2010.  I wrote
TGSI -> AoS translation.  And many others added bug-fixes and
enhancements over the years: Roland Scheidegger, Brian Paul, and James
Benton.

Known issues:

- piglit spec@!opengl 1.1@quad-invariance will warn that "left and right
half should match" due to rounding error difference

- These optimized paths to kick in is that depth-buffer must not be
used, so some applications which want to benefit from these improvements
might need to be modified to ensure they use painter's algorithm instead
of depth-buffers.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Keith Whitwell <keithw@vmware.com>

v2: Incorporate Dave Airlie feedback: cleanup LP_DEBUG_xx; shrink 3+
empty lines.
128 jobs for !10765 with llvmpipe-linear-rast in 33 minutes and 12 seconds (queued for 20 seconds)
latest detached
Status Job ID Name Coverage
  Sanity
passed #9726196
sanity

00:00:08

 
  Container
passed #9726201
aarch64 manual
arm_build

00:00:29

passed #9726203
windows shell 1809 mesa manual
windows_build_vs2019

00:00:13

passed #9726198
manual
x86_build-base

00:00:23

passed #9726200
manual
x86_test-base

00:00:21

 
  Container 2
passed #9726213
android_build

00:00:28

passed #9726208
i386_build

00:00:27

passed #9726218
kernel+rootfs_amd64

00:00:13

passed #9726220
aarch64
kernel+rootfs_arm64

00:01:15

passed #9726222
aarch64
kernel+rootfs_armhf

00:00:15

passed #9726210
ppc64el_build

00:00:26

passed #9726211
s390x_build

00:00:23

passed #9726206
x86_build

00:00:26

passed #9726215
x86_test-gl

00:00:27

passed #9726217
x86_test-vk

00:00:23

 
  Meson X86 64
passed #9726233
meson-clang

00:10:41

passed #9726235
meson-clover

00:02:35

passed #9726228
meson-clover-testing

00:04:57

passed #9726230
meson-gallium

00:04:13

passed #9726231
meson-release

00:10:48

passed #9726224
meson-testing

00:03:27

passed #9726226
meson-testing-asan

00:06:48

passed #9726236
meson-vulkan

00:06:11

 
  Build Misc
passed #9726238
arm_test

00:00:33

passed #9726239
meson-android

00:01:40

passed #9726243
aarch64
meson-arm64

00:05:03

passed #9726245
aarch64
meson-arm64-asan

00:11:20

failed #9726247
aarch64
meson-arm64-build-test

00:04:03

passed #9726241
aarch64
meson-armhf

00:05:26

passed #9726252
meson-i386

00:06:16

passed #9726257
meson-mingw32-x86_64

00:06:10

failed #9726256
meson-ppc64el

00:03:00

failed #9726254
kvm
meson-s390x

00:03:01

passed #9726249
windows docker 1809 mesa
meson-windows-vs2019

00:06:20

 
  Amd
passed #9726259
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles2:amd64

00:10:15

passed #9726266
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64 1/2

00:12:59

passed #9726268
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles31:amd64 2/2

00:13:55

passed #9726262
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64 1/2

00:09:18

passed #9726264
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-gles3:amd64 2/2

00:09:17

passed #9726272
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-piglit-gl:amd64

00:11:17

passed #9726270
mesa-ci-aarch64-lava-collabora
radeonsi-stoney-traces:amd64

00:13:18

 
  Intel
passed #9726278
mesa-ci-aarch64-lava-collabora
iris-amly-traces:amd64

00:13:17

passed #9726274
mesa-ci-aarch64-lava-collabora
iris-apl-traces:amd64

00:15:14

passed #9726276
mesa-ci-aarch64-lava-collabora
iris-glk-traces:amd64

00:14:48

 
  Arm
passed #9726295
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles2:arm64

00:07:28

passed #9726300
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles31:arm64

00:13:56

passed #9726296
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64 1/2

00:11:57

passed #9726299
mesa-ci-aarch64-lava-collabora
panfrost-g52-gles3:arm64 2/2

00:10:47

passed #9726280
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64

00:12:59

passed #9726282
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf

00:12:41

passed #9726284
mesa-ci-aarch64-lava-collabora
panfrost-t760-traces:armhf

00:08:32

passed #9726285
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64

00:07:19

passed #9726291
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles31:arm64

00:09:13

passed #9726287
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 1/2

00:08:58

passed #9726289
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64 2/2

00:09:36

passed #9726293
mesa-ci-aarch64-lava-collabora
panfrost-t860-traces:arm64

00:13:50

 
  Broadcom
passed #9726327
igalia-rpi4
v3d-rpi4-gles2:armhf

00:06:44

passed #9726313
igalia-rpi4
v3d-rpi4-gles31:armhf 1/2

00:10:03

passed #9726316
igalia-rpi4
v3d-rpi4-gles31:armhf 2/2

00:09:43

passed #9726319
igalia-rpi4
v3d-rpi4-gles3:armhf 1/4

00:09:08

passed #9726321
igalia-rpi4
v3d-rpi4-gles3:armhf 2/4

00:09:36

passed #9726323
igalia-rpi4
v3d-rpi4-gles3:armhf 3/4

00:07:48

passed #9726325
igalia-rpi4
v3d-rpi4-gles3:armhf 4/4

00:08:26

passed #9726303
igalia-rpi3
vc4-rpi3-gles2:armhf 1/4

00:05:01

passed #9726305
igalia-rpi3
vc4-rpi3-gles2:armhf 2/4

00:04:49

passed #9726308
igalia-rpi3
vc4-rpi3-gles2:armhf 3/4

00:05:04

passed #9726310
igalia-rpi3
vc4-rpi3-gles2:armhf 4/4

00:04:51

 
  Freedreno
passed #9726331
google-freedreno-db410c
a306_gles2

00:06:06

passed #9726333
google-freedreno-db410c
a306_gles3 1/3

00:10:23

passed #9726336
google-freedreno-db410c
a306_gles3 2/3

00:10:01

passed #9726338
google-freedreno-db410c
a306_gles3 3/3

00:10:11

passed #9726340
google-freedreno-db410c
a306_gles3_options

00:04:57

passed #9726343
google-freedreno-db410c
a306-traces

00:09:02

passed #9726345
google-freedreno-db820c
a530_gles2

00:07:11

passed #9726352
google-freedreno-db820c
a530_gles31 1/2

00:06:48

passed #9726347
google-freedreno-db820c
a530_gles3 1/2

00:10:38

passed #9726354
google-freedreno-db820c
a530_gles31 2/2

00:07:08

passed #9726349
google-freedreno-db820c
a530_gles3 2/2

00:09:46

passed #9726357
google-freedreno-db820c
a530_piglit_gl

00:11:37

passed #9726359
google-freedreno-db820c
a530_piglit_shader

00:09:39

passed #9726361
google-freedreno-db820c
a530-traces

00:13:42

passed #9726370
google-freedreno-cheza
a630_egl

00:03:45

passed #9726369
google-freedreno-cheza
a630_gl

00:02:44

passed #9726363
google-freedreno-cheza
a630_gles2

00:02:56

passed #9726368
google-freedreno-cheza
a630_gles3

00:05:58

passed #9726365
google-freedreno-cheza
a630_gles31

00:05:07

passed #9726372
google-freedreno-cheza
a630_gles_others

00:03:53

passed #9726376
google-freedreno-cheza
a630_piglit

00:09:32

passed #9726377
google-freedreno-cheza
a630-traces

00:06:47

passed #9726373
google-freedreno-cheza
a630_vk 1/2

00:11:14

passed #9726374
google-freedreno-cheza
a630_vk 2/2

00:11:20

passed #9726375
google-freedreno-cheza
a630_vk_sysmem

00:02:06

 
  Software Renderer
passed #9726400
lavapipe-nir-stress

00:01:08

failed #9726399
lavapipe-vk

00:02:42

failed #9726388
llvmpipe-egl

00:03:14

passed #9726386
llvmpipe-gl

00:01:26

passed #9726383
llvmpipe-gles2

00:02:50

failed #9726384
llvmpipe-gles3

00:06:19

failed #9726385
llvmpipe-gles31

00:12:53

passed #9726387
llvmpipe-khr-gles2

00:00:28

passed #9726378
llvmpipe-piglit-cl

00:02:53

passed #9726380
llvmpipe-piglit-glslparser

00:04:35

failed #9726379
llvmpipe-piglit-quick_gl

00:09:20

passed #9726381
llvmpipe-piglit-quick_shader

00:09:16

failed #9726382
llvmpipe-traces

00:01:50

passed #9726396
softpipe-asan-gles31

00:02:26

passed #9726398
softpipe-gl

00:00:38

passed #9726389
softpipe-gles2

00:00:46

passed #9726390
softpipe-gles3

00:03:43

passed #9726391
softpipe-gles31 1/2

00:02:20

passed #9726392
softpipe-gles31 2/2

00:03:12

passed #9726393
softpipe-khr-gles2

00:00:30

passed #9726394
softpipe-khr-gles3

00:00:50

passed #9726395
softpipe-khr-gles31

00:00:46

passed #9726397
softpipe-piglit-quick

00:08:19

 
  Layered Backends
passed #9726413
windows docker 1809 mesa
test-d3d12-windows

00:03:22

passed #9726405
virgl-gl30-on-gl

00:01:18

passed #9726406
virgl-gl31-on-gl

00:00:52

passed #9726407
virgl-gl32-on-gl

00:01:55

passed #9726401
virgl-gles2-on-gl

00:01:30

failed #9726403
virgl-gles31-on-gl 1/2

00:08:20

failed #9726404
virgl-gles31-on-gl 2/2

00:03:36

failed #9726402
virgl-gles3-on-gl

00:06:22

passed #9726408
virgl-traces

00:01:50

passed #9726412
zink-lvp-gl

00:02:19

passed #9726410
zink-lvp-gles2

00:03:07

passed #9726411
zink-lvp-gles3

00:02:37

failed #9726409
zink-piglit-quick_gl

00:06:26

 
Name Stage Failure
failed
meson-arm64-build-test Build Misc
max cache size                       5.0 GB
Uploading artifacts for failed job
Uploading artifacts...
WARNING: artifacts: no matching files
_build/meson-logs/*.txt: found 1 matching files and directories

WARNING: _build/meson-logs/strace: no matching files
Uploading artifacts as "archive" to coordinator... ok
id=9726247 responseStatus=201 Created token=VrQEKBnB
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
meson-s390x Build Misc
max cache size                       5.0 GB
Uploading artifacts for failed job
Uploading artifacts...
_build/meson-logs/*.txt: found 1 matching files and directories

WARNING: _build/meson-logs/strace: no matching files
WARNING: shader-db: no matching files
Uploading artifacts as "archive" to coordinator... ok
id=9726254 responseStatus=201 Created token=gCi3AqnN
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
meson-ppc64el Build Misc
max cache size                       5.0 GB
Uploading artifacts for failed job
Uploading artifacts...
_build/meson-logs/*.txt: found 1 matching files and directories

WARNING: _build/meson-logs/strace: no matching files
WARNING: shader-db: no matching files
Uploading artifacts as "archive" to coordinator... ok
id=9726256 responseStatus=201 Created token=sFxbnqLB
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
llvmpipe-traces Software Renderer
Uploading artifacts...
results/summary/: found 14 matching files and directories

results/*.txt: found 1 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726382 responseStatus=201 Created token=kfbUL8Xp
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726382 responseStatus=201 Created token=kfbUL8Xp
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
llvmpipe-gles3 Software Renderer
Uploading artifacts for failed job
Uploading artifacts...
results/: found 13 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726384 responseStatus=201 Created token=k-1BJi2d
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726384 responseStatus=201 Created token=k-1BJi2d
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
llvmpipe-gles31 Software Renderer
Uploading artifacts for failed job
Uploading artifacts...
results/: found 101 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726385 responseStatus=201 Created token=hqms4Cs_
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726385 responseStatus=201 Created token=hqms4Cs_
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
llvmpipe-egl Software Renderer
Uploading artifacts for failed job
Uploading artifacts...
results/: found 361 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726388 responseStatus=201 Created token=cxxWCkMF
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726388 responseStatus=201 Created token=cxxWCkMF
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
lavapipe-vk Software Renderer
results/: found 16 matching files and directories  
results/*.shader_cache: excluded 16 files

Uploading artifacts as "archive" to coordinator... ok
id=9726399 responseStatus=201 Created token=sUa7tpnF
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726399 responseStatus=201 Created token=sUa7tpnF
Cleaning up file based variables
ERROR: Failed to cleanup volumes
ERROR: Job failed: exit code 1
failed
virgl-gles3-on-gl Layered Backends
Uploading artifacts for failed job
Uploading artifacts...
results/: found 14 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726402 responseStatus=201 Created token=dPJFeNnW
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726402 responseStatus=201 Created token=dPJFeNnW
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
virgl-gles31-on-gl 1/2 Layered Backends
Uploading artifacts for failed job
Uploading artifacts...
results/: found 56 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726403 responseStatus=201 Created token=4qvhXpkx
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726403 responseStatus=201 Created token=4qvhXpkx
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
virgl-gles31-on-gl 2/2 Layered Backends
Uploading artifacts for failed job
Uploading artifacts...
results/: found 52 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726404 responseStatus=201 Created token=Byoici4y
Uploading artifacts...
results/junit.xml: found 1 matching files and directories

Uploading artifacts as "junit" to coordinator... ok
id=9726404 responseStatus=201 Created token=Byoici4y
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
zink-piglit-quick_gl Layered Backends
+ quiet report_flakes /builds/mesa/mesa/results/results.csv
+ set +x
+ exit 1
Uploading artifacts for failed job
Uploading artifacts...
results/: found 70 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726409 responseStatus=201 Created token=PxUDN-h2
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
llvmpipe-piglit-quick_gl Software Renderer
 spec/ext_texture_array/copyteximage 2d_array samples=8: skip
spec/ext_texture_integer/fbo-integer: fail
Uploading artifacts for failed job
Uploading artifacts...
results/summary/: found 1225 matching files and directories

results/*.txt: found 1 matching files and directories

Uploading artifacts as "archive" to coordinator... ok
id=9726379 responseStatus=201 Created token=KEfUxt7A
Cleaning up file based variables
ERROR: Job failed: exit code 1