brw_compile_tes(compiler, brw, mem_ctx, key, &input_vue_map, &prog_data,
nir, &tep->program, st_index, &error_str);
if (program == NULL) {
- tep->program.sh.data->LinkStatus = linking_failure;
+ tep->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&tep->program.sh.data->InfoLog, error_str);
_mesa_problem(NULL, "Failed to compile tessellation evaluation shader: "
brw_tes_populate_key(brw, &key);
- if (!brw_search_cache(&brw->cache, BRW_CACHE_TES_PROG,
- &key, sizeof(key),
- &stage_state->prog_offset,
- &brw->tes.base.prog_data)) {
- bool success = brw_codegen_tes_prog(brw, tep, &key);
- assert(success);
- (void)success;
- }
+ if (brw_search_cache(&brw->cache, BRW_CACHE_TES_PROG,
+ &key, sizeof(key),
+ &stage_state->prog_offset,
+ &brw->tes.base.prog_data))
+ return;
+
+ if (brw_disk_cache_upload_program(brw, MESA_SHADER_TESS_EVAL))
+ return;
+
+ tep = (struct brw_program *) brw->programs[MESA_SHADER_TESS_EVAL];
+ tep->id = key.program_string_id;
+
+ MAYBE_UNUSED bool success = brw_codegen_tes_prog(brw, tep, &key);
+ assert(success);
}