glsl: Convert piles of foreach_iter to the newer foreach_list macro.

foreach_iter and exec_list_iterators have been deprecated for some time now;
we just hadn't ever bothered to convert code to the newer foreach_list
and foreach_list_safe macros.

In these cases, we aren't editing the list, so we can use foreach_list
rather than foreach_list_safe.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Convert piles of foreach_iter to foreach_list_safe.

In these cases, we edit the list (or at least might be), so we use the
foreach_list_safe variant.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Replace foreach_iter and iter.remove() with foreach_list_safe.

foreach_list_safe allows you to safely remove the current node.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Cast ir_call parameters to ir_rvalue, not ir_instruction.

A function call's parameters are always rvalues.  ir_rvalue may not
always be a subclass of ir_instruction in the future, so we should use
the right one.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Statically cast parameter exec_node to ir_variable.

Formal function parameters are always ir_variable objects, not an
arbitrary ir_instruction.  So there's no need to dynamically cast here.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Use a new foreach_two_lists macro for walking two lists at once.

When handling function calls, we often want to walk through the list of
formal parameters and list of actual parameters at the same time.
(Both are guaranteed to be the same length.)

Previously, we used a pattern of:

   exec_list_iterator 1st_iter = <1st list>.iterator();
   foreach_iter(exec_list_iterator, 2nd_iter, <2nd list>) {
      ...
      1st_iter.next();
   }

This was awkward, since you had to manually iterate through one of
the two lists.

This patch introduces a foreach_two_lists macro which safely walks
through two lists at the same time, so you can simply do:

   foreach_two_lists(1st_node, <1st list>, 2nd_node, <2nd list>) {
      ...
   }

v2: Rename macro from foreach_list2 to foreach_two_lists, as suggested
    by Ian Romanick.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Replace iterators in ir_reader.cpp with ad-hoc list walking.

These can't use foreach_list since they want to skip over the first few
list elements.  Just doing the ad-hoc list walking isn't too bad.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Remove exec_list iterators now that nothing uses them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
configure: Disable xvmc by default

The xvmc unit tests are failing on r300g and r600g.

Reviewed-by: Vinson Lee <vlee@freedesktop.org>
Use AC_PATH_TOOL instead of AC_PATH_PROG for llvm-config.

This should help with cross-compiling and multilib when $CHOST-specific
llvm-config is expected rather than build host default one.

It will help us a bit in Gentoo where we've started using
i686-pc-linux-gnu-llvm-config for 32-bit multilib LLVM.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73100

CC: "10.0" <mesa-stable@lists.freedesktop.org>
radeonsi: Apply si_* file naming scheme.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si for structs in si_pipe.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si for structs in si.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si for structs in si_resource.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si for functions in si_resource.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si for functions in si.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si for functions in si_pipe.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si remaining identifiers in si_blit.c.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename radeonsi->si remaining identifiers in si_compute.c.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeonsi: Rename r600->si remaining identifier in si_hw_context.c.

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