intel/compiler: Implement Task Output and Mesh Input
authorCaio Oliveira <caio.oliveira@intel.com>
Fri, 29 Oct 2021 19:45:17 +0000 (12:45 -0700)
committerMarge Bot <emma+marge@anholt.net>
Sat, 4 Dec 2021 00:41:46 +0000 (00:41 +0000)
commit70ace2bbcd5a8b9de1c9bbc2c8bcfe4daed413cd
tree75aef64598408b23a657e9c6a6418e83a57f0331
parent171bdd2ec66221368599eb3e8cbf4b9164e626f7
intel/compiler: Implement Task Output and Mesh Input

Implement the output written by the task *workgroup* and available to
all the mesh *workgroups* dispatched from that task.  We currently
ignore any layout annotations (since they are not really testable) and
produce a (packed) layout ourselves.

The URB messages are only SIMD8, so for larger SIMDs, the functions
will produce multiple messages.  Making this lowering here instead of
the generic lower_simd_width() since it is not just a matter of
zip/unzip, e.g. the offset must be adjusted.

Indirect writes/reads are implemented by handling one component at a
time and using the PER_SLOT variant of the messages.

Note that VK_NV_mesh_shader allows reading outputs, so add support for
that as well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13661>
src/intel/compiler/brw_fs.h
src/intel/compiler/brw_mesh.cpp
src/intel/compiler/brw_shader.h