diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-04-28 13:09:27 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-05-01 12:50:37 -0700 |
commit | 2663759af0edb1ebcee3aa1ff63f846911d16076 (patch) | |
tree | dcf59ff822066ed4dd969211f989e62c72a761c1 /src/intel/compiler/brw_fs_nir.cpp | |
parent | 4b000b491a49afb12612a3cfeebeca9a528cd5e3 (diff) |
intel/fs: Add and use a new load_simd_width_intel intrinsic
Intrinsic to get the SIMD width, which not always the same as subgroup
size. Starting with a small scope (Intel), but we can rename it later
to generalize if this turns out useful for other drivers.
Change brw_nir_lower_cs_intrinsics() to use this intrinsic instead of
a width will be passed as argument. The pass also used to optimized
load_subgroup_id for the case that the workgroup fitted into a single
thread (it will be constant zero). This optimization moved together
with lowering of the SIMD.
This is a preparation for letting the drivers call it before the
brw_compile_cs() step.
No shader-db changes in BDW, SKL, ICL and TGL.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4794>
Diffstat (limited to 'src/intel/compiler/brw_fs_nir.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 852626c6172..383c99c9f45 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -3879,6 +3879,11 @@ fs_visitor::nir_emit_cs_intrinsic(const fs_builder &bld, break; } + case nir_intrinsic_load_simd_width_intel: { + bld.MOV(dest, brw_imm_ud(cs_prog_data->simd_size)); + break; + }; + default: nir_emit_intrinsic(bld, instr); break; |