anv: More carefully dirty state in BindPipeline
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 7 Nov 2019 17:28:47 +0000 (11:28 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Mon, 18 Nov 2019 18:35:14 +0000 (18:35 +0000)
commit98dc179c1e094ab42346b23fe046ebb719b66ed4
tree53f698c5a78a9c88bc8ab9028ca63691bcf261f9
parent22f16ff54a4a23a9903e837d37e9d3d838e535f1
anv: More carefully dirty state in BindPipeline

Instead of blindly dirtying descriptors and push constants the moment we
see a pipeline change, check to see if it actually changes the bind
layout or push constant layout.  This doubles the runtime performance of
one CPU-limited example running with the Dawn WebGPU implementation when
running on my laptop.

NOTE: This effectively reverts beca63c6c07.  While it was a nice
optimization, it was based on prog_data and we can't do that anymore
once we start allowing the same binding table to be used with multiple
different pipelines.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_cmd_buffer.c
src/intel/vulkan/anv_nir_apply_pipeline_layout.c
src/intel/vulkan/anv_nir_compute_push_layout.c
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_pipeline_cache.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c