box-targeted UI debug break cmd

This commit is contained in:
jacob 2026-04-03 11:42:25 -05:00
parent 48eb87aec8
commit d7ecdfb950
8 changed files with 2857 additions and 2636 deletions

View File

@ -14,7 +14,7 @@
//~ Tweakable definitions //~ Tweakable definitions
#define G_D12_TearingIsAllowed 1 #define G_D12_TearingIsAllowed 1
#define G_D12_FrameLatency 1 #define G_D12_FrameLatency 2
#define G_D12_SwapchainBufferCount 2 #define G_D12_SwapchainBufferCount 2
#define G_D12_SwapchainFlags ( \ #define G_D12_SwapchainFlags ( \
((G_D12_TearingIsAllowed != 0) * DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) | \ ((G_D12_TearingIsAllowed != 0) * DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) | \

File diff suppressed because it is too large Load Diff

View File

@ -109,6 +109,7 @@ void S_TickForever(WaveLaneCtx *lane)
////////////////////////////// //////////////////////////////
//- Swap //- Swap
ProfZoneDF("Swap sim state")
{ {
b32 swapin = IsSwappedIn(); b32 swapin = IsSwappedIn();
b32 swapout = shutdown && IsSwappingOut(); b32 swapout = shutdown && IsSwappingOut();
@ -166,6 +167,7 @@ void S_TickForever(WaveLaneCtx *lane)
NET_Listen(net_pipe, port); NET_Listen(net_pipe, port);
P_MsgList in_msgs = Zi; P_MsgList in_msgs = Zi;
ProfZoneDF("Pop net messages")
{ {
NET_MsgList net_msgs = NET_Swap(frame_arena, net_pipe); NET_MsgList net_msgs = NET_Swap(frame_arena, net_pipe);
for (NET_Msg *net_msg = net_msgs.first; net_msg; net_msg = net_msg->next) for (NET_Msg *net_msg = net_msgs.first; net_msg; net_msg = net_msg->next)

File diff suppressed because it is too large Load Diff

View File

@ -317,6 +317,7 @@ Enum(V_PanelFlag)
V_PanelFlag_None = 0, V_PanelFlag_None = 0,
V_PanelFlag_Spawn = (1 << 0), V_PanelFlag_Spawn = (1 << 0),
V_PanelFlag_Profiler = (1 << 1), V_PanelFlag_Profiler = (1 << 1),
V_PanelFlag_Console = (1 << 2),
}; };
Struct(V_Panel) Struct(V_Panel)

View File

@ -762,7 +762,8 @@ ComputeShader(V_CompositeCS)
Vec4 backdrop_color = 0; Vec4 backdrop_color = 0;
{ {
if (!frame.is_editing || !is_in_world) // if (!frame.is_editing || !is_in_world)
if (1)
{ {
backdrop_color = backdrop.SampleLevel(bilinear_sampler, screen_uv, 0); backdrop_color = backdrop.SampleLevel(bilinear_sampler, screen_uv, 0);
} }

File diff suppressed because it is too large Load Diff

View File

@ -262,6 +262,7 @@ Enum(UI_CmdKind)
{ {
UI_CmdKind_None, UI_CmdKind_None,
UI_CmdKind_BuildBox, UI_CmdKind_BuildBox,
UI_CmdKind_DebugBreak,
UI_CmdKind_SetRawTexture, UI_CmdKind_SetRawTexture,
}; };
@ -312,6 +313,11 @@ Struct(UI_Cmd)
{ {
UI_BoxDesc box; UI_BoxDesc box;
struct struct
{
UI_Key key;
UI_DebugBreakFlag flags;
} debug_break;
struct
{ {
UI_Key key; UI_Key key;
G_TextureRef tex; G_TextureRef tex;
@ -568,12 +574,16 @@ UI_Checkpoint UI_TopCp(void);
UI_Key UI_BuildBoxEx(UI_Key semantic_key); UI_Key UI_BuildBoxEx(UI_Key semantic_key);
#define UI_BuildBox() UI_BuildBoxEx(UI_NilKey) #define UI_BuildBox() UI_BuildBoxEx(UI_NilKey)
void UI_DebugBreak(UI_Key key, UI_DebugBreakFlag debug_break_flags);
void UI_SetRawTexture(UI_Key key, G_TextureRef tex, Rng2 uv); void UI_SetRawTexture(UI_Key key, G_TextureRef tex, Rng2 uv);
#if IsRtcEnabled #define UI_IsDebugBreakEnabled IsRtcEnabled
#define UI_DebugBreak(box, target_flags) do { if (box->desc.debug_break_flags & target_flags) { DEBUGBREAK; } } while (0)
#if UI_IsDebugBreakEnabled
#define UI_ExecuteDebugBreak(box, target_flags) do { if ((box)->desc.debug_break_flags & (target_flags)) { DEBUGBREAK; } } while (0)
#else #else
#define UI_DebugBreak(...) #define UI_ExecuteDebugBreak(...)
#endif #endif
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////