radeon/llvm: Use the llvm.rsq.clamped intrinsic for RSQ

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Laurent Carlier <lordheavym@gmail.com>

https://bugs.freedesktop.org/show_bug.cgi?id=80015

CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
gallium/radeon: Only print a message for LLVM diagnostic errors

We were printing messages for all diagnostic types, which was
spamming the console for some OpenCL programs.
clover: Have compat::string allocate its own memory.
clover: Fix not setting build log if the build succeeds v2

If there were only warnings, they would not be added to the log.

v2:
  - Use compat::string.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
gallium: Add PIPE_SHADER_CAP_DOUBLES

This is for reporting whether or not double precision floating-point
operations are supported.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
i965: Reuse intel_upload.c for gen4/5 constant buffers.

No performance difference on glamor with copywinwin10 (n=40) on my gm45.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Drop the memcmp for finding duplicated CURBE uploads.

At this point, the extra copy of the data and memcmp are as expensive as
just re-uploading.

Note: now that we'll always upload, and brw_constant_buffer watches
BRW_NEW_BATCH anyway, we don't need to explicitly unref the old curbe_bo
at batch reset time.

No significant performance difference on glamor copywinwin10 (n=55),
despite that test having a 98% hit rate on the cache.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Fix stale binding table comment.

I recently moved the code from the mentioned location right into this
file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Fix stale comments about the state cache.

This changed in the state streaming work years ago.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Reuse libdrm's header for AUB definitions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Remove a dead define.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Fix state flags for gen4/5 CURBE.

If we had some NOS affecting VS compilation that resulted in optimization
changing the set of constants to be uploaded, we might not have reuploaded
the constants.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Move dispatch_grf_start_reg and first_curbe_grf into stage_prog_data.

I wanted to access this value from stage-generic code, so stop storing it
under two different names.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965/gen6+: Merge VS/GS and WM push constant buffer upload paths.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Merge VS/GS and WM pull constant buffer upload paths.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Update a ton of comments about constant buffers.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965: Add a comment about null renderbuffer surfaces and why they exist.

I noticed this when trying to find comments about pull constant buffers.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
i965/gen6: Add a spec citation about push constant packet requirements.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa/st: enable ARB_fragment_layer_viewport

If multiple viewports are supported, that implies the presence of a GS
and layered rendering, so we can enable ARB_fragment_layer_viewport as
well.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
mesa: add support for AMD_vertex_shader_viewport_index

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Tested-by: Tobias Droste <tdroste@gmx.de>