glcpp: Don't use alternation in the lookahead for empty pragmas.

We've found that there's a buffer overrun bug in flex that's triggered by
using alternation in a lookahead pattern.

Fortunately, we don't need to match the exact {NEWLINE} expression to
detect an empty pragma. It suffices to verify that there are no non-space
characters before any newline character. So we can use a simple [\r\n] to
get the desired behavior while avoiding the flex bug.

Fixes the regression of piglit's 17000-consecutive-chars-identifier test,
(which has been crashing since commit
04e40fd337a244ee77ef9553985e9398ff0344af ).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82472
Signed-off-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

CC: <mesa-stable@lists.freedesktop.org>
gallium/targets: Clean up Haiku softpipe renderer visual

* Drop creating gl_config first as it's only really used
  to create the state tracker visual.
gallium/targets: Haiku, Fix some improper type warnings
auxilary/os: Add Solaris support in os_get_total_physical_memory.

The patch fixes the build on Oracle Solaris.

  CC     os/os_misc.lo
"os/os_misc.c", line 59: #error: unexpected platform in os_sysinfo.c

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
vc4: Clear padding of ioctl arguments.

Fixes valgrind complaints from valgrind being unaware of our ioctls.
vc4: Fix save/restore of the VS/FS in the blitter.

When I made the shader cache take the .fs member and moved the binding
point to .bind_fs, I failed to update these.  Fixes crashes in
copyteximage-related tests.
freedreno: don't ignore src/dst level

Don't ignore src/dst_level in pipe_copy_region.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno: implement pipe_flush_resource()

Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno/a3xx: handle first/last level properly

Fixes some assumptions about first_level being zero.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno/a2xx: fix segfault

Signed-off-by: Rob Clark <robclark@freedesktop.org>
u_vbuf: Simplify the format fallback translation.

Individual caps made supporting new fallbacks more complicated than it
needed to be.  Instead, just make a table of fallbacks at context init
time.

v2: Fix inverted "do we need to install vbuf?" flagging caught by Marek.

Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
u_vbuf: Add a few more format fallbacks.

Fixes piglit draw-vertices and gl-2.0-vertexattribpointer on vc4, where
I'm only advertising R32F to RGBA32F support so far.

Note: regresses gl-1.5-normal3b3s-invariance due to introduced flushes and
missing depth buffer load/store support in the driver.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
vc4: Fix LT/GE set-0-or-1 compares.

We were using the integer sub, which worked for the common case of EQ and
NE.  Fixes fs-lessThan-ivec2-ivec2 and other tests.
vc4: Ignore WADDRs from the other half of the instruction when merging.

This allows setting the opposite-side WADDR to NOP (a non-zero value) in
qpu_* helpers, so that we don't need to qpu_inst() merge them with NOPs
all the time just to get the waddr set.
vc4: Merge qpu_a_NOP() and qpu_m_NOP to a single qpu_NOP() helper.

Now that qpu_inst() ignores the WADDR from the other half of the
instruction, we can set both the ADD and MUL WADDRs in the NOP helper.
Thanks to that, we also no longer need to qpu_inst(NOP, NOP).
vc4: Set the other WADDR in the qpu instruction helpers.

Now you don't need to qpu_inst() your instruction with a NOP to get the
other waddr set.
vc4: Stop doing qpu_inst(add, NOP) or qpu_inst(NOP, mul).

Now that the extra WADDR is set, we can knock this off.  Saves a lot of
typing, and makes this code much more legible.
r300g: handle PIPE_BIND_BLENDABLE

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
r600g: only set PIPE_BIND_BLENDABLE if colorbuffer rendering is supported

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: handle PIPE_BIND_BLENDABLE

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>