radeonsi: Use proper member name for deleting export shader PM4 state

Fixes double-free with some piglit tests using geometry shaders.

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

Nothing uses this structure, removal fixes Klocwork error about
the possible oom condition in _mesa_symbol_table_iterator_ctor.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
mesa/glsl: introduce a remap table for uniform locations

Patch adds a remap table for uniforms that is used to provide a mapping
from application specified uniform location to actual location in the
UniformStorage. Existing UniformLocationBaseScale usage is removed as
table can be used to set sequential values for array uniform elements.

This mapping helps to implement GL_ARB_explicit_uniform_location so that
uniforms locations can be reorganized and handled in a more easy manner.

v2: small fixes + rename parameters for merge and split functions (Ian)
    improve documentation, remove old check for location bounds (Eric)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
ilo: remove intel_winsys_enable_reuse()

It should be an (winsys) implementation detail.
ilo: improve winsys documentation/comments

Document the interface, and add comments as to why some features are enabled
and why some checks are made.
ilo: fix DRM_API_HANDLE_TYPE_FD export

It can be exported by drm_intel_bo_gem_export_to_prime().  The code is already
in winsys, just not enabled.
ilo: add a wrapper to cast struct intel_bo

It is just drm_intel_bo, but having a wrapper makes the code cleaner.
ilo: rework winsys bo reloc functions

Rename

  intel_bo_emit_reloc() to intel_bo_add_reloc(),
  intel_bo_clear_relocs() to intel_bo_truncate_relocs(), and
  intel_bo_references() to intel_bo_has_reloc().

Besides, we need intel_bo_get_offset() only to get the presumed offset afer
adding a reloc entry.  Remove the function and make intel_bo_add_reloc()
return the presumed offset.  While at it, switch to gem_bo->offset64 from
gem_bo->offset.
ilo: remove intel_bo_get_virtual()

Make the map functions return the pointer directly.
ilo: remove intel_bo_get_size()

Commit bfa8d21759c5f2b5b0885c696842167bd4c64fee uses it to work around a
hardware limitation.  But there are other ways to do it without the need for
intel_bo_get_size().
ilo: replace bo alloc flags by initial domains

The only alloc flag is INTEL_ALLOC_FOR_RENDER, which can as well be expressed
by specifying the initial write domain.  The change makes it obvious that we
failed to set INTEL_ALLOC_FOR_RENDER in several places.
ilo: rework winsys batch buffer functions

Rename

  intel_winsys_check_aperture_size() to intel_winsys_can_submit_bo(),
  intel_bo_exec() to intel_winsys_submit_bo(), and
  intel_winsys_decode_commands() to intel_winsys_decode_bo().

Make a semantic change to ignore intel_context when the ring is not the render
ring.
ilo: PIPE_CAP_QUERY_TIMESTAMP may not be supported

Reading TIMESTAMP register may fail, depending on both kernel and hardware.
ilo: winsys may limit the batch buffer size

The maximum batch buffer size is determined at the time of
drm_intel_bufmgr_gem_init().  Make sure the pipe driver does not exceed the
limit.
ilo: move ring types to winsys

It results in less code despite that i915_drm.h specifies the ring type as
part of the execution flags.
ilo: set I915_EXEC_NO_RELOC when available

The winsys makes it clear that the pipe drivers should write presumed offsets.
We can always set I915_EXEC_NO_RELOC when the kernel supports it.
ilo: protect the decode context with a mutex

The decode context is not thread safe.
ilo: require hardware logical context support

The code paths are not tested for a while, and have some known issues.
ilo: print a warning when PPGTT is disabled

Despite what the PRMs say, the driver appears to work fine when PPGTT is
disabled.  But at least print a warning in that case.
ilo: set PIPE_CONTROL_GLOBAL_GTT_WRITE automatically

Set the flag automatically in gen6_emit_PIPE_CONTROL(), and set it only for
GEN6.