From d2c6a48ee914ec9042dc88a17b8f86bd891c27be Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 22 Feb 2024 16:12:33 +0200 Subject: [PATCH] intel/nir: only consider ray query variables in lowering Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Ivan Briano Part-of: (cherry picked from commit abeac8cf96d9fbba3126339b2a62005ba8fd2dfc) --- .pick_status.json | 2 +- src/intel/compiler/brw_nir_lower_ray_queries.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 626573fae41..f01d1cbe33d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -24,7 +24,7 @@ "description": "intel/nir: only consider ray query variables in lowering", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/compiler/brw_nir_lower_ray_queries.c b/src/intel/compiler/brw_nir_lower_ray_queries.c index bcade17e803..844b90da47b 100644 --- a/src/intel/compiler/brw_nir_lower_ray_queries.c +++ b/src/intel/compiler/brw_nir_lower_ray_queries.c @@ -543,8 +543,11 @@ brw_nir_lower_ray_queries(nir_shader *shader, }; /* Map all query variable to internal type variables */ - nir_foreach_function_temp_variable(var, state.impl) + nir_foreach_function_temp_variable(var, state.impl) { + if (!var->data.ray_query) + continue; register_opaque_var(var, &state); + } hash_table_foreach(state.queries, entry) create_internal_var(entry->data, &state);