intel/cs: Rework the way thread local ID is handled
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 30 Sep 2017 00:57:32 +0000 (17:57 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 7 Nov 2017 18:37:52 +0000 (10:37 -0800)
commit80ddfab2f54d7cd9dd4b93d2fbfa239f061a1f2b
treeae7d48e61d34f58d19bc7958b1cb31f3d87a8bed
parent25f7453c9e6dc7c947b936bdac86680c332362bf
intel/cs: Rework the way thread local ID is handled

Previously, brw_nir_lower_intrinsics added the param and then emitted a
load_uniform intrinsic to load it directly.  This commit switches things
over to use a specific NIR intrinsic for the thread id.  The one thing I
don't like about this approach is that we have to copy thread_local_id
over to the new visitor in import_uniforms.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/compiler/nir/nir_intrinsics.h
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs.h
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_nir.h
src/intel/compiler/brw_nir_lower_cs_intrinsics.c