From 5378895d48cf473d265e055a883785c550a24f5f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 1 Feb 2021 16:55:33 -0600 Subject: [PATCH] spirv: Create acceleration structure and shader record variables spirv_to_nir now requires NIR variables to be created for everything. Fixes: 10b3eecd361af "spirv: Don't remove variables used by resource..." Reviewed-by: Caio Marcelo de Oliveira Filho Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 72437f6d540d77e7bcfcfd46938accd996684b51) --- .pick_status.json | 2 +- src/compiler/spirv/vtn_variables.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 93328242c38..d9c62b55ebf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1939,7 +1939,7 @@ "description": "spirv: Create acceleration structure and shader record variables", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "10b3eecd361af465e0e207fb18553ae37b924c45" }, diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 4df95baaa9e..10abcb14598 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1831,6 +1831,8 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val, case vtn_variable_mode_ubo: case vtn_variable_mode_ssbo: case vtn_variable_mode_push_constant: + case vtn_variable_mode_accel_struct: + case vtn_variable_mode_shader_record: var->var = rzalloc(b->shader, nir_variable); var->var->name = ralloc_strdup(var->var, val->name); @@ -1936,11 +1938,6 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val, break; } - case vtn_variable_mode_accel_struct: - case vtn_variable_mode_shader_record: - /* These don't need actual variables. */ - break; - case vtn_variable_mode_image: case vtn_variable_mode_phys_ssbo: case vtn_variable_mode_generic: