mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +00:00
rebase
This commit is contained in:
committed by
Ryan Fleury
parent
19cee2d646
commit
31662822db
@@ -1539,7 +1539,7 @@ main(int argc, char **argv)
|
|||||||
if(got_final_result && size > 0)
|
if(got_final_result && size > 0)
|
||||||
{
|
{
|
||||||
String8 full_name = str8(buffer, size);
|
String8 full_name = str8(buffer, size);
|
||||||
info->binary_file_path = push_str8_copy(os_lnx_state.arena, full_name);
|
info->binary_file_path = push_str8_copy(lnx_state.arena, full_name);
|
||||||
info->binary_path = str8_chop_last_slash(info->binary_file_path);
|
info->binary_path = str8_chop_last_slash(info->binary_file_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ wm_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create wakeup event for polling
|
// create wakeup event for polling
|
||||||
os_lnx_gfx_state->wakeup_fd = eventfd(0, EFD_CLOEXEC);
|
lnx_wm_state->wakeup_fd = eventfd(0, EFD_CLOEXEC);
|
||||||
Assert(os_lnx_gfx_state->wakeup_fd > 0);
|
Assert(lnx_wm_state->wakeup_fd > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
@@ -211,7 +211,7 @@ wm_window_focus(WM_Window handle)
|
|||||||
// Serial number of failed request: 373
|
// Serial number of failed request: 373
|
||||||
// Current serial number in output stream: 374
|
// Current serial number in output stream: 374
|
||||||
//
|
//
|
||||||
XSetInputFocus(os_lnx_gfx_state->display, w->window, RevertToNone, CurrentTime);
|
XSetInputFocus(lnx_wm_state->display, w->window, RevertToNone, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal B32
|
internal B32
|
||||||
@@ -413,7 +413,7 @@ internal void
|
|||||||
wm_send_wakeup_event(void)
|
wm_send_wakeup_event(void)
|
||||||
{
|
{
|
||||||
U64 dummy = 1;
|
U64 dummy = 1;
|
||||||
ssize_t size = LNX_RETRY_ON_EINTR(write(os_lnx_gfx_state->wakeup_fd, &dummy, sizeof(dummy)));
|
ssize_t size = LNX_RETRY_ON_EINTR(write(lnx_wm_state->wakeup_fd, &dummy, sizeof(dummy)));
|
||||||
Assert(size == sizeof(dummy));
|
Assert(size == sizeof(dummy));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,12 +423,12 @@ wm_get_events(Arena *arena, B32 wait)
|
|||||||
WM_EventList evts = {0};
|
WM_EventList evts = {0};
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
if(XPending(os_lnx_gfx_state->display) == 0)
|
if(XPending(lnx_wm_state->display) == 0)
|
||||||
{
|
{
|
||||||
struct pollfd poll_fds[2] =
|
struct pollfd poll_fds[2] =
|
||||||
{
|
{
|
||||||
{ .fd = ConnectionNumber(os_lnx_gfx_state->display), .events = POLLIN },
|
{ .fd = ConnectionNumber(lnx_wm_state->display), .events = POLLIN },
|
||||||
{ .fd = os_lnx_gfx_state->wakeup_fd, .events = POLLIN },
|
{ .fd = lnx_wm_state->wakeup_fd, .events = POLLIN },
|
||||||
};
|
};
|
||||||
int timeout = wait && evts.count == 0 ? -1 : 0;
|
int timeout = wait && evts.count == 0 ? -1 : 0;
|
||||||
int poll_status = poll(poll_fds, ArrayCount(poll_fds), timeout);
|
int poll_status = poll(poll_fds, ArrayCount(poll_fds), timeout);
|
||||||
@@ -436,14 +436,14 @@ wm_get_events(Arena *arena, B32 wait)
|
|||||||
if(poll_fds[1].revents & POLLIN)
|
if(poll_fds[1].revents & POLLIN)
|
||||||
{
|
{
|
||||||
U64 dummy = 0;
|
U64 dummy = 0;
|
||||||
read(os_lnx_gfx_state->wakeup_fd, &dummy, sizeof(dummy));
|
read(lnx_wm_state->wakeup_fd, &dummy, sizeof(dummy));
|
||||||
wait = 0;
|
wait = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while(XPending(os_lnx_gfx_state->display))
|
while(XPending(lnx_wm_state->display))
|
||||||
{
|
{
|
||||||
XEvent evt = {0};
|
XEvent evt = {0};
|
||||||
XNextEvent(os_lnx_gfx_state->display, &evt);
|
XNextEvent(lnx_wm_state->display, &evt);
|
||||||
B32 set_mouse_cursor = 0;
|
B32 set_mouse_cursor = 0;
|
||||||
switch(evt.type)
|
switch(evt.type)
|
||||||
{
|
{
|
||||||
@@ -663,13 +663,17 @@ wm_get_events(Arena *arena, B32 wait)
|
|||||||
int child_rel_x = 0;
|
int child_rel_x = 0;
|
||||||
int child_rel_y = 0;
|
int child_rel_y = 0;
|
||||||
unsigned int mask = 0;
|
unsigned int mask = 0;
|
||||||
if(XQueryPointer(os_lnx_gfx_state->display, XDefaultRootWindow(os_lnx_gfx_state->display), &root_window, &child_window, &root_rel_x, &root_rel_y, &child_rel_x, &child_rel_y, &mask))
|
if(XQueryPointer(lnx_wm_state->display, XDefaultRootWindow(lnx_wm_state->display), &root_window, &child_window, &root_rel_x, &root_rel_y, &child_rel_x, &child_rel_y, &mask))
|
||||||
{
|
{
|
||||||
XDefineCursor(os_lnx_gfx_state->display, root_window, os_lnx_gfx_state->cursors[os_lnx_gfx_state->last_set_cursor]);
|
XDefineCursor(lnx_wm_state->display, root_window, lnx_wm_state->cursors[lnx_wm_state->last_set_cursor]);
|
||||||
XFlush(os_lnx_gfx_state->display);
|
XFlush(lnx_wm_state->display);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(evts.count > 0 || (wait == 0 && evts.count == 0))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return evts;
|
return evts;
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-14
@@ -697,6 +697,7 @@ rb_thread_entry_point(void *p)
|
|||||||
B32 convert_done = 0;
|
B32 convert_done = 0;
|
||||||
RDIM_BakeParams pdb_bake_params = {0};
|
RDIM_BakeParams pdb_bake_params = {0};
|
||||||
RDIM_BakeParams dwarf_bake_params = {0};
|
RDIM_BakeParams dwarf_bake_params = {0};
|
||||||
|
RDIM_BakeParams dwarf_bake_params_2 = {0};
|
||||||
typedef struct RDIM_BakeParamsNode RDIM_BakeParamsNode;
|
typedef struct RDIM_BakeParamsNode RDIM_BakeParamsNode;
|
||||||
struct RDIM_BakeParamsNode
|
struct RDIM_BakeParamsNode
|
||||||
{
|
{
|
||||||
@@ -891,11 +892,11 @@ rb_thread_entry_point(void *p)
|
|||||||
String8 raw_sections = str8_substr(exe_data, pe.section_table_range);
|
String8 raw_sections = str8_substr(exe_data, pe.section_table_range);
|
||||||
COFF_SectionHeader *section_table = str8_deserial_get_raw_ptr(raw_sections, 0, sizeof(COFF_SectionHeader) * pe.section_count);
|
COFF_SectionHeader *section_table = str8_deserial_get_raw_ptr(raw_sections, 0, sizeof(COFF_SectionHeader) * pe.section_count);
|
||||||
String8 string_table = str8_substr(exe_data, pe.string_table_range);
|
String8 string_table = str8_substr(exe_data, pe.string_table_range);
|
||||||
convert_params.arch = pe.arch;
|
convert_params_2.arch = pe.arch;
|
||||||
convert_params.base_vaddr = pe.image_base;
|
convert_params_2.base_vaddr = pe.image_base;
|
||||||
convert_params.raw = dw_input_from_coff_section_table(scratch.arena, exe_data, string_table, pe.section_count, section_table);
|
convert_params_2.raw = dw_input_from_coff_section_table(scratch.arena, exe_data, string_table, pe.section_count, section_table);
|
||||||
convert_params.path_style = PathStyle_WindowsAbsolute;
|
convert_params_2.path_style = PathStyle_WindowsAbsolute;
|
||||||
convert_params.binary_sections = c2r_rdi_binary_sections_from_coff_sections(arena, exe_data, string_table, pe.section_count, section_table);
|
convert_params_2.binary_sections = c2r_rdi_binary_sections_from_coff_sections(arena, exe_data, string_table, pe.section_count, section_table);
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}break;
|
}break;
|
||||||
case ExecutableImageKind_Elf32:
|
case ExecutableImageKind_Elf32:
|
||||||
@@ -903,18 +904,18 @@ rb_thread_entry_point(void *p)
|
|||||||
{
|
{
|
||||||
Temp scratch = scratch_begin(&arena, 1);
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
ELF_Bin bin = elf_bin_from_data(scratch.arena, dbg_data);
|
ELF_Bin bin = elf_bin_from_data(scratch.arena, dbg_data);
|
||||||
convert_params.arch = arch_from_elf_machine(bin.hdr.e_machine);
|
convert_params_2.arch = arch_from_elf_machine(bin.hdr.e_machine);
|
||||||
convert_params.base_vaddr = elf_base_addr_from_bin(&bin);
|
convert_params_2.base_vaddr = elf_base_addr_from_bin(&bin);
|
||||||
convert_params.raw = dw_input_from_elf_bin(scratch.arena, dbg_data, &bin);
|
convert_params_2.raw = dw_input_from_elf_bin(scratch.arena, dbg_data, &bin);
|
||||||
convert_params.path_style = PathStyle_UnixAbsolute;
|
convert_params_2.path_style = PathStyle_UnixAbsolute;
|
||||||
convert_params.binary_sections = e2r_rdi_binary_sections_from_elf_section_table(arena, dbg_data, &bin, &bin.shdrs);
|
convert_params_2.binary_sections = e2r_rdi_binary_sections_from_elf_section_table(arena, dbg_data, &bin, &bin.shdrs);
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
convert_params.exe_name = exe_name;
|
convert_params_2.exe_name = exe_name;
|
||||||
convert_params.exe_data = exe_data;
|
convert_params_2.exe_data = exe_data;
|
||||||
convert_params.subset_flags = subset_flags;
|
convert_params_2.subset_flags = subset_flags;
|
||||||
convert_params.deterministic = cmd_line_has_flag(cmdline, str8_lit("deterministic"));
|
convert_params_2.deterministic = cmd_line_has_flag(cmdline, str8_lit("deterministic"));
|
||||||
}
|
}
|
||||||
ProfScope("convert [2]") dwarf_bake_params_2 = d2r2_convert(arena, &convert_params_2);
|
ProfScope("convert [2]") dwarf_bake_params_2 = d2r2_convert(arena, &convert_params_2);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -190,7 +190,6 @@ str8_lit_comp(
|
|||||||
"uniform vec4 rect;\n"
|
"uniform vec4 rect;\n"
|
||||||
"uniform vec4 corner_radii_px;\n"
|
"uniform vec4 corner_radii_px;\n"
|
||||||
"uniform vec2 viewport_size;\n"
|
"uniform vec2 viewport_size;\n"
|
||||||
"uniform int blur_count;\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"out vec2 texcoord;\n"
|
"out vec2 texcoord;\n"
|
||||||
"out vec2 sdf_sample_pos;\n"
|
"out vec2 sdf_sample_pos;\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user