draw/llvmpipe: DRAW_USE_LLVM=0 broken
Using this when running e.g., glxgears causes a crash on shutdown:
glxgears: ../src/gallium/drivers/llvmpipe/lp_state_fs.c:4181: llvmpipe_set_constant_buffer: Assertion `index < ARRAY_SIZE(llvmpipe->constants[shader])' failed.
Thread 1 "glxgears" received signal SIGABRT, Aborted.
0x00007ffff7b9f844 in __pthread_kill_implementation () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff7b9f844 in __pthread_kill_implementation () from /lib64/libc.so.6
#1 0x00007ffff7b4eabe in raise () from /lib64/libc.so.6
#2 0x00007ffff7b3787f in abort () from /lib64/libc.so.6
#3 0x00007ffff7b3779b in __assert_fail_base.cold () from /lib64/libc.so.6
#4 0x00007ffff7b47147 in __assert_fail () from /lib64/libc.so.6
#5 0x00007ffff6f73fb7 in llvmpipe_set_constant_buffer (pipe=0x55555568b580, shader=MESA_SHADER_VERTEX, index=16, take_ownership=false, cb=0x0)
at ../src/gallium/drivers/llvmpipe/lp_state_fs.c:4181
#6 0x00007ffff6d6e5d6 in cso_unbind_context (ctx=0x555555954500) at ../src/gallium/auxiliary/cso_cache/cso_context.c:424
#7 0x00007ffff6d6ea33 in cso_destroy_context (ctx=0x555555954500) at ../src/gallium/auxiliary/cso_cache/cso_context.c:490
#8 0x00007ffff67ca049 in st_destroy_context_priv (st=0x555555952b30, destroy_pipe=true) at ../src/mesa/state_tracker/st_context.c:369
#9 0x00007ffff67cbd41 in st_destroy_context (st=0x555555952b30) at ../src/mesa/state_tracker/st_context.c:1017
#10 0x00007ffff62f983c in dri_destroy_context (ctx=0x55555564a660) at ../src/gallium/frontends/dri/dri_context.c:277
#11 0x00007ffff62ff241 in driDestroyContext (pcp=0x55555564a660) at ../src/gallium/frontends/dri/dri_util.c:662
#12 0x00007ffff7f88393 in drisw_destroy_context (context=0x5555555745b0) at ../src/glx/drisw_glx.c:430
#13 0x00007ffff7f8a846 in glXDestroyContext (dpy=0x55555555c330, ctx=0x5555555745b0) at ../src/glx/glxcmds.c:469
#14 0x000055555555744e in main ()
I'm not entirely sure how this path is supposed to work, but it seems like either the array is sized too small or the pipe cap return for draw is broken.