From dfbb7c1f735992ee2b2ddb194200db739b36955a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 24 Feb 2022 15:43:15 -0500 Subject: [PATCH] zink: store shader to ntv_context it's insane the gymnastics that have to be done because this wasn't stored Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index 47a509b84d9..3fb9017e217 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -43,6 +43,7 @@ struct ntv_context { bool explicit_lod; //whether to set lod=0 for texture() struct spirv_builder builder; + nir_shader *nir; struct hash_table *glsl_types; struct hash_table *bo_types; @@ -3698,6 +3699,7 @@ nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *sinfo, uint32_ struct ntv_context ctx = {0}; ctx.mem_ctx = ralloc_context(NULL); + ctx.nir = s; ctx.builder.mem_ctx = ctx.mem_ctx; assert(spirv_version >= SPIRV_VERSION(1, 0)); ctx.spirv_1_4_interfaces = spirv_version >= SPIRV_VERSION(1, 4);