diff options
author | Jason Ekstrand <[email protected]> | 2017-09-29 17:57:32 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-11-07 10:37:52 -0800 |
commit | 80ddfab2f54d7cd9dd4b93d2fbfa239f061a1f2b (patch) | |
tree | ae7d48e61d34f58d19bc7958b1cb31f3d87a8bed /src/intel/compiler/brw_fs.cpp | |
parent | 25f7453c9e6dc7c947b936bdac86680c332362bf (diff) |
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 <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 68a47bac841..c0b6047b954 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -996,6 +996,7 @@ fs_visitor::import_uniforms(fs_visitor *v) this->push_constant_loc = v->push_constant_loc; this->pull_constant_loc = v->pull_constant_loc; this->uniforms = v->uniforms; + this->thread_local_id = v->thread_local_id; } void @@ -6834,8 +6835,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data, { nir_shader *shader = nir_shader_clone(mem_ctx, src_shader); shader = brw_nir_apply_sampler_key(shader, compiler, &key->tex, true); - - brw_nir_lower_cs_intrinsics(shader, prog_data); + brw_nir_lower_cs_intrinsics(shader); shader = brw_postprocess_nir(shader, compiler, true); prog_data->local_size[0] = shader->info.cs.local_size[0]; |