Module: Mesa Branch: main Commit: 040062df419d3f1ccd94f630fa30cd7f60c0b4f8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=040062df419d3f1ccd94f630fa30cd7f60c0b4f8
Author: Marcin Ĺšlusarz <[email protected]> Date: Wed Jan 5 14:04:49 2022 +0100 intel/compiler: handle VARYING_SLOT_CULL_PRIMITIVE in mesh It's needed for gl_MeshPerPrimitiveNV[].gl_ViewportMask Reviewed-by: Caio Oliveira <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16493> --- src/intel/compiler/brw_mesh.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/intel/compiler/brw_mesh.cpp b/src/intel/compiler/brw_mesh.cpp index 0f177f55a3c..92382ea0056 100644 --- a/src/intel/compiler/brw_mesh.cpp +++ b/src/intel/compiler/brw_mesh.cpp @@ -361,6 +361,7 @@ brw_compute_mue_map(struct nir_shader *nir, struct brw_mue_map *map) /* TODO(mesh): Multiview. */ map->per_primitive_header_size_dw = (nir->info.outputs_written & (BITFIELD64_BIT(VARYING_SLOT_VIEWPORT) | + BITFIELD64_BIT(VARYING_SLOT_CULL_PRIMITIVE) | BITFIELD64_BIT(VARYING_SLOT_LAYER))) ? 8 : 0; map->per_primitive_start_dw = ALIGN(primitive_list_size_dw, 8); @@ -377,6 +378,9 @@ brw_compute_mue_map(struct nir_shader *nir, struct brw_mue_map *map) case VARYING_SLOT_VIEWPORT: start = map->per_primitive_start_dw + 2; break; + case VARYING_SLOT_CULL_PRIMITIVE: + start = map->per_primitive_start_dw + 3; + break; default: assert(location == VARYING_SLOT_PRIMITIVE_ID || location >= VARYING_SLOT_VAR0);
