zink: add and populate a shader_info struct to zink_shader

this avoids the need to use the nir pointer to access shader info

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22266>
This commit is contained in:
Mike Blumenkrantz
2023-03-28 18:39:29 -04:00
committed by Marge Bot
parent eb30744562
commit f7b76d681b
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -4901,6 +4901,7 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir,
NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_shader_temp, NULL);
}
}
memcpy(&ret->info, &nir->info, sizeof(nir->info));
ret->can_inline = true;
@@ -5142,6 +5143,7 @@ zink_shader_tcs_create(struct zink_screen *screen, struct zink_shader *vs, unsig
NIR_PASS_V(nir, nir_convert_from_ssa, true);
ret->nir = nir;
memcpy(&ret->info, &nir->info, sizeof(nir->info));
ret->non_fs.is_generated = true;
return ret;
}
+1
View File
@@ -734,6 +734,7 @@ struct zink_shader {
struct util_live_shader base;
uint32_t hash;
struct nir_shader *nir;
struct shader_info info;
struct zink_shader_info sinfo;