Comments (13)
I haven't worked with Metal for years, now, so unable to check its status (no HW to test).
We have multiple Metal users at the moment so hopefully some fixes will come through.
PRs are always welcome.
from remotery.
Understandable. Actually 1.0 is also not working. Seems like some major changes broke most of it. On a first quick look I can see that some calls are not the right size of parameters etc.
Using the CPU only side of the tool, it looks pretty awesome though :-)
I just wanted something quick, since I've been using Microprofile and there is no Metal. Neither does it exist in Tracy.
from remotery.
A quick look over the code doesn't point to anything obvious.
It's unfortunate that you can only sample Metal at the command buffer level, though. But I guess that's tiled GPUs for you.
from remotery.
I did this in the main file and some other stuff in the .m file.
It seems to work, but hits an assert on shutdown.
assert(allocator->nb_inuse == 0); // remotery.c ObjectAllocator_Destructor
9514c9514
< rmtTryMallocArray(Metal, *metal);
---
> rmtTryMalloc(Metal, *metal);
9519c9519,9520
< return error;
---
> //return error;
> return RMT_ERROR_NONE;
9646c9647
< RMT_API void _rmt_BeginMetalSample(rmtPStr name, rmtU32* hash_cache)
---
> RMT_API rmtError _rmt_BeginMetalSample(rmtPStr name, rmtU32* hash_cache)
9651c9652
< return;
---
> return RMT_ERROR_UNKNOWN;
9663d9663
< rmtError error;
9666,9667d9665
< if (error != RMT_ERROR_NONE)
< return;
9677a9676
> return RMT_ERROR_NONE;
from remotery.
Yeah, that's a known assert and not caused by your change. Safe to comment it out as it's really only for debug to track unreleased allocations.
from remotery.
Okay got it.
Btw, not sure if I broke this, but properties don't show up in the web GUI.
rmt_PropertyDefine_U64(entityCount, 0, NoFlags, "Entity Count");
void gameupdate(int frameNumber)
{
rmt_PropertySet_U64(entityCount, world.size());
}
from remotery.
You need to call these once at the end of each of your frames:
rmt_PropertySnapshotAll();
rmt_PropertyFrameResetAll();
from remotery.
Okay good. Out of context here but in case I get the time to commit this, making sure I understand all.
from remotery.
Right now that API is in flux because I'm uncomfortable requiring people call a per-frame function to kick this all off. However, there's no way to do automatic frame resets of some of your properties if you don't tell Remotery when your frame is.
from remotery.
Still nothing shows up. I tried to put them in all threads.
from remotery.
Those calls need to be only on one of your main threads. This is very odd; we have builds across all of the Apple platforms showing properties at the moment. What happens if you add it to a group?
rmt_PropertyDefine_Group(Groupy, "Groupy");
rmt_PropertyDefine_U64(entityCount, 0, NoFlags, "Entity Count", &Groupy);
from remotery.
Nothing.
rmt_PropertyDefine_Group(GamePlay, "GamePlay");
rmt_PropertyDefine_U64(entityCount, 0, NoFlags, "Entity Count", &GamePlay);
// gameplay thread func
void gameupdate(int frameNumber)
{
//Log::debug("gameplay frame %llu", frameNumber);
rmt_PropertySet_U64(entityCount, world.size());
}
rmt_SetCurrentThreadName("Main");
while (running)
{
rmt_MarkFrame();
rmt_BeginCPUSample(EventLoop, 0);
// do stuff
rmt_EndCPUSample();
rmt_PropertySnapshotAll();
rmt_PropertyFrameResetAll();
}
I am on main branch.
from remotery.
Thanks for you help on this, I have copied over your fixes.
If you are still having issues with properties, can you compile and run sample/dump.c
and see if it works? If so, try to copy what it's doing. If nothing works, please open a new Issue.
from remotery.
Related Issues (20)
- Remotery build error under windows10 HOT 1
- Apps targeting Android 10 cannot directly use ashmem (/dev/ashmem) HOT 2
- Sample window font in Firefox (macOS) is blurry HOT 9
- Shrink LFSR static data HOT 1
- Complie Error: `TIMERR_NOERROR` not found when complie under windows 11 HOT 1
- Assert when destroying global instance while sample tree isn't empty HOT 6
- Q: Possibility to use without memory mapping? HOT 6
- GetInt64 and GetUInt64 return float64 HOT 3
- Android build failing HOT 2
- Thread Sanitizer data race issues. HOT 1
- How to use in Sample? HOT 7
- Failure to load on Firefox when opening locally, GLSL files blocked due to MIME type
- MINGW-64 does not seem to define _M_AMD64 or _M_X64 HOT 1
- .NET bindings
- Crash on shutdown if rmt_DestroyGlobalInstance is called right after initialization without delay. HOT 2
- Dynamic samples not showing up the name HOT 1
- Duplicate function bodies with both D3D12 and Vulkan enabled HOT 1
- example: How to get `CPU load` for `current process` (app itself)?
- Q: Is it feasible to run on a single thread? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remotery.