nir: fix gathering TCS cross invocation access with lowered IO
Fixes: abe9588ff04 - nir: gather tess.tcs_cross_invocation info from lowered IO intrinsics
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7622>
(cherry picked from commit aadfdb962ffa425a230d972c28351c8879072b6b)
diff --git a/.pick_status.json b/.pick_status.json
index 01b8e9e..45c006b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -337,7 +337,7 @@
"description": "nir: fix gathering TCS cross invocation access with lowered IO",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "abe9588ff048656c94d2074ca3d852ac371e0c7b"
},
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index 2271f8b..c12dc0f 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -29,10 +29,10 @@
src_is_invocation_id(const nir_src *src)
{
assert(src->is_ssa);
- if (src->parent_instr->type != nir_instr_type_intrinsic)
+ if (src->ssa->parent_instr->type != nir_instr_type_intrinsic)
return false;
- return nir_instr_as_intrinsic(src->parent_instr)->intrinsic ==
+ return nir_instr_as_intrinsic(src->ssa->parent_instr)->intrinsic ==
nir_intrinsic_load_invocation_id;
}