hash_store -> content

This commit is contained in:
Ryan Fleury
2025-09-18 14:42:25 -07:00
parent 364e15491c
commit 5381307e90
29 changed files with 884 additions and 884 deletions
+1 -1
View File
@@ -517,7 +517,7 @@ Rng1U64 rd_reg_slot_range_table[47] =
{OffsetOf(RD_Regs, file_path), OffsetOf(RD_Regs, file_path) + sizeof(String8)},
{OffsetOf(RD_Regs, cursor), OffsetOf(RD_Regs, cursor) + sizeof(TxtPt)},
{OffsetOf(RD_Regs, mark), OffsetOf(RD_Regs, mark) + sizeof(TxtPt)},
{OffsetOf(RD_Regs, text_key), OffsetOf(RD_Regs, text_key) + sizeof(HS_Key)},
{OffsetOf(RD_Regs, text_key), OffsetOf(RD_Regs, text_key) + sizeof(C_Key)},
{OffsetOf(RD_Regs, lang_kind), OffsetOf(RD_Regs, lang_kind) + sizeof(TXT_LangKind)},
{OffsetOf(RD_Regs, lines), OffsetOf(RD_Regs, lines) + sizeof(D_LineList)},
{OffsetOf(RD_Regs, dbgi_key), OffsetOf(RD_Regs, dbgi_key) + sizeof(DI_Key)},
+1 -1
View File
@@ -463,7 +463,7 @@ U64 inline_depth;
String8 file_path;
TxtPt cursor;
TxtPt mark;
HS_Key text_key;
C_Key text_key;
TXT_LangKind lang_kind;
D_LineList lines;
DI_Key dbgi_key;
+1 -1
View File
@@ -733,7 +733,7 @@ RD_RegTable:
{String8 file_path FilePath }
{TxtPt cursor Cursor }
{TxtPt mark Mark }
{HS_Key text_key TextKey }
{C_Key text_key TextKey }
{TXT_LangKind lang_kind LangKind }
{D_LineList lines Lines }
{DI_Key dbgi_key DbgiKey }
+61 -61
View File
@@ -1746,13 +1746,13 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
//- rjf: reads from hash store key
case E_SpaceKind_HashStoreKey:
{
HS_Root root = {space.u64_0};
HS_ID id = {space.u128};
HS_Key key = hs_key_make(root, id);
U128 hash = hs_hash_from_key(key, 0);
HS_Scope *scope = hs_scope_open();
C_Root root = {space.u64_0};
C_ID id = {space.u128};
C_Key key = c_key_make(root, id);
U128 hash = c_hash_from_key(key, 0);
C_Scope *scope = c_scope_open();
{
String8 data = hs_data_from_hash(scope, hash);
String8 data = c_data_from_hash(scope, hash);
Rng1U64 legal_range = r1u64(0, data.size);
Rng1U64 read_range = intersect_1u64(range, legal_range);
if(read_range.min < read_range.max)
@@ -1761,7 +1761,7 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
MemoryCopy(out, data.str + read_range.min, dim_1u64(read_range));
}
}
hs_scope_close(scope);
c_scope_close(scope);
}break;
//- rjf: file reads
@@ -1779,13 +1779,13 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
containing_range.max -= containing_range.max%chunk_size;
// rjf: map to hash
HS_Key key = fs_key_from_path_range(file_path, containing_range, 0);
U128 hash = hs_hash_from_key(key, 0);
C_Key key = fs_key_from_path_range(file_path, containing_range, 0);
U128 hash = c_hash_from_key(key, 0);
// rjf: look up from hash store
HS_Scope *scope = hs_scope_open();
C_Scope *scope = c_scope_open();
{
String8 data = hs_data_from_hash(scope, hash);
String8 data = c_data_from_hash(scope, hash);
Rng1U64 legal_range = r1u64(containing_range.min, containing_range.min + data.size);
Rng1U64 read_range = intersect_1u64(range, legal_range);
if(read_range.min < read_range.max)
@@ -1794,7 +1794,7 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
MemoryCopy(out, data.str + read_range.min - containing_range.min, dim_1u64(read_range));
}
}
hs_scope_close(scope);
c_scope_close(scope);
}break;
//- rjf: interior control entity reads (inside process address space or thread register block)
@@ -2137,17 +2137,17 @@ rd_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range)
//- rjf: asynchronous streamed reads -> hashes from spaces
internal HS_Key
internal C_Key
rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated)
{
HS_Key result = {0};
C_Key result = {0};
switch(space.kind)
{
case E_SpaceKind_HashStoreKey:
{
HS_Root root = {space.u64_0};
HS_ID id = {space.u128};
result = hs_key_make(root, id);
C_Root root = {space.u64_0};
C_ID id = {space.u128};
result = c_key_make(root, id);
}break;
case E_SpaceKind_File:
{
@@ -2177,16 +2177,16 @@ rd_whole_range_from_eval_space(E_Space space)
{
case E_SpaceKind_HashStoreKey:
{
HS_Root root = {space.u64_0};
HS_ID id = {space.u128};
HS_Key key = hs_key_make(root, id);
U128 hash = hs_hash_from_key(key, 0);
HS_Scope *hs_scope = hs_scope_open();
C_Root root = {space.u64_0};
C_ID id = {space.u128};
C_Key key = c_key_make(root, id);
U128 hash = c_hash_from_key(key, 0);
C_Scope *c_scope = c_scope_open();
{
String8 data = hs_data_from_hash(hs_scope, hash);
String8 data = c_data_from_hash(c_scope, hash);
result = r1u64(0, data.size);
}
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}break;
case E_SpaceKind_File:
{
@@ -2872,17 +2872,17 @@ rd_view_ui(Rng2F32 rect)
// rjf: unpack view's target expression & hash
E_Eval eval = e_eval_from_string(expr_string);
Rng1U64 range = r1u64(0, 1024);
HS_Key key = rd_key_from_eval_space_range(eval.space, range, 0);
U128 hash = hs_hash_from_key(key, 0);
C_Key key = rd_key_from_eval_space_range(eval.space, range, 0);
U128 hash = c_hash_from_key(key, 0);
// rjf: determine if hash's blob is ready, and which viewer to use
B32 data_is_ready = 0;
String8 new_view_name = {0};
{
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
if(!u128_match(hash, u128_zero()))
{
String8 data = hs_data_from_hash(hs_scope, hash);
String8 data = c_data_from_hash(c_scope, hash);
U64 num_utf8_bytes = 0;
U64 num_unknown_bytes = 0;
for(U64 idx = 0; idx < data.size && idx < range.max;)
@@ -2911,7 +2911,7 @@ rd_view_ui(Rng2F32 rect)
new_view_name = str8_lit("memory");
}
}
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}
// rjf: if we don't have a viewer, just use the memory viewer.
@@ -5993,7 +5993,7 @@ rd_window_frame(void)
//- rjf: @window_frame_part compute window's theme
//
{
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
//- rjf: try to find theme settings from the project, then the user.
RD_CfgList colors_cfgs = {0};
@@ -6039,7 +6039,7 @@ rd_window_frame(void)
}
//- rjf: map the theme config to the associated tree (either from a preset, or from a file)
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, hs_scope, theme_cfg->first->string);
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, c_scope, theme_cfg->first->string);
if(colors_cfgs.count == 0 && theme_tree == &md_nil_node)
{
theme_tree = rd_state->theme_preset_trees[RD_ThemePreset_DefaultDark];
@@ -6110,7 +6110,7 @@ rd_window_frame(void)
}
}
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}
//////////////////////////////
@@ -10205,7 +10205,7 @@ rd_set_autocomp_regs_(E_Eval dst_eval, RD_Regs *regs)
//- rjf: colors
internal MD_Node *
rd_theme_tree_from_name(Arena *arena, HS_Scope *scope, String8 theme_name)
rd_theme_tree_from_name(Arena *arena, C_Scope *scope, String8 theme_name)
{
Temp scratch = scratch_begin(&arena, 1);
MD_Node *theme_tree = &md_nil_node;
@@ -10228,7 +10228,7 @@ rd_theme_tree_from_name(Arena *arena, HS_Scope *scope, String8 theme_name)
endt_us = os_now_microseconds()+50000;
}
U128 hash = fs_hash_from_path_range(path, r1u64(0, max_U64), endt_us);
String8 data = hs_data_from_hash(scope, hash);
String8 data = c_data_from_hash(scope, hash);
theme_tree = md_tree_from_string(arena, data);
}
}
@@ -10864,10 +10864,10 @@ rd_init(CmdLine *cmdln)
rd_state->user_path_arena = arena_alloc();
rd_state->project_path_arena = arena_alloc();
rd_state->theme_path_arena = arena_alloc();
rd_state->user_cfg_string_key = hs_key_make(hs_root_alloc(), hs_id_make(0, 0));
rd_state->project_cfg_string_key = hs_key_make(hs_root_alloc(), hs_id_make(0, 0));
rd_state->cmdln_cfg_string_key = hs_key_make(hs_root_alloc(), hs_id_make(0, 0));
rd_state->transient_cfg_string_key = hs_key_make(hs_root_alloc(), hs_id_make(0, 0));
rd_state->user_cfg_string_key = c_key_make(c_root_alloc(), c_id_make(0, 0));
rd_state->project_cfg_string_key = c_key_make(c_root_alloc(), c_id_make(0, 0));
rd_state->cmdln_cfg_string_key = c_key_make(c_root_alloc(), c_id_make(0, 0));
rd_state->transient_cfg_string_key = c_key_make(c_root_alloc(), c_id_make(0, 0));
for(U64 idx = 0; idx < ArrayCount(rd_state->frame_arenas); idx += 1)
{
rd_state->frame_arenas[idx] = arena_alloc();
@@ -11272,7 +11272,7 @@ rd_frame(void)
{
struct
{
HS_Key key;
C_Key key;
String8 name;
}
table[] =
@@ -11288,7 +11288,7 @@ rd_frame(void)
String8 data = rd_string_from_cfg_tree(arena,
str8_zero(),
rd_cfg_child_from_string(rd_state->root_cfg, table[idx].name));
hs_submit_data(table[idx].key, &arena, data);
c_submit_data(table[idx].key, &arena, data);
}
}
#endif
@@ -12459,10 +12459,10 @@ rd_frame(void)
//- rjf: add macro for output log
{
HS_Scope *hs_scope = hs_scope_open();
HS_Key key = d_state->output_log_key;
U128 hash = hs_hash_from_key(key, 0);
String8 data = hs_data_from_hash(hs_scope, hash);
C_Scope *c_scope = c_scope_open();
C_Key key = d_state->output_log_key;
U128 hash = c_hash_from_key(key, 0);
String8 data = c_data_from_hash(c_scope, hash);
E_Space space = e_space_make(E_SpaceKind_HashStoreKey);
space.u64_0 = key.root.u64[0];
space.u128 = key.id.u128[0];
@@ -12471,7 +12471,7 @@ rd_frame(void)
expr->mode = E_Mode_Offset;
expr->type_key = e_type_key_cons_array(e_type_key_basic(E_TypeKind_U8), data.size, 0);
e_string2expr_map_insert(scratch.arena, macro_map, str8_lit("output"), expr);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}
//- rjf: (DEBUG) add macro for cfg strings
@@ -12479,7 +12479,7 @@ rd_frame(void)
{
struct
{
HS_Key key;
C_Key key;
String8 name;
}
table[] =
@@ -12491,10 +12491,10 @@ rd_frame(void)
};
for EachElement(idx, table)
{
HS_Scope *hs_scope = hs_scope_open();
HS_Key key = table[idx].key;
U128 hash = hs_hash_from_key(key, 0);
String8 data = hs_data_from_hash(hs_scope, hash);
C_Scope *c_scope = c_scope_open();
C_Key key = table[idx].key;
U128 hash = c_hash_from_key(key, 0);
String8 data = c_data_from_hash(c_scope, hash);
E_Space space = e_space_make(E_SpaceKind_HashStoreKey);
E_Expr *expr = e_push_expr(scratch.arena, E_ExprKind_LeafOffset, r1u64(0, 0));
space.u64_0 = key.root.u64[0];
@@ -12503,7 +12503,7 @@ rd_frame(void)
expr->mode = E_Mode_Offset;
expr->type_key = e_type_key_cons_array(e_type_key_basic(E_TypeKind_U8), data.size, 0);
e_string2expr_map_insert(scratch.arena, macro_map, table[idx].name, expr);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}
}
#endif
@@ -15936,10 +15936,10 @@ rd_frame(void)
}break;
case RD_CmdKind_AddThemeColor:
{
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
RD_Cfg *parent = rd_cfg_from_id(rd_regs()->cfg);
RD_Cfg *theme = rd_cfg_child_from_string_or_alloc(parent, str8_lit("theme"));
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, hs_scope, theme->first->string);
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, c_scope, theme->first->string);
if(theme_tree == &md_nil_node)
{
rd_cfg_new_replace(theme, rd_theme_preset_display_string_table[RD_ThemePreset_DefaultDark]);
@@ -15948,11 +15948,11 @@ rd_frame(void)
rd_cfg_new(color, str8_lit("tags"));
RD_Cfg *value = rd_cfg_new(color, str8_lit("value"));
rd_cfg_new(value, str8_lit("0xffffffff"));
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}break;
case RD_CmdKind_ForkTheme:
{
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
RD_Cfg *parent = rd_cfg_from_id(rd_regs()->cfg);
RD_CfgList colors = rd_cfg_child_list_from_string(scratch.arena, parent, str8_lit("theme_color"));
for(RD_CfgNode *n = colors.first; n != 0; n = n->next)
@@ -15961,7 +15961,7 @@ rd_frame(void)
}
RD_Cfg *theme_cfg = rd_cfg_child_from_string(parent, str8_lit("theme"));
String8 theme_name = theme_cfg->first->string;
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, hs_scope, theme_name);
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, c_scope, theme_name);
if(theme_tree == &md_nil_node)
{
theme_tree = rd_state->theme_preset_trees[RD_ThemePreset_DefaultDark];
@@ -15978,7 +15978,7 @@ rd_frame(void)
}
}
rd_cfg_release(theme_cfg);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}break;
case RD_CmdKind_SaveTheme:
case RD_CmdKind_SaveAndSetTheme:
@@ -16091,15 +16091,15 @@ rd_frame(void)
case RD_CmdKind_GoToNameAtCursor:
case RD_CmdKind_ToggleWatchExpressionAtCursor:
{
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
RD_Regs *regs = rd_regs();
HS_Key text_key = regs->text_key;
C_Key text_key = regs->text_key;
TXT_LangKind lang_kind = regs->lang_kind;
TxtRng range = txt_rng(regs->cursor, regs->mark);
U128 hash = {0};
TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, text_key, lang_kind, &hash);
String8 data = hs_data_from_hash(hs_scope, hash);
String8 data = c_data_from_hash(c_scope, hash);
Rng1U64 expr_off_range = {0};
if(range.min.column != range.max.column)
{
@@ -16115,7 +16115,7 @@ rd_frame(void)
RD_CmdKind_GoToName),
.string = expr);
txt_scope_close(txt_scope);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}break;
case RD_CmdKind_SetNextStatement:
{
+6 -6
View File
@@ -571,10 +571,10 @@ struct RD_State
F32 tooltip_animation_rate;
// rjf: serialized config debug string keys
HS_Key user_cfg_string_key;
HS_Key project_cfg_string_key;
HS_Key cmdln_cfg_string_key;
HS_Key transient_cfg_string_key;
C_Key user_cfg_string_key;
C_Key project_cfg_string_key;
C_Key cmdln_cfg_string_key;
C_Key transient_cfg_string_key;
// rjf: schema table
MD_NodePtrList *schemas;
@@ -898,7 +898,7 @@ internal B32 rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range
internal B32 rd_eval_space_write(void *u, E_Space space, void *in, Rng1U64 range);
//- rjf: asynchronous streamed reads -> hashes from spaces
internal HS_Key rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated);
internal C_Key rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated);
//- rjf: space -> entire range
internal Rng1U64 rd_whole_range_from_eval_space(E_Space space);
@@ -988,7 +988,7 @@ internal void rd_set_autocomp_regs_(E_Eval dst_eval, RD_Regs *regs);
//~ rjf: Colors, Fonts, Config
//- rjf: colors
internal MD_Node *rd_theme_tree_from_name(Arena *arena, HS_Scope *scope, String8 theme_name);
internal MD_Node *rd_theme_tree_from_name(Arena *arena, C_Scope *scope, String8 theme_name);
internal Vec4F32 rd_rgba_from_code_color_slot(RD_CodeColorSlot slot);
internal RD_CodeColorSlot rd_code_color_slot_from_txt_token_kind(TXT_TokenKind kind);
internal RD_CodeColorSlot rd_code_color_slot_from_txt_token_kind_lookup_string(TXT_TokenKind kind, String8 string);
+2 -2
View File
@@ -225,7 +225,7 @@
#include "rdi/rdi_local.h"
#include "rdi_make/rdi_make_local.h"
#include "mdesk/mdesk.h"
#include "hash_store/hash_store.h"
#include "content/content.h"
#include "file_stream/file_stream.h"
#include "text_cache/text_cache.h"
#include "mutable_text/mutable_text.h"
@@ -274,7 +274,7 @@
#include "rdi/rdi_local.c"
#include "rdi_make/rdi_make_local.c"
#include "mdesk/mdesk.c"
#include "hash_store/hash_store.c"
#include "content/content.c"
#include "file_stream/file_stream.c"
#include "text_cache/text_cache.c"
#include "mutable_text/mutable_text.c"
+16 -16
View File
@@ -1944,8 +1944,8 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
dr_fstrs_push_new(arena, &fstrs, &params, str8_lit(" "));
dr_fstrs_push_new(arena, &fstrs, &params, name);
{
HS_Scope *hs_scope = hs_scope_open();
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, hs_scope, name);
C_Scope *c_scope = c_scope_open();
MD_Node *theme_tree = rd_theme_tree_from_name(scratch.arena, c_scope, name);
U64 color_idx = 0;
for(MD_Node *n = theme_tree; color_idx < 4 && !md_node_is_nil(n); n = md_node_rec_depth_first_pre(n, theme_tree).next)
{
@@ -1973,7 +1973,7 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
}
}
}
hs_scope_close(hs_scope);
c_scope_close(c_scope);
}
result.eval_fstrs = fstrs;
}break;
@@ -2025,7 +2025,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
RD_CodeViewState *cv = rd_view_state(RD_CodeViewState);
rd_code_view_init(cv);
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
//////////////////////////////
@@ -2091,7 +2091,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
}
U128 hash = {0};
TXT_TextInfo info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &hash);
String8 data = hs_data_from_hash(hs_scope, hash);
String8 data = c_data_from_hash(c_scope, hash);
B32 file_is_missing = (rd_regs()->file_path.size != 0 && os_properties_from_file_path(rd_regs()->file_path).modified == 0);
B32 key_has_data = !u128_match(hash, u128_zero()) && info.lines_count;
ProfEnd();
@@ -2251,7 +2251,7 @@ RD_VIEW_UI_FUNCTION_DEF(text)
rd_store_view_param_s64(str8_lit("mark_column"), rd_regs()->mark.column);
txt_scope_close(txt_scope);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
scratch_end(scratch);
}
@@ -2291,7 +2291,7 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
}
RD_CodeViewState *cv = &dv->cv;
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
DASM_Scope *dasm_scope = dasm_scope_open();
TXT_Scope *txt_scope = txt_scope_open();
@@ -2399,7 +2399,7 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
syntax = DASM_Syntax_ATT;
}
}
HS_Key dasm_key = rd_key_from_eval_space_range(space, range, 0);
C_Key dasm_key = rd_key_from_eval_space_range(space, range, 0);
U128 dasm_data_hash = {0};
DASM_Params dasm_params = {0};
{
@@ -2415,7 +2415,7 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
rd_regs()->lang_kind = txt_lang_kind_from_arch(arch);
U128 dasm_text_hash = {0};
TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, rd_regs()->text_key, rd_regs()->lang_kind, &dasm_text_hash);
String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash);
String8 dasm_text_data = c_data_from_hash(c_scope, dasm_text_hash);
B32 has_disasm = (dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0);
B32 is_loading = (!has_disasm && dim_1u64(range) != 0 && eval.msgs.max_kind == E_MsgKind_Null && (space.kind != RD_EvalSpaceKind_CtrlEntity || space_entity != &ctrl_entity_nil));
@@ -2497,7 +2497,7 @@ RD_VIEW_UI_FUNCTION_DEF(disasm)
txt_scope_close(txt_scope);
dasm_scope_close(dasm_scope);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
scratch_end(scratch);
}
@@ -3826,7 +3826,7 @@ EV_EXPAND_RULE_INFO_FUNCTION_DEF(bitmap)
RD_VIEW_UI_FUNCTION_DEF(bitmap)
{
Temp scratch = scratch_begin(0, 0);
HS_Scope *hs_scope = hs_scope_open();
C_Scope *c_scope = c_scope_open();
TEX_Scope *tex_scope = tex_scope_open();
//////////////////////////////
@@ -3874,11 +3874,11 @@ RD_VIEW_UI_FUNCTION_DEF(bitmap)
//////////////////////////////
//- rjf: map expression artifacts -> texture
//
HS_Key texture_key = rd_key_from_eval_space_range(eval.space, offset_range, 0);
C_Key texture_key = rd_key_from_eval_space_range(eval.space, offset_range, 0);
TEX_Topology topology = tex_topology_make(dim, fmt);
U128 data_hash = {0};
R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, &data_hash);
String8 data = hs_data_from_hash(hs_scope, data_hash);
String8 data = c_data_from_hash(c_scope, data_hash);
//////////////////////////////
//- rjf: equip loading info
@@ -4031,7 +4031,7 @@ RD_VIEW_UI_FUNCTION_DEF(bitmap)
rd_store_view_param_f32(str8_lit("x"), view_center_pos.x);
rd_store_view_param_f32(str8_lit("y"), view_center_pos.y);
hs_scope_close(hs_scope);
c_scope_close(c_scope);
tex_scope_close(tex_scope);
scratch_end(scratch);
}
@@ -4364,8 +4364,8 @@ RD_VIEW_UI_FUNCTION_DEF(geo3d)
U64 base_offset = eval_range.min;
Rng1U64 idxs_range = r1u64(base_offset, base_offset+count*sizeof(U32));
Rng1U64 vtxs_range = r1u64(vtx_base_off, vtx_base_off+vtx_size);
HS_Key idxs_key = rd_key_from_eval_space_range(eval.space, idxs_range, 0);
HS_Key vtxs_key = rd_key_from_eval_space_range(eval.space, vtxs_range, 0);
C_Key idxs_key = rd_key_from_eval_space_range(eval.space, idxs_range, 0);
C_Key vtxs_key = rd_key_from_eval_space_range(eval.space, vtxs_range, 0);
R_Handle idxs_buffer = geo_buffer_from_key(geo_scope, idxs_key);
R_Handle vtxs_buffer = geo_buffer_from_key(geo_scope, vtxs_key);