glsl: make static constant variables "static const"

This allows them to be moved to .rodata, and allow us to be sure that they
will not be modified.

Signed-off-by: Chia-I Wu <olv@lunarg.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
mesa: Add _mesa_error_no_memory for logging out-of-memory messages

This can be called from locations that don't have a context pointer
handy.  This patch also adds enough infrastructure so that the unit
tests for the GLSL compiler and the stand-alone compiler will build and
function.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
mesa: add missing null checks in _tnl_register_fastpath()

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
mesa: add extra null checks in vbo_rebase_prims()

v2 [idr]: Move declarations before code to prevent MSVC build breaks.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
targets/pipe-loader: drop driver_descriptor symbol from swrast

The symbol is used for hardware only drivers. For swrast the
loader uses swrast_create_screen. Add VISIBILITY_CFLAGS while
we're here.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
targets/osmesa: hide osmesa_create_screen

The symbol is not meant to be exported, and its presence was
only a side effect due to the missing visibility flags.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/xvmc: limit the amount of exported symbols

In the presence of LLVM the final library exports every symbol from
the llvm namespace. Resolve this by using a version script (w/o the
version/name tag).

Considering that there are only ~25 symbols, explicitly list them
to minimize the chances of rogue symbols sneaking in.

Drop the *winsys_create functions as they were only meant for
gl-vdpau interop.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
targets/dri: use a single version script to restict exported symbols

Rather than having multiple (almost) identical version scripts use
a single one.

Cc: Christian König <christian.koenig@amd.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/omx: use version script to limit amount of exported symbols

Using export-symbols-regex is the least desirable method of restricting
the exported symbols, as is completely messes up with the symbol table.

radeon_drm_winsys_create is not needed, avoid exporting it.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
targets/omx: drop the version from the omx targets

Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/vdpau: use version script to limit the exported symbols

Using export-symbols-regex is the least desirable method of restricting
the exported symbols, as is completely messes up with the symbol table.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
targets/gbm: add version-script to limit exported symbols

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/egl-static: freshen up the version script

Namely drop the version/name tag of the exported symbol, and
rename the filename to egl.sym.

v2: Rebase on top of the LD_NO_UNDEFINED changes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
targets/opencl: hide all the exported llvm/clang mayhem... hopefully

Both llvm and clang polute the exported symbol table, as soon
as we try to link with either one. Other than those two
everything else looks good (clean).

Cc: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
targets/pipe-loader: cleanup version-script

Drop the version/name tag from the script as it was never
meant to be there. Add swrast_create_screen as it is used
when loading swrast. Rename the file to pipe.sym.

v2: Rebase on top of the LD_NO_UNDEFINED changes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
targets/omx: use GALLIUM_VIDEO_CFLAGS

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
targets/omx: add nouveau target

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
util/u_debug_flush: Use util_snprintf.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
scons: Adjust the warnings for VS.

Silence insignificant warnings so significant warnings have a chance to
stand out.

The only abundant warning that's not silenced here is "C4018:
signed/unsigned mismatch", as it could hide security issues, so it's better
to actually fix the code.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
st/vega: Prevent signed/unsigned comparisons.

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