}
VkShaderModule
-zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs, nir_shader *base_nir, const struct zink_shader_key *key)
+zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs,
+ nir_shader *base_nir, const struct zink_shader_key *key, const void *extra_data)
{
VkShaderModule mod = VK_NULL_HANDLE;
struct zink_shader_info *sinfo = &zs->sinfo;
zink_screen_init_compiler(struct zink_screen *screen);
void
zink_compiler_assign_io(struct zink_screen *screen, nir_shader *producer, nir_shader *consumer);
+/* pass very large shader key data with extra_data */
VkShaderModule
-zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs, nir_shader *nir, const struct zink_shader_key *key);
+zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs, nir_shader *nir, const struct zink_shader_key *key, const void *extra_data);
VkShaderModule
zink_shader_spirv_compile(struct zink_screen *screen, struct zink_shader *zs, struct spirv_shader *spirv);
struct zink_shader *
assert(ctx); //TODO async
mod = zink_shader_tcs_compile(screen, zs, patch_vertices);
} else {
- mod = zink_shader_compile(screen, zs, prog->nir[stage], key);
+ mod = zink_shader_compile(screen, zs, prog->nir[stage], key, NULL);
}
if (!mod) {
FREE(zm);
struct zink_tcs_key *tcs = (struct zink_tcs_key*)key;
mod = zink_shader_tcs_compile(screen, zs, tcs->patch_vertices);
} else {
- mod = zink_shader_compile(screen, zs, prog->nir[stage], (struct zink_shader_key*)key);
+ mod = zink_shader_compile(screen, zs, prog->nir[stage], (struct zink_shader_key*)key, NULL);
}
if (!mod) {
FREE(zm);
if (!zm) {
return;
}
- mod = zink_shader_compile(screen, zs, comp->shader->nir, key);
+ mod = zink_shader_compile(screen, zs, comp->shader->nir, key, NULL);
if (!mod) {
FREE(zm);
return;
comp->shader = zink_shader_create(screen, comp->nir, NULL);
comp->curr = comp->module = CALLOC_STRUCT(zink_shader_module);
assert(comp->module);
- comp->module->shader = zink_shader_compile(screen, comp->shader, comp->shader->nir, NULL);
+ comp->module->shader = zink_shader_compile(screen, comp->shader, comp->shader->nir, NULL, NULL);
assert(comp->module->shader);
util_dynarray_init(&comp->shader_cache[0], NULL);
util_dynarray_init(&comp->shader_cache[1], NULL);