i965: Do NIR shader cloning in the caller.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Nov 2018 06:10:03 +0000 (22:10 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 20 Nov 2018 23:53:46 +0000 (15:53 -0800)
commit562448b75a7ab9035954d539dc3002a02e6263f8
tree120b315b41ba225c79404d773f2ef45d46f61578
parent6a10dd08f4311c9d46231269fb35f7cf8cb124c7
i965: Do NIR shader cloning in the caller.

This moves nir_shader_clone() to the driver-specific compile function,
rather than the shared src/intel/compiler code.  This allows i965 to do
key-specific passes before calling brw_compile_*.  Vulkan should not
need this cloning as it doesn't compile multiple variants.

We do need to continue cloning in the compute shader code because we
lower various things in NIR based on the SIMD width.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
12 files changed:
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_shader.cpp
src/intel/compiler/brw_vec4.cpp
src/intel/compiler/brw_vec4_gs_visitor.cpp
src/intel/compiler/brw_vec4_tcs.cpp
src/mesa/drivers/dri/i965/brw_cs.c
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_vs.c
src/mesa/drivers/dri/i965/brw_wm.c