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:
committed by
Marge Bot
parent
eb30744562
commit
f7b76d681b
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user