panel rework wip
This commit is contained in:
parent
2f4a7f74b5
commit
c95168b24a
@ -660,7 +660,7 @@ extern G_D12_Ctx G_D12;
|
|||||||
extern ThreadLocal G_D12_ThreadLocalCtx G_D12_tl;
|
extern ThreadLocal G_D12_ThreadLocalCtx G_D12_tl;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//~ Pix debug marker API
|
//~ Pix debug events API
|
||||||
|
|
||||||
#define G_D12_PixApiXList(X) \
|
#define G_D12_PixApiXList(X) \
|
||||||
X(PIXBeginEventOnCommandList, void, (ID3D12GraphicsCommandList* commandList, UINT64 color, _In_ PCSTR formatString)) \
|
X(PIXBeginEventOnCommandList, void, (ID3D12GraphicsCommandList* commandList, UINT64 color, _In_ PCSTR formatString)) \
|
||||||
@ -671,7 +671,7 @@ extern ThreadLocal G_D12_ThreadLocalCtx G_D12_tl;
|
|||||||
DeclApiFromXList(G_D12_PixApi, G_D12_PixApiXList, "WinPixEventRuntime.dll");
|
DeclApiFromXList(G_D12_PixApi, G_D12_PixApiXList, "WinPixEventRuntime.dll");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//~ AMD GPU Service debug marker API
|
//~ AMD GPU Service debug events API
|
||||||
|
|
||||||
#define G_D12_AgsApiXList(X) \
|
#define G_D12_AgsApiXList(X) \
|
||||||
X(agsGetVersionNumber, i32, (void)) \
|
X(agsGetVersionNumber, i32, (void)) \
|
||||||
|
|||||||
@ -96,8 +96,8 @@ Struct(G_IndexBufferDesc)
|
|||||||
|
|
||||||
#if IsGpu
|
#if IsGpu
|
||||||
// TODO: Add explicit uniform-dereference variations, since on AMD hardware
|
// TODO: Add explicit uniform-dereference variations, since on AMD hardware
|
||||||
// non-uniform is slower and there are some shader-compilation issues in older
|
// non-uniform is slower and there are some related shader-compilation bugs
|
||||||
// driver versions
|
// in older driver versions
|
||||||
|
|
||||||
template<typename R> struct G_DerefImpl;
|
template<typename R> struct G_DerefImpl;
|
||||||
template<> struct G_DerefImpl< SamplerState > { static SamplerState Deref(G_SamplerRef r) { return ResourceDescriptorHeap[NonUniformResourceIndex(r.v)]; } };
|
template<> struct G_DerefImpl< SamplerState > { static SamplerState Deref(G_SamplerRef r) { return ResourceDescriptorHeap[NonUniformResourceIndex(r.v)]; } };
|
||||||
@ -112,7 +112,6 @@ Struct(G_IndexBufferDesc)
|
|||||||
template<typename T> struct G_DerefImpl< RWTexture2D<T> > { static RWTexture2D<T> Deref(G_TextureRef r, u32 mip=0) { return ResourceDescriptorHeap[NonUniformResourceIndex(r.v + (mip * 2) + 1)]; } };
|
template<typename T> struct G_DerefImpl< RWTexture2D<T> > { static RWTexture2D<T> Deref(G_TextureRef r, u32 mip=0) { return ResourceDescriptorHeap[NonUniformResourceIndex(r.v + (mip * 2) + 1)]; } };
|
||||||
template<typename T> struct G_DerefImpl< RWTexture3D<T> > { static RWTexture3D<T> Deref(G_TextureRef r, u32 mip=0) { return ResourceDescriptorHeap[NonUniformResourceIndex(r.v + (mip * 2) + 1)]; } };
|
template<typename T> struct G_DerefImpl< RWTexture3D<T> > { static RWTexture3D<T> Deref(G_TextureRef r, u32 mip=0) { return ResourceDescriptorHeap[NonUniformResourceIndex(r.v + (mip * 2) + 1)]; } };
|
||||||
|
|
||||||
// Wrap since HLSL can't handle template double angle bracket '>>'
|
|
||||||
#define G_Deref(ref, type, ...) (G_DerefImpl< type >::Deref((ref), ##__VA_ARGS__))
|
#define G_Deref(ref, type, ...) (G_DerefImpl< type >::Deref((ref), ##__VA_ARGS__))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -275,7 +274,8 @@ Struct(G_FmtArg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define G_PrintF_(fmt, ...) do { \
|
#define G_PrintF_(fmt, ...) \
|
||||||
|
do { \
|
||||||
G_TempPrintBuffer __tmp; \
|
G_TempPrintBuffer __tmp; \
|
||||||
__tmp.bytes_count = 0; \
|
__tmp.bytes_count = 0; \
|
||||||
__tmp.overflowed = 0; \
|
__tmp.overflowed = 0; \
|
||||||
|
|||||||
@ -547,8 +547,8 @@ void M_BuildEntryPoint(WaveLaneCtx *lane)
|
|||||||
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4200")); // nonstandard extension used: zero-sized array in struct/union
|
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4200")); // nonstandard extension used: zero-sized array in struct/union
|
||||||
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4702")); // unreachable code
|
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4702")); // unreachable code
|
||||||
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4305")); // 'initializing': truncation from 'double' to 'f32'
|
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4305")); // 'initializing': truncation from 'double' to 'f32'
|
||||||
|
|
||||||
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4152")); // nonstandard extension, function/data pointer conversion in expression
|
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4152")); // nonstandard extension, function/data pointer conversion in expression
|
||||||
|
PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4223")); // nonstandard extension, function/data pointer conversion in expression
|
||||||
|
|
||||||
// PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4127")); // conditional expression is constant
|
// PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4127")); // conditional expression is constant
|
||||||
// PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4820")); // bytes padding added after data member
|
// PushStringToList(perm, &cp.warnings_msvc, Lit("-wd4820")); // bytes padding added after data member
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -62,6 +62,10 @@ Struct(V_WidgetTheme)
|
|||||||
Vec4 window_bd;
|
Vec4 window_bd;
|
||||||
Vec4 divider;
|
Vec4 divider;
|
||||||
|
|
||||||
|
Vec4 panel_bg;
|
||||||
|
Vec4 panel_bd;
|
||||||
|
f32 panel_opacity;
|
||||||
|
|
||||||
Vec4 button;
|
Vec4 button;
|
||||||
Vec4 button_hot;
|
Vec4 button_hot;
|
||||||
Vec4 button_active;
|
Vec4 button_active;
|
||||||
@ -304,49 +308,92 @@ Struct(V_Profiler)
|
|||||||
f64 drag_cursor_px;
|
f64 drag_cursor_px;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
//~ Window types
|
|
||||||
|
|
||||||
// TODO: Move boolean fields into bitwise property flags
|
|
||||||
|
|
||||||
Struct(V_Panel)
|
|
||||||
{
|
|
||||||
V_Panel *parent;
|
|
||||||
V_Panel *next;
|
|
||||||
V_Panel *prev;
|
|
||||||
V_Panel *first;
|
|
||||||
V_Panel *last;
|
|
||||||
i64 count;
|
|
||||||
|
|
||||||
UI_Key key;
|
|
||||||
UI_Key divider_key;
|
|
||||||
|
|
||||||
f32 pref_ratio;
|
|
||||||
b32 resizing;
|
|
||||||
|
|
||||||
Axis axis;
|
|
||||||
|
|
||||||
b32 is_organizing_panel;
|
|
||||||
b32 is_vis_ui_panel;
|
|
||||||
b32 is_editor_panel;
|
|
||||||
|
|
||||||
i64 active_window_idx;
|
|
||||||
i64 windows_count;
|
|
||||||
struct V_Window *first_window;
|
|
||||||
struct V_Window *last_window;
|
|
||||||
};
|
|
||||||
|
|
||||||
Struct(V_Window)
|
|
||||||
{
|
|
||||||
V_Panel *panel;
|
|
||||||
V_Window *next_in_panel;
|
|
||||||
V_Window *prev_in_panel;
|
|
||||||
|
|
||||||
UI_Key key;
|
|
||||||
|
|
||||||
b32 is_tile_window;
|
|
||||||
b32 is_prefab_window;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ////////////////////////////////////////////////////////////
|
||||||
|
// //~ Window types
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// // TODO: Remove this
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// // TODO: Move boolean fields into bitwise property flags
|
||||||
|
|
||||||
|
// Struct(V_Panel)
|
||||||
|
// {
|
||||||
|
// V_Panel *parent;
|
||||||
|
// V_Panel *next;
|
||||||
|
// V_Panel *prev;
|
||||||
|
// V_Panel *first;
|
||||||
|
// V_Panel *last;
|
||||||
|
// i64 count;
|
||||||
|
|
||||||
|
// UI_Key key;
|
||||||
|
// UI_Key divider_key;
|
||||||
|
|
||||||
|
// f32 pref_ratio;
|
||||||
|
// b32 resizing;
|
||||||
|
|
||||||
|
// Axis axis;
|
||||||
|
|
||||||
|
// b32 is_organizing_panel;
|
||||||
|
// b32 is_vis_ui_panel;
|
||||||
|
// b32 is_editor_panel;
|
||||||
|
|
||||||
|
// i64 active_window_idx;
|
||||||
|
// i64 windows_count;
|
||||||
|
// struct V_Window *first_window;
|
||||||
|
// struct V_Window *last_window;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// Struct(V_Window)
|
||||||
|
// {
|
||||||
|
// V_Panel *panel;
|
||||||
|
// V_Window *next_in_panel;
|
||||||
|
// V_Window *prev_in_panel;
|
||||||
|
|
||||||
|
// UI_Key key;
|
||||||
|
|
||||||
|
// b32 is_tile_window;
|
||||||
|
// b32 is_prefab_window;
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//~ Draw types
|
//~ Draw types
|
||||||
@ -446,12 +493,24 @@ Struct(V_Ctx)
|
|||||||
V_ZoneTrack *first_zone_track;
|
V_ZoneTrack *first_zone_track;
|
||||||
V_ZoneTrack *last_zone_track;
|
V_ZoneTrack *last_zone_track;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
P_PublicState public_state;
|
P_PublicState public_state;
|
||||||
|
|
||||||
i64 panels_count;
|
|
||||||
i64 windows_count;
|
|
||||||
V_Panel *root_panel;
|
|
||||||
V_Window *dragging_window;
|
|
||||||
|
// i64 panels_count;
|
||||||
|
// i64 windows_count;
|
||||||
|
// V_Panel *root_panel;
|
||||||
|
// V_Window *dragging_window;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
i64 text_input_ns;
|
i64 text_input_ns;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user