mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-21 22:40:35 +01:00
zink: store the spirv_shader to the zink_shader struct for generated tcs
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14976>
This commit is contained in:
parent
6c0740c129
commit
a9d2b86c2c
2 changed files with 6 additions and 1 deletions
|
|
@ -1162,7 +1162,10 @@ zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs, nir_shad
|
|||
ralloc_free(nir);
|
||||
|
||||
/* TODO: determine if there's any reason to cache spirv output? */
|
||||
ralloc_free(spirv);
|
||||
if (zs->is_generated)
|
||||
zs->spirv = spirv;
|
||||
else
|
||||
ralloc_free(spirv);
|
||||
return mod;
|
||||
}
|
||||
|
||||
|
|
@ -1961,6 +1964,7 @@ zink_shader_free(struct zink_context *ctx, struct zink_shader *shader)
|
|||
}
|
||||
_mesa_set_destroy(shader->programs, NULL);
|
||||
ralloc_free(shader->nir);
|
||||
ralloc_free(shader->spirv);
|
||||
FREE(shader);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ struct zink_shader {
|
|||
uint32_t ubos_used; // bitfield of which ubo indices are used
|
||||
uint32_t ssbos_used; // bitfield of which ssbo indices are used
|
||||
bool bindless;
|
||||
struct spirv_shader *spirv;
|
||||
|
||||
simple_mtx_t lock;
|
||||
struct set *programs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue