<div dir="ltr"><div>Over-all, I'm very happy with the way this turned out.  Good work to all involved!  I made a few comments here and there and a pile on patch 18.  That said, I think they should all be fairly easy to resolve and, should Emil be willing to hold off on branching for a couple of days, think this should be good to land.  With all of the refactors and changes that have happened (particularly about params arrays and NIR serialization), I have a high level of confidence that we're probably getting it right.  Obviously, user testing will be needed, but I think it's all solid in concept.  Let's do this!<br><br></div>--Jason<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 18, 2017 at 10:31 PM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">git://<a href="http://people.freedesktop.org/~jljusten/mesa" rel="noreferrer" target="_blank">people.freedesktop.org/~<wbr>jljusten/mesa</a> i965-shader-cache-v2<br>
<br>
The series adds support for a disk shader cache for i965, but it does<br>
not enable it by default. To enable the i965 shader cache you need to<br>
set the environment variable MESA_GLSL_CACHE_DISABLE=0.<br>
<br>
v2:<br>
<br>
 * Fallback now uses Connor & Jason's nir serialization patch. This<br>
   simplified the fallback code considerably.<br>
<br>
 * Reworked uniform handling based on Jason's new uniform handling. We<br>
   no longer have to use pointer magic, which simplified the push/pull<br>
   constant save/restore.<br>
<br>
 * Patches 1 - 12 are for nir serialization<br>
<br>
Carl Worth (1):<br>
  intel/compiler: add new field for storing program size<br>
<br>
Connor Abbott (2):<br>
  glsl: move shader_cache type handling to glsl_types<br>
  nir: add serialization and deserialization<br>
<br>
Jason Ekstrand (4):<br>
  nir: Get rid of nir_shader::stage<br>
  nir/intrinsics: Set the correct num_indices for load_output<br>
  compiler/types: Support [de]serializing void types<br>
  nir: Add hooks for testing serialization<br>
<br>
Jordan Justen (19):<br>
  glsl: Zero per_vertex_accumulator::fields for valgrind & nir_serialize<br>
  nir: Zero local_size const struct for valgrind & nir_serialize<br>
  intel/nir: Zero local index const struct for valgrind & nir_serialize<br>
  nir: Zero nir_load_const_instr::value for valgrind & nir_serialize<br>
  glsl_to_nir: Zero nir_variable struct for valgrind & nir_serialize<br>
  glsl_to_nir: Zero nir_constant in constant_copy for valgrind &<br>
    nir_serialize<br>
  main: Add nir serialization fields to gl_program<br>
  glsl/shader_cache: Save and restore serialized nir in gl_program<br>
  i965/link: Serialize program to nir after linking for shader cache<br>
  i965: Don't rely on nir for uses_texture_gather<br>
  i965: Add shader cache support for compute<br>
  i965: add cache fallback support using serialized nir<br>
  i965: Don't link when the program was found in the disk cache<br>
  i965: Initialize sha1 hash of dri config options<br>
  glsl/shader_cache: Save fs (BlendSupport) metadata<br>
  disk_cache: Fix issue reading GLSL metadata<br>
  dri drivers: Always add the sha1 build-id<br>
  i965: Initialize disk shader cache if MESA_GLSL_CACHE_DISABLE is false<br>
  disk_cache: Add support for MESA_GLSL_CACHE_TIMESTAMP in debug builds<br>
<br>
Timothy Arceri (6):<br>
  i965: add initial implementation of on disk shader cache<br>
  i965: Add shader cache support for vertex and fragment stages<br>
  i965: add shader cache support for geometry shaders<br>
  i965: add shader cache support for tess stages<br>
  mesa/glsl: add api_enabled flag to gl_transform_feedback_info<br>
  i965: add support for cached shaders with xfb qualifiers<br>
<br>
 src/amd/common/ac_nir_to_llvm.<wbr>c                    |   30 +-<br>
 src/amd/common/ac_shader_info.<wbr>c                    |    2 +-<br>
 src/amd/vulkan/radv_shader.c                       |    4 +-<br>
 src/compiler/Makefile.sources                      |    2 +<br>
 src/compiler/glsl/builtin_<wbr>variables.cpp            |    1 +<br>
 src/compiler/glsl/glsl_to_nir.<wbr>cpp                  |   14 +-<br>
 src/compiler/glsl/link_<wbr>varyings.cpp                |    5 +-<br>
 src/compiler/glsl/shader_<wbr>cache.cpp                 |  193 +---<br>
 src/compiler/glsl_types.cpp                        |  174 +++<br>
 src/compiler/glsl_types.h                          |    7 +<br>
 src/compiler/nir/meson.build                       |    2 +<br>
 src/compiler/nir/nir.c                             |   17 +-<br>
 src/compiler/nir/nir.h                             |   20 +-<br>
 src/compiler/nir/nir_clone.c                       |    2 +-<br>
 src/compiler/nir/nir_gather_<wbr>info.c                 |   14 +-<br>
 src/compiler/nir/nir_<wbr>intrinsics.h                  |    2 +-<br>
 src/compiler/nir/nir_linking_<wbr>helpers.c             |   14 +-<br>
 src/compiler/nir/nir_lower_<wbr>alpha_test.c            |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>atomics.c               |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>bitmap.c                |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>clamp_color_outputs.c   |    2 +-<br>
 .../nir/nir_lower_clip_cull_<wbr>distance_arrays.c      |    8 +-<br>
 src/compiler/nir/nir_lower_<wbr>drawpixels.c            |    2 +-<br>
 src/compiler/nir/nir_lower_io.<wbr>c                    |    4 +-<br>
 src/compiler/nir/nir_lower_io_<wbr>to_temporaries.c     |    4 +-<br>
 src/compiler/nir/nir_lower_io_<wbr>types.c              |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>samplers.c              |    3 +-<br>
 src/compiler/nir/nir_lower_<wbr>samplers_as_deref.c     |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>system_values.c         |    1 +<br>
 src/compiler/nir/nir_lower_<wbr>two_sided_color.c       |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>wpos_center.c           |    2 +-<br>
 src/compiler/nir/nir_lower_<wbr>wpos_ytransform.c       |    2 +-<br>
 src/compiler/nir/nir_print.c                       |    6 +-<br>
 src/compiler/nir/nir_<wbr>serialize.c                   | 1220 ++++++++++++++++++++<br>
 src/compiler/nir/nir_<wbr>serialize.h                   |   43 +<br>
 src/compiler/nir/nir_validate.<wbr>c                    |    2 +-<br>
 src/compiler/spirv/spirv_to_<wbr>nir.c                  |   52 +-<br>
 src/compiler/spirv/vtn_<wbr>variables.c                 |   16 +-<br>
 src/gallium/auxiliary/nir/<wbr>tgsi_to_nir.c            |    2 +-<br>
 src/gallium/drivers/freedreno/<wbr>ir3/ir3_cmdline.c    |    4 +-<br>
 src/gallium/drivers/freedreno/<wbr>ir3/ir3_nir.c        |    4 +-<br>
 src/gallium/drivers/radeonsi/<wbr>si_shader_nir.c       |   22 +-<br>
 src/gallium/drivers/vc4/vc4_<wbr>program.c              |    2 +-<br>
 src/intel/blorp/blorp_priv.h                       |    2 +-<br>
 src/intel/compiler/brw_<wbr>compiler.h                  |    2 +<br>
 src/intel/compiler/brw_fs.cpp                      |    8 +-<br>
 src/intel/compiler/brw_nir.c                       |   24 +-<br>
 src/intel/compiler/brw_nir_<wbr>analyze_ubo_ranges.c    |    2 +-<br>
 src/intel/compiler/brw_nir_<wbr>lower_cs_intrinsics.c   |    3 +-<br>
 src/intel/compiler/brw_nir_<wbr>tcs_workarounds.c       |    2 +-<br>
 src/intel/compiler/brw_shader.<wbr>cpp                  |   14 +-<br>
 src/intel/compiler/brw_vec4.<wbr>cpp                    |    1 +<br>
 src/intel/compiler/brw_vec4_<wbr>generator.cpp          |   10 +-<br>
 src/intel/compiler/brw_vec4_<wbr>gs_visitor.cpp         |   14 +-<br>
 src/intel/compiler/brw_vec4_<wbr>tcs.cpp                |   12 +-<br>
 src/intel/vulkan/anv_nir_<wbr>apply_pipeline_layout.c   |   13 +-<br>
 src/intel/vulkan/anv_nir_<wbr>lower_input_attachments.c |    2 +-<br>
 src/intel/vulkan/anv_nir_<wbr>lower_multiview.c         |   14 +-<br>
 src/intel/vulkan/anv_pipeline.<wbr>c                    |    2 +-<br>
 src/mesa/drivers/dri/Makefile.<wbr>am                   |    1 +<br>
 src/mesa/drivers/dri/i965/<wbr>Makefile.sources         |    1 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>context.c            |    6 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>context.h            |    1 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>cs.c                 |   24 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>cs.h                 |    3 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>disk_cache.c         |  537 +++++++++<br>
 src/mesa/drivers/dri/i965/brw_<wbr>gs.c                 |   22 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>link.cpp             |   19 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>nir_uniforms.cpp     |    4 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>state.h              |    7 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>state_upload.c       |    3 +<br>
 src/mesa/drivers/dri/i965/brw_<wbr>tcs.c                |   23 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>tes.c                |   22 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>vs.c                 |   20 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>wm.c                 |   28 +-<br>
 src/mesa/drivers/dri/i965/brw_<wbr>wm_surface_state.c   |   12 +-<br>
 src/mesa/drivers/dri/i965/<wbr>meson.build              |    1 +<br>
 src/mesa/drivers/dri/meson.<wbr>build                   |    2 +-<br>
 src/mesa/main/mtypes.h                             |    5 +<br>
 src/mesa/state_tracker/st_<wbr>glsl_to_nir.cpp          |   10 +-<br>
 src/util/disk_cache.c                              |   14 +-<br>
 81 files changed, 2391 insertions(+), 415 deletions(-)<br>
 create mode 100644 src/compiler/nir/nir_<wbr>serialize.c<br>
 create mode 100644 src/compiler/nir/nir_<wbr>serialize.h<br>
 create mode 100644 src/mesa/drivers/dri/i965/brw_<wbr>disk_cache.c<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.15.0.rc0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>