From aabe67b66267cea431f5936a2b3a9c38ed94eaff Mon Sep 17 00:00:00 2001 From: quou Date: Wed, 1 Jan 2025 10:37:39 +1100 Subject: device debug interface --- video.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'video.hpp') diff --git a/video.hpp b/video.hpp index 2148d8f..bc57f1f 100644 --- a/video.hpp +++ b/video.hpp @@ -408,17 +408,37 @@ struct Vertex_Format_Desc { int attribute_count; }; +struct Device; +struct Context; +struct Device_Debug_Hooks { + Device* dev; + virtual void on_rpo_create(const Render_Pass& rpo); + virtual void on_rpo_destroy(const Render_Pass& rpo); + virtual void on_fbo_create(const Render_Pass& pass); + virtual void on_fbo_destroy(const Render_Pass& pass); + virtual void on_pso_create(const Pipeline& pso); + virtual void on_pso_destroy(const Pipeline& pso); + virtual void on_dso_create(const Pipeline& pso); + virtual void on_dso_destroy(const Pipeline& pso); + virtual void on_acquire(Context& ctx); + virtual void on_submit(Context& ctx); + virtual void on_present(Context& ctx); +}; + struct Context; struct Shader; struct Device { Arena* arena; Heap* heap; App* app; + Device_Debug_Hooks* hooks; static Device* create(Arena* a, App* ap); void init(Arena* a, App* ap); void destroy(); + void register_hooks(Device_Debug_Hooks* hooks); + void on_resize(); void begin_frame(); -- cgit v1.2.3-54-g00ecf