ilo: make toy_compiler_disassemble() more useful

Do not require a toy_compiler so that it can be used in other places, such as
state dumping.  Add a bool to control whether the raw instruction words are
shown.
ilo: add a builder for building BOs for submission

Comparing to how we manage batch and instruction buffers, the new builder

 - does not flush
 - manages both types of buffers
 - manages STATE_BASE_ADDRESS
 - uploads kernels using unsynchronized mapping
 - has its own decoder for the buffers
 - provides more helpers
ilo: make ilo_cp based on ilo_builder

This makes ilo_cp use the builder to manage batch buffers, and use
ilo_builder_decode() to replace ilo_3d_pipeline_dump().
ilo: use ilo_builder for kernels and STATE_BASE_ADDRESS

Remove instruction buffer management from ilo_3d and adapt ilo_shader_cache to
upload kernels to ilo_builder.  To be able to do that, we also let ilo_builder
manage STATE_BASE_ADDRESS.
ilo: convert BLT to use ilo_builder

Make these changes

  ilo_cp_begin()    -> ilo_builder_batch_pointer()
  ilo_cp_write()    -> direct memory set
  ilo_cp_write_bo() -> ilo_builder_batch_reloc()

and make sure there is no implicit flush.  Use this chance to drop the
"_emit_" infix.
ilo: convert GPE surface functions to use ilo_builder

Make these changes

  ilo_cp_steal_ptr() and memcpy()   -> ilo_builder_surface_write()
  ilo_cp_steal() and ilo_cp_write() -> ilo_builder_surface_write()
  ilo_cp_write_bo()                 -> ilo_builder_surface_reloc()

and use this chance to drop the "_emit_" infix.
ilo: convert GPE state functions to use ilo_builder

Make these changes

  ilo_cp_steal_ptr() and memcpy() -> ilo_builder_state_write()
  ilo_cp_steal_ptr()              -> ilo_builder_state_pointer()

and use this chance to drop the "_emit_" infix.
ilo: convert GPE GEN7 command functions to use ilo_builder

Make these changes

  ilo_cp_begin()    -> ilo_builder_batch_pointer()
  ilo_cp_write()    -> direct memory set
  ilo_cp_write_bo() -> ilo_builder_batch_reloc()

and use this chance to drop the "_emit_" infix.
ilo: convert GPE GEN6 command functions to use ilo_builder

Similar to the changes to GEN7 command functions, but to GEN6 this time.

As every GPE function has been converted, remove
ilo_cp_assert_no_implicit_flush() calls.
ilo: remove unused ilo_cp functions

Remove

  ilo_cp_begin()
  ilo_cp_steal()
  ilo_cp_write()
  ilo_cp_write_multi()
  ilo_cp_write_bo()
  ilo_cp_end()
  ilo_cp_steal_ptr()
  ilo_cp_assert_no_implicit_flush()
Linking fails when not writing gl_Position.

According to GLSL-ES Spec(i.e. 1.0, 3.0), gl_Position value is undefined
after the vertex processing stage if we don't write gl_Position. However,
GLSL 1.10 Spec mentions that writing to gl_Position is mandatory. In case
of GLSL-ES, it's not an error and atleast the linking should pass.
Currently, Mesa throws an linker error in case we dont write to gl_position
and Version is less then 140(GLSL) and 300(GLSL-ES). This patch changes
it so that we don't report an error in case of GLSL-ES.

Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83380
configure.ac: Fix build with git-svn llvm version string

Reviewed-and-tested-by: Jan Vesely <jan.vesely@rutgers.edu>
vc4: Add missing null terminator to the debug options list.

So far, apparently there's been some NULL laying at the address just after
the options anyway, but the next commit changed that.
vc4: Add a debug flag for flushing after every draw.

It was useful on i965, but it's even more useful for debugging tiled
renderers.
vc4: Ignore non-address bits of the offset for load/store.

These only get used for full buffer dumps, which we don't support yet
anyway.
vc4: Don't forget to do initial tile clearing for depth/stencil.
vc4: Add support for loading/storing the depth buffer.

For now it still requires the color buffer to be present -- we're relying
on the store of color buffer contents to end the frame, and we have to do
something with color buffers in the rendering config packet.
vc4: Flip around the depth/stencil fields.

After implementing depth stores, it looks like this is the way things
actually are, according to hiz-depth-read-fbo-d24-s0's probes.
vc4: Fill out the stencil clear field.

The rest of stencil handling isn't done yet, but it documents an extra
cl_u8(0) and helps make it obvious why we don't need to format clear_depth
the same way the depth/stencil buffer is formatted.
vc4: Fix segfaults when rendering with no color render target.