-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling Tracy profiling when Tracy is already used #516
Comments
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Hey, always happy to hear about new integrations, and looks like a very cool project. Yeah, we can definitely improve how we include Tracy. I mostly thought of the integration as an internal profiling tool, but I can see how it could be useful from client projects too. I'll take a look at it. What do you think about the overloaded global new/delete operators, I guess this isn't a great idea to have enabled with external projects, or what are your thoughts? For reference, its integration has also been discussed as part of: #446 (comment). |
(ops, sorry for a bit of spam caused by tagging this issue in commit I amended a bunch of times)
Thank you! We are very early in integration, and I don't know how zones-heavy is the library code but overall I hoped that having it on both places (and we also have enabled tracy lua integration so people can easily add zones from scripting side) can help paint a very detailed picture on where perf goes and get a better feeling about cost of certain things.
I think I would leave it to the projects, we currently already do exactly the same thing in engine but also it's controlled by build option because it can get pretty heavy to profile all memory allocations in our case, and it's disabled in our default profiling enabled builds. Thanks for linking that PR! |
…iling markers, solves #516 Tracy client can now be included in one of three ways, in prioritized order: 1. Using target Tracy::TracyClient from parent project. 2. As a config package. 3. With Tracy source files located in 'Dependencies/Tracy'. Adds three new CMake options: - `RMLUI_TRACY_PROFILING`: Enable profiling, replaces the old option `ENABLE_TRACY_PROFILING`. - `RMLUI_TRACY_MEMORY_PROFILING`: Overloads global operator new/delete for memory inspection. - `RMLUI_TRACY_CONFIGURATION`: Only relevant for multi-config generators. If enabled, adds Tracy as a separate configuration, otherwise adds Tracy to all configurations.
Just made a new pull request #518 attempting to resolve this one, could you test and review? :) |
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
…iling markers, solves #516 Tracy client can now be included in one of three ways, in prioritized order: 1. Using target Tracy::TracyClient from parent project. 2. As a config package. 3. With Tracy source files located in 'Dependencies/Tracy'. Adds three new CMake options: - `RMLUI_TRACY_PROFILING`: Enable profiling, replaces the old option `ENABLE_TRACY_PROFILING`. - `RMLUI_TRACY_MEMORY_PROFILING`: Overloads global operator new/delete for memory inspection. - `RMLUI_TRACY_CONFIGURATION`: Only relevant for multi-config generators. If enabled, adds Tracy as a separate configuration, otherwise adds Tracy to all configurations.
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
…iling markers, solves #516 Tracy client can now be included in one of three ways, in prioritized order: 1. Using target Tracy::TracyClient from parent project. 2. As a config package. 3. With Tracy source files located in 'Dependencies/Tracy'. Adds three new CMake options: - `RMLUI_TRACY_PROFILING`: Enable profiling, replaces the old option `ENABLE_TRACY_PROFILING`. - `RMLUI_TRACY_MEMORY_PROFILING`: Overloads global operator new/delete for memory inspection. - `RMLUI_TRACY_CONFIGURATION`: Only relevant for multi-config generators. If enabled, adds Tracy as a separate configuration, otherwise adds Tracy to all configurations. Cherry-picked from 3b75dca
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516
* Add RmlUi to build system Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516 * render first light * remove sdl2_image * VFS system integration * rmlui lua and sdl integration * rmlui reload support and better luaui integration * delete extra file * Temporarily switch to RmlUi branch with tracy integration fixed * data model change detection bad edition * fix for chobby support, better binds, translation table * key event handling, luaui reloading, rmlsol bug fixes * remove rml demo files * create contexts lua side * clean up comments * allow multiple rmlui contexts * pull out inner loop of processevent calls * add comment to make it clear certain events are not captured * Update RmlUi to latest git version * headless building and lua support * add lunasvg submodule * update lunasvg version * reset build option * didnt need to build lunasvg as a shared lib * fix: uint is not standard and breaks mingw compile * Rework RmlSolLua integration into build This fixes the build under mingw that didn't work because of broken linking. - Cleanup messu include_target_directories replacing with proper linking of targets. Had to fix the include target directories for lua lib - Undo merging of the public and private interfaces, and separate public interface of the library - Stop appending the include dir directly to engine include dirs and stop using absolute path based references when referencing. * Fix RmlSolLua compilation under MSVC - Designated initializers are C++20 feature, so we need to bump to that version - Element.cpp generates huge amount of sections, so adding /bigobj switch for it. * Document the mouse press check * Change size() < 1 to empty. Move setActive after processContext loop * Deeper MouseHandler integration for processing mouse events * Fix software rendered mouse cursor * Missed half of the move of this comment * make lua binding for RemoveContext * do less bullying of the RmlSolLua lib instead set up our own plugin to keep track of created/removed contexts * attempt to add thread safety to RmlGui::data->context accesses allow RmlUI to properly set cursors have RmlUI input events take precedence after other inputs (but after regular Lua input) * have RmlGui store what cursor it would like (or "" to cede control of it) and have the system check that. rename own custom Platform_SDL stuff to Platform_RTS clean up code here and there, undo changes to random files * Platform_RTS ended up being disliked, so re-renamed stuff to "RmlSystemInterface" and the namespace to "RmlSDLSpring" * check Rml input first * fix a singular character to be lowercase blargh * fix spelling * reference fix * use cbitmap texture binding * spaces to tabs with clang-format * mask lua macros * Remove unused variable * add an explicit removeLua call * accurate tracking of lua added items * move general Rml::Context watching plugin outside of Lua init/destroy get rid of never-going-to-be-used code in RmlUi_Renderer_GL3 rename file/class to RmlUi_Renderer_GL3_Spring since it's now more deeply integrated with Spring move VFSInterface to own files * left some mess in, sorry * Remove unnecessary includes * create new <texture> element which hooks into the existing LuaOpenGL/Texture code to be able to reuse already made textures * what if we just kept the texture handle away from Rml * clearer and more readable element tag name * misc changes - remove lua mentions in rml code - initial insertion of lua work from loveridge/rmlui-integration-fork - use translation table * copyright auto insert go brrr too hard * leave a note on the UI reload * move RmlSolLua out of the lib folder so that it can integrate more with the rest of the Spring engine * according to a tutorial, the proper implementation of the iterator concept looks like this * minor cleanup * minor cleanup as I investigate how Data Models work * use the configured lua_Number type instead of blindly assuming double * beginning refactor of RenderInterface * we can just use `glPush/PopAttrib()` here * narrow down to just the attrib bits needed * misc changes - give RmlUi lib code a double instead of a float for system time since that's what it's asking for make use of the Rml DataModel stricter - (disallow adding keys to an existing DataModel) * drop element render hook * untested custom Rml Decorator: 'lua-render' (name not final) * rml lua-render decorator barely functional use like so <div style="decorator: lua-render(callback_name_here)"/> * remove redundant Log binding from SolLua Get the Rml_MathTypes_Conversions.h working * many changes * Actually add submodules * Fix g++ compilation * just use one shader program, copy in documentation comments to make working on the render interface easier * SolLua binding "low hanging fruit" cleanup * make all the RmlUi Lua bindings into a "RmlUi" namespace table to better the other lua bindings add setup files to cont folder * add Mouse Cursor Aliases feature * use <texture> instead of <lua-texture> as LuaTextureElement tag name * add mouse cursor alias stuff to example rml_setup.lua * touch up rml_setup.lua * without the render_interface being 100% finalized, it is too early for DecoratorLuaRender to exist (made fork that still has it though) * get rid of extraneous whitespace changes * replace space indenting with tab indenting * RmlGui::Initialize gets own globals + allow Reload to init * clean up/fixing of init/shutdown/Context removal remove SDLWindow/Context ref since they are not used in the end keep Rml Interfaces alive until after Rml::Shutdown is called() defer removal of Rml::Context objects, this allows for the removal of the guarding mutex * tidy event handling + more include context removal in #ifndef HEADLESS comment on why Update() is ran in RemoveLua() * Replace README.md with notice of where the code came from * Add MIT license info to almost all Rml/SolLua source files * add support for border-radius property to ElementLuaTexture.cpp * recalc geometry when rect attribute is set to (blank) * create lua hook for the RmlUi debugger * context ordering, rm PasThrPlugin, data > state Allow changing the order of contexts in the state->contexts vector clicked context is brought to front, but debug context (if exists) is always at the very front PassThroughPlugin was a redundant abstraction BackendState sounds better now that it's a class and not a struct * fix debugger use-after-free crash * remove contexts last in update * fix crash in StyleProxy iteration * add returns from element hierarchy manip bindings * code style tidying * allow nil and blank strings to clear a property * Fix whitespace * Remove lua mask/restore macros as fix is on BAR105 * bump to rmlui repo latest * use renamed RMLUI_ option * use new RmlUi target names * Create Uniform*v variants that take a "count" parameter * Initial update to RmlUi 6. Code is compiling. * interface with Shader API correctly * better init logging * update "is initialized" check * code/formatting cleanup * sidestep the RmlUi resource handling to render the texture and geometry directly * remove outdated comment * fix use-after-free issue by removing debugger before shutting down lua * size of a non-table is 0 actually * RmlUi log pretty useful actually * Don't deactivate the shader if TexturePostprocess is used * ensure that RmlUi can be loaded after changing UI Size option * bump RmlUi for flexbox gap feature * inline rgba Colour binding macro * remove outdated commented-out code * update headless render interface stub * (whitespace) correct accidental tab * update RmlUi to official 6.0 release * update backend files with updates made to the originals --------- Co-authored-by: loveridge <[email protected]> Co-authored-by: sprunk <[email protected]> Co-authored-by: ChrisClark13 <[email protected]> Co-authored-by: LHoG <[email protected]>
* Add RmlUi to build system Not all is ready and there will be more work needed on build system, but the basic integration of RmlUi Core is done. - I've not created and linked any of the provided GL3 or SDL backends, that needs separate work - Lua bindings are blocked on mikke89/RmlUi#302 we need to find some workaround for that - Tracy integration is blocked on mikke89/RmlUi#516 * render first light * remove sdl2_image * VFS system integration * rmlui lua and sdl integration * rmlui reload support and better luaui integration * delete extra file * Temporarily switch to RmlUi branch with tracy integration fixed * data model change detection bad edition * fix for chobby support, better binds, translation table * key event handling, luaui reloading, rmlsol bug fixes * remove rml demo files * create contexts lua side * clean up comments * allow multiple rmlui contexts * pull out inner loop of processevent calls * add comment to make it clear certain events are not captured * Update RmlUi to latest git version * headless building and lua support * add lunasvg submodule * update lunasvg version * reset build option * didnt need to build lunasvg as a shared lib * fix: uint is not standard and breaks mingw compile * Rework RmlSolLua integration into build This fixes the build under mingw that didn't work because of broken linking. - Cleanup messu include_target_directories replacing with proper linking of targets. Had to fix the include target directories for lua lib - Undo merging of the public and private interfaces, and separate public interface of the library - Stop appending the include dir directly to engine include dirs and stop using absolute path based references when referencing. * Fix RmlSolLua compilation under MSVC - Designated initializers are C++20 feature, so we need to bump to that version - Element.cpp generates huge amount of sections, so adding /bigobj switch for it. * Document the mouse press check * Change size() < 1 to empty. Move setActive after processContext loop * Deeper MouseHandler integration for processing mouse events * Fix software rendered mouse cursor * Missed half of the move of this comment * make lua binding for RemoveContext * do less bullying of the RmlSolLua lib instead set up our own plugin to keep track of created/removed contexts * attempt to add thread safety to RmlGui::data->context accesses allow RmlUI to properly set cursors have RmlUI input events take precedence after other inputs (but after regular Lua input) * have RmlGui store what cursor it would like (or "" to cede control of it) and have the system check that. rename own custom Platform_SDL stuff to Platform_RTS clean up code here and there, undo changes to random files * Platform_RTS ended up being disliked, so re-renamed stuff to "RmlSystemInterface" and the namespace to "RmlSDLSpring" * check Rml input first * fix a singular character to be lowercase blargh * fix spelling * reference fix * use cbitmap texture binding * spaces to tabs with clang-format * mask lua macros * Remove unused variable * add an explicit removeLua call * accurate tracking of lua added items * move general Rml::Context watching plugin outside of Lua init/destroy get rid of never-going-to-be-used code in RmlUi_Renderer_GL3 rename file/class to RmlUi_Renderer_GL3_Spring since it's now more deeply integrated with Spring move VFSInterface to own files * left some mess in, sorry * Remove unnecessary includes * create new <texture> element which hooks into the existing LuaOpenGL/Texture code to be able to reuse already made textures * what if we just kept the texture handle away from Rml * clearer and more readable element tag name * misc changes - remove lua mentions in rml code - initial insertion of lua work from loveridge/rmlui-integration-fork - use translation table * copyright auto insert go brrr too hard * leave a note on the UI reload * move RmlSolLua out of the lib folder so that it can integrate more with the rest of the Spring engine * according to a tutorial, the proper implementation of the iterator concept looks like this * minor cleanup * minor cleanup as I investigate how Data Models work * use the configured lua_Number type instead of blindly assuming double * beginning refactor of RenderInterface * we can just use `glPush/PopAttrib()` here * narrow down to just the attrib bits needed * misc changes - give RmlUi lib code a double instead of a float for system time since that's what it's asking for make use of the Rml DataModel stricter - (disallow adding keys to an existing DataModel) * drop element render hook * untested custom Rml Decorator: 'lua-render' (name not final) * rml lua-render decorator barely functional use like so <div style="decorator: lua-render(callback_name_here)"/> * remove redundant Log binding from SolLua Get the Rml_MathTypes_Conversions.h working * many changes * Actually add submodules * Fix g++ compilation * just use one shader program, copy in documentation comments to make working on the render interface easier * SolLua binding "low hanging fruit" cleanup * make all the RmlUi Lua bindings into a "RmlUi" namespace table to better the other lua bindings add setup files to cont folder * add Mouse Cursor Aliases feature * use <texture> instead of <lua-texture> as LuaTextureElement tag name * add mouse cursor alias stuff to example rml_setup.lua * touch up rml_setup.lua * without the render_interface being 100% finalized, it is too early for DecoratorLuaRender to exist (made fork that still has it though) * get rid of extraneous whitespace changes * replace space indenting with tab indenting * RmlGui::Initialize gets own globals + allow Reload to init * clean up/fixing of init/shutdown/Context removal remove SDLWindow/Context ref since they are not used in the end keep Rml Interfaces alive until after Rml::Shutdown is called() defer removal of Rml::Context objects, this allows for the removal of the guarding mutex * tidy event handling + more include context removal in #ifndef HEADLESS comment on why Update() is ran in RemoveLua() * Replace README.md with notice of where the code came from * Add MIT license info to almost all Rml/SolLua source files * add support for border-radius property to ElementLuaTexture.cpp * recalc geometry when rect attribute is set to (blank) * create lua hook for the RmlUi debugger * context ordering, rm PasThrPlugin, data > state Allow changing the order of contexts in the state->contexts vector clicked context is brought to front, but debug context (if exists) is always at the very front PassThroughPlugin was a redundant abstraction BackendState sounds better now that it's a class and not a struct * fix debugger use-after-free crash * remove contexts last in update * fix crash in StyleProxy iteration * add returns from element hierarchy manip bindings * code style tidying * allow nil and blank strings to clear a property * Fix whitespace * Remove lua mask/restore macros as fix is on BAR105 * bump to rmlui repo latest * use renamed RMLUI_ option * use new RmlUi target names * Create Uniform*v variants that take a "count" parameter * Initial update to RmlUi 6. Code is compiling. * interface with Shader API correctly * better init logging * update "is initialized" check * code/formatting cleanup * sidestep the RmlUi resource handling to render the texture and geometry directly * remove outdated comment * fix use-after-free issue by removing debugger before shutting down lua * size of a non-table is 0 actually * RmlUi log pretty useful actually * Don't deactivate the shader if TexturePostprocess is used * ensure that RmlUi can be loaded after changing UI Size option * bump RmlUi for flexbox gap feature * inline rgba Colour binding macro * remove outdated commented-out code * update headless render interface stub * (whitespace) correct accidental tab * update RmlUi to official 6.0 release * update backend files with updates made to the originals --------- Co-authored-by: loveridge <[email protected]> Co-authored-by: sprunk <[email protected]> Co-authored-by: ChrisClark13 <[email protected]> Co-authored-by: LHoG <[email protected]>
I'm working on adding RmlUi to build of engine used by https://www.beyondallreason.info/. The issue I've ran into is that we are already using Tracy for profiling our engine, we include it and link the
TracyClient
target exported by library.Unfortunately it looks like we can't have Tracy enabled for both our engine and RmlUi because RmlUi is literally including the tracy cpp file in https://github.com/mikke89/RmlUi/blob/master/Source/Core/Profiling.cpp When linking, this is breaking the One Definition Rule.
RmlUi should allow to link to the tracy client that is already used in the program that integrates it.
The text was updated successfully, but these errors were encountered: