r600g: Use virtual address for PIPE_QUERY_SO* in r600_emit_query_end

Virtual address is used for PIPE_QUERY_SO* queries in
r600_emit_query_begin, but not in r600_emit_query_end.

This will trigger a GPU fault when one of those queries is
made and virtual address is enabled.

Note: this is a candidate for the 9.1 branch

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
r300g: fix crash while binding a NULL constant buffer
r600g: fix crash while binding a NULL constant buffer
radeonsi: fix crash while binding a NULL constant buffer

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
cso: add constant buffer save/restore feature for postprocessing

Postprocessing is an internal meta op and should restore the states
it changes.
st/mesa: fix crash with blit-based GetTexImage

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

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
gallium/tgsi: fix valgrind warning

"Conditional jump or move depends on uninitialised value(s)"

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium: add interface for driver queries like performance counters, etc.

The pipe query interface is reused. The list of available queries can be
obtained using pipe_screen::get_driver_query_info.

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium: implement a heads-up display module

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

v2: lots of cosmetic changes
st/dri: integrate the HUD

Reviewed-by: Brian Paul <brianp@vmware.com>
r600g: add a driver query returning the number of draw_vbo calls

between begin_query and end_query
r600g: add a driver query returning the amount of requested VRAM and GTT memory
gallium/docs: document get_driver_query_info
glsl_to_tgsi: make simplify_cmp work with arrays

Even when we have arrays it is possible for simplify_cmp
to work on temps, just not on arrays.

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

Signed-off-by: Christian König <christian.koenig@amd.com>
glsl_to_tgsi: avoid creating arrays if driver doesn't support them

Avoid creating arrays if we replace indirect addressing anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
radeon/llvm: remove uneeded inclusion

The include isn't needed and the file has moved with LLVM master.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: remove wqm intrinsic

Now the backend handles that itself.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: mark all loads as constant

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: mark most intrinsics as readnone/nounwind

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: add preloading of all constants

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>