further progress on integrating new demon layer

This commit is contained in:
Ryan Fleury
2024-03-21 11:28:47 -07:00
parent 1269b93588
commit e0e84c2ee3
9 changed files with 105 additions and 63 deletions
+2 -2
View File
@@ -3111,8 +3111,8 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
avg_ui_hash_chain_length = chain_length_sum / chain_count;
}
ui_labelf("Target Hz: %.2f", 1.f/df_dt());
ui_labelf("Ctrl Run Index: %I64u", ctrl_run_idx());
ui_labelf("Ctrl Mem Gen Index: %I64u", ctrl_memgen_idx());
ui_labelf("Ctrl Run Index: %I64u", ctrl_run_gen());
ui_labelf("Ctrl Mem Gen Index: %I64u", ctrl_mem_gen());
ui_labelf("Window %p", window);
ui_set_next_pref_width(ui_children_sum(1));
ui_set_next_pref_height(ui_children_sum(1));
+3 -3
View File
@@ -565,7 +565,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba)
Vec4F32 rgba = {0};
Vec4F32 hsva = {0};
{
if(state->memgen_idx >= ctrl_memgen_idx())
if(state->memgen_idx >= ctrl_mem_gen())
{
hsva = state->hsva;
rgba = rgba_from_hsva(hsva);
@@ -575,7 +575,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba)
DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval);
rgba = df_view_rule_hooks__rgba_from_eval(value_eval, parse_ctx->type_graph, parse_ctx->rdi, process);
state->hsva = hsva = hsva_from_rgba(rgba);
state->memgen_idx = ctrl_memgen_idx();
state->memgen_idx = ctrl_mem_gen();
}
}
Vec4F32 initial_hsva = hsva;
@@ -624,7 +624,7 @@ DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba)
{
Vec4F32 rgba = rgba_from_hsva(hsva);
df_view_rule_hooks__eval_commit_rgba(eval, parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, rgba);
state->memgen_idx = ctrl_memgen_idx();
state->memgen_idx = ctrl_mem_gen();
}
//- rjf: commit possible edited value to state
+1 -1
View File
@@ -7756,7 +7756,7 @@ DF_VIEW_UI_FUNCTION_DEF(Memory)
U8 *visible_memory = 0;
{
Rng1U64 chunk_aligned_range_bytes = r1u64(AlignDownPow2(viz_range_bytes.min, KB(4)), AlignPow2(viz_range_bytes.max, KB(4)));
U64 current_memgen_idx = ctrl_memgen_idx();
U64 current_memgen_idx = ctrl_mem_gen();
B32 range_changed = (chunk_aligned_range_bytes.min != mv->last_viewed_memory_cache_range.min ||
chunk_aligned_range_bytes.max != mv->last_viewed_memory_cache_range.max);
B32 mem_changed = (current_memgen_idx != mv->last_viewed_memory_cache_memgen_idx);