tools/trace: Simple script to compare two traces.

Based on the earlier apitrace tracediff.sh script.
draw: Ensure draw_pt_middle_end::bind_parameters is never NULL.

Prevents calling NULL pointer with softpipe in certain cases.

Trivial.
llvmpipe: Fix rendering to PIPE_FORMAT_R10G10B10A2_UNORM.

We must take rounding in consideration when re-scaling to narrow
normalized channels, such as 2-bit normalized alpha.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
radeonsi: fix textureOffset and texelFetchOffset GLSL functions

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: simplify and fix MSAA texture sampling for array textures

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
gallium: add flush_resource context function

r600g needs explicit flushing before DRI2 buffers are presented on the screen.

v2: add (stub) implementations for all drivers, fix frontbuffer flushing
v3: fix galahad

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
r600g: add support for separately allocated CMASKs

v2: check for NULL cbufs

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
r600g: fast color clears for single-sample buffers

Allocate a CMASK on demand and use it to fast clear single-sample
colorbuffers. Both FBOs and window system colorbuffers are fast
cleared. Expand as needed when colorbuffers are mapped or displayed
on screen.

v2: cosmetics, move transfer expansion into dma_blit

Signed-off-by: Marek Olšák <marek.olsak@amd.com>