i965/nir: Add hooks for testing nir_shader_clone
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 16 Nov 2015 19:48:05 +0000 (11:48 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 18 Nov 2015 20:28:55 +0000 (12:28 -0800)
commit0bee3acc2a303b4cbbac0f6f54ffc8be79bc7470
tree47c9883c6926c4c1185c064cb92dc7090825cbaa
parent9fbd390dd4b60746c2ce60fb20c61c45c0e8a022
i965/nir: Add hooks for testing nir_shader_clone

This commit adds code for testing nir_shader_clone by running it after each
and every optimization pass and throwing away the old shader.  Testing
nir_shader_clone is hidden behind a new INTEL_CLONE_NIR environment
variable.

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_nir.c