char *error_str;
program = brw_compile_vs(compiler, brw, mem_ctx, key, &prog_data,
vp->program.nir,
- !_mesa_is_gles3(&brw->ctx),
st_index, &error_str);
if (program == NULL) {
if (!vp->program.is_arb_asm) {
- vp->program.sh.data->LinkStatus = linking_failure;
+ vp->program.sh.data->LinkStatus = LINKING_FAILURE;
ralloc_strcat(&vp->program.sh.data->InfoLog, error_str);
}
/* Scratch space is used for register spilling */
brw_alloc_stage_scratch(brw, &brw->vs.base,
- prog_data.base.base.total_scratch,
- devinfo->max_vs_threads);
+ prog_data.base.base.total_scratch);
/* The param and pull_param arrays will be freed by the shader cache. */
ralloc_steal(NULL, prog_data.base.base.param);
brw_vs_populate_key(brw, &key);
- if (!brw_search_cache(&brw->cache, BRW_CACHE_VS_PROG,
- &key, sizeof(key),
- &brw->vs.base.prog_offset, &brw->vs.base.prog_data)) {
- bool success = brw_codegen_vs_prog(brw, vp, &key);
- (void) success;
- assert(success);
- }
+ if (brw_search_cache(&brw->cache, BRW_CACHE_VS_PROG,
+ &key, sizeof(key),
+ &brw->vs.base.prog_offset, &brw->vs.base.prog_data))
+ return;
+
+ if (brw_disk_cache_upload_program(brw, MESA_SHADER_VERTEX))
+ return;
+
+ vp = (struct brw_program *) brw->programs[MESA_SHADER_VERTEX];
+ vp->id = key.program_string_id;
+
+ MAYBE_UNUSED bool success = brw_codegen_vs_prog(brw, vp, &key);
+ assert(success);
}
bool