mesa: add cast to silence MSVC warning
mesa: fix inconsistent function declaration, definitions

To silence MSVC warnings that the declaration and definitions
were different.
mesa: s/GLint/GLuint/ to fix MSVC warnings in mipmap.c
mesa: add casts to fix MSVC warnings in multisample.c
mesa: s/GLuint/GLint/ to silence MSVC warning in textore.c
mesa: s/unsigned/int/ to fix MSVC warning in uniforms.c
tgsi: s/unsigned/int/ to silence MSVC warning
util: add casts to silence MSVC warnings in u_blit.c
hud: silence some MSVC warnings
softpipe: silence some MSVC warnings
mesa: whitespace, formatting, 80-column wrapping
os: add os_get_process_name() function

v2: explicitly test for BSD/APPLE, #warning for unexpected
environments.
mesa: simplify some _mesa_IsEnabled() queries

No need to test array->Enabled != 0 since the Enabled field can
only be 0 or 1.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
mesa: fix Address Sanitizer (ASan) issue in _mesa_add_parameter()

If the size argument isn't a multiple of four, we would have read/
copied uninitialized memory.

Fixes an issue reported by Myles C. Maxfield <myles.maxfield@gmail.com>
mesa: update glext.h to version 20130708

This update fixes the problem with duplicated typedefs for
GLclampf and GLclampd in the previous version.

It also changes some parameter types for glDebugMessageCallbackARB()
and glTransformFeedbackVaryingsEXT().

Note we should someday update the glapi-gen code so that it
understands void pointer parameters.  Currently, the Python code
only understands "GLvoid *" but not "void *".  Luckily, the
compilers don't seem to complain about mixing GLvoid and void.
tgsi: use X component of the second operand in exec_scalar_binary()

The code happened to work in the past since the (scalar) src args
effectively always have a swizzle of .xxxx, .yyyy, .zzzz, or .wwww so
whether you grab the X or Y component doesn't really matter.  Just
fixing the code to make it look right.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
tgsi: exec TGSI_OPCODE_SQRT as a scalar instruction, not vector

To align with the docs and the state tracker.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
tgsi: fix-up KILP comments

KILP is really unconditional fragment kill.

We've had KIL and KILP transposed forever.  I'll fix that next.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
tgsi: rename the TGSI fragment kill opcodes

TGSI_OPCODE_KIL and KILP had confusing names.  The former was conditional
kill (if any src component < 0).  The later was unconditional kill.
At one time KILP was supposed to work with NV-style condition
codes/predicates but we never had that in TGSI.

This patch renames both opcodes:
  TGSI_OPCODE_KIL -> KILL_IF   (kill if src.xyzw < 0)
  TGSI_OPCODE_KILP -> KILL     (unconditional kill)

Note: I didn't just transpose the opcode names to help ensure that I
didn't miss updating any code anywhere.

I believe I've updated all the relevant code and comments but I'm
not 100% sure that some drivers had this right in the first place.
For example, the radeon driver might have llvm.AMDGPU.kill and
llvm.AMDGPU.kilp mixed up.  Driver authors should review their code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
gallivm: Eliminate redundant lp_build_select calls.

lp_build_cmp already returns 0 / ~0, so the lp_build_select call is
unnecessary.

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