simplify & consolidate ctrl layer process memory caching mechanisms - move all non-necessarily-synchronous caching to background memory streaming thread cache

This commit is contained in:
Ryan Fleury
2024-01-25 10:04:03 -08:00
parent b14b9f0344
commit 38b113f1d0
4 changed files with 123 additions and 253 deletions
+1 -1
View File
@@ -4878,7 +4878,7 @@ df_commit_eval_value(TG_Graph *graph, RADDBG_Parsed *rdbg, DF_CtrlCtx *ctrl_ctx,
default:{}break;
case EVAL_EvalMode_Addr:
{
ctrl_process_write_data(process->ctrl_machine_id, process->ctrl_handle, dst_eval.offset, commit_data);
ctrl_process_write(process->ctrl_machine_id, process->ctrl_handle, r1u64(dst_eval.offset, dst_eval.offset+commit_data.size), commit_data.str);
}break;
case EVAL_EvalMode_Reg:
{
+1 -17
View File
@@ -1032,23 +1032,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
//- rjf: build normal row
if(!(row->flags & DF_EvalVizRowFlag_Canvas))
{
B32 row_is_fresh = 0;
if(row->eval.mode == EVAL_EvalMode_Addr)
{
Temp temp = temp_begin(scratch.arena);
U64 vaddr = row->eval.offset;
U64 size = tg_byte_size_from_graph_raddbg_key(parse_ctx.type_graph, parse_ctx.rdbg, row->eval.type_key);
CTRL_ProcessMemorySlice slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, r1u64(vaddr, vaddr+size));
row_is_fresh = slice.fresh;
temp_end(temp);
}
ui_set_next_flags(disabled_flags|(UI_BoxFlag_DrawBackground*row_is_fresh));
if(row_is_fresh)
{
Vec4F32 fresh_bg_color = df_rgba_from_theme_color(DF_ThemeColor_Highlight0);
fresh_bg_color.w *= 0.25f;
ui_set_next_background_color(fresh_bg_color);
}
ui_set_next_flags(disabled_flags);
UI_NamedTableVectorF("row_%I64x", row_hash)
{
//- rjf: expression