mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02: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,6 +1162,9 @@ zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs, nir_shad
|
||||||
ralloc_free(nir);
|
ralloc_free(nir);
|
||||||
|
|
||||||
/* TODO: determine if there's any reason to cache spirv output? */
|
/* TODO: determine if there's any reason to cache spirv output? */
|
||||||
|
if (zs->is_generated)
|
||||||
|
zs->spirv = spirv;
|
||||||
|
else
|
||||||
ralloc_free(spirv);
|
ralloc_free(spirv);
|
||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
@ -1961,6 +1964,7 @@ zink_shader_free(struct zink_context *ctx, struct zink_shader *shader)
|
||||||
}
|
}
|
||||||
_mesa_set_destroy(shader->programs, NULL);
|
_mesa_set_destroy(shader->programs, NULL);
|
||||||
ralloc_free(shader->nir);
|
ralloc_free(shader->nir);
|
||||||
|
ralloc_free(shader->spirv);
|
||||||
FREE(shader);
|
FREE(shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ struct zink_shader {
|
||||||
uint32_t ubos_used; // bitfield of which ubo indices are used
|
uint32_t ubos_used; // bitfield of which ubo indices are used
|
||||||
uint32_t ssbos_used; // bitfield of which ssbo indices are used
|
uint32_t ssbos_used; // bitfield of which ssbo indices are used
|
||||||
bool bindless;
|
bool bindless;
|
||||||
|
struct spirv_shader *spirv;
|
||||||
|
|
||||||
simple_mtx_t lock;
|
simple_mtx_t lock;
|
||||||
struct set *programs;
|
struct set *programs;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue