radv: Stop running constant folding during ray query lowering
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Thu, 11 May 2023 17:03:11 +0000 (19:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sun, 14 May 2023 17:28:40 +0000 (17:28 +0000)
Now that committed is an intrinsic index, there is no need for constant
folding.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22963>

src/amd/vulkan/nir/radv_nir_lower_ray_queries.c

index f4e1e6f..80e25fc 100644 (file)
@@ -679,9 +679,6 @@ radv_nir_lower_ray_queries(struct nir_shader *shader, struct radv_device *device
    bool progress = false;
    struct hash_table *query_ht = _mesa_pointer_hash_table_create(NULL);
 
-   /* Run constant folding to collapse expressions that are required to be constant by the spec. */
-   NIR_PASS(progress, shader, nir_opt_constant_folding);
-
    nir_foreach_variable_in_list (var, &shader->variables) {
       if (!var->data.ray_query)
          continue;