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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15224>
This commit is contained in:
Mike Blumenkrantz 2022-02-24 15:43:15 -05:00 committed by Marge Bot
parent 76fe6f7235
commit dfbb7c1f73

View file

@ -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);