intel/compiler: UNDEF SubgroupInvocation's register

This value takes a few instructions to create, involving expanding
V-immediates, adding 8 for SIMD16, and so on.  We can mark it UNDEF
so that it's clear that although these are partial writes, we are
actually defining the entire value.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22835>
This commit is contained in:
Kenneth Graunke
2023-05-03 02:05:16 -07:00
committed by Marge Bot
parent 4913f54a1f
commit 9dd6fcd9ec

View File

@@ -282,6 +282,7 @@ fs_visitor::nir_emit_system_values()
const fs_builder abld = bld.annotate("gl_SubgroupInvocation", NULL);
fs_reg &reg = nir_system_values[SYSTEM_VALUE_SUBGROUP_INVOCATION];
reg = abld.vgrf(BRW_REGISTER_TYPE_UW);
abld.UNDEF(reg);
const fs_builder allbld8 = abld.group(8, 0).exec_all();
allbld8.MOV(reg, brw_imm_v(0x76543210));