gallium: add PIPE_CAP_QUERY_PIPELINE_STATISTICS

Reviewed-by: Marek Olšák <maraeo@gmail.com>
gallium/docs: fix definition of PIPE_QUERY_SO_STATISTICS

Reviewed-by: Marek Olšák <maraeo@gmail.com>
gallium/hud: add support for PIPE_QUERY_PIPELINE_STATISTICS

Also, renamed "pixels-rendered" to "samples-passed" because the
occlusion counter increments even if colour and depth writes are
disabled, or (on some implementations) for killed fragments that
passed the depth test when PS early_fragment_tests is set.
nvc0: use fence to check state of queries that don't write sequence

This still isn't optimal, since the fence will signal a bit late,
but better than checking on the bo, which may never be ready if it
is shared (which is likely).
nvc0: use correct hw query for PRIMITIVES_GENERATED

It was the same as SO_STATISTICS[1] before.
nvc0: disable compressed storage type 0xdb for now

Single-sample color compression doesn't seem that useful anyway.
nvc0: add some driver statistics queries
nvc0: add some metrics to driver specific queries
nvc0: read PM counters for each warp scheduler separately
nvc0: demagic some of the NVE4_COMPUTE_UPLOAD methods

It's actually the same as P2MF.
nouveau: accelerate buffer copies in resource_copy_region
st/mesa: fix bitmap,drawpix,drawtex for PIPE_CAP_TGSI_TEXCOORD

NOTE: Changed the semantic index for the drawtex coordinate to
be the texture unit index instead of always 0.
Not sure if this is correct but since the value seems to depend
on the unit it would make sense to use different varying slots.
nv50,nvc0: disable DEPTH_RANGE_NEAR/FAR clipping during blit

We send position.z == 0, DEPTH_RANGE may be some arbitrary range
not including 0 (for exmaple in piglit's hiz tests).
nvc0: fix for 2d engine R source formats writing RRR1 and not R001
nvc0: honour scaled coordiantes setting for linear textures
nv50: account for pesky prefetch in size calculation of linear textures
nvc0: place staging textures in GART and map them directly
nvc0: fix 128 bit compressed storage type selection
nv50,nvc0: remove MS resolve formats hack

Mesa now allows BlitFramebuffer resolve between RGBA and BGRA.
st/mesa: rewrite comment in st_manager.c