I’ve built a UI in a scene and I get this message on some of my images (saved as Sprites 2D, see picture):
Non-matching Profiler.EndSample (Every EndSample call must have a preceding BeginSample call within the same frame): Gfx.UploadTexture
Previous 5 samples:
Gfx.CreateTexture
RenderLoop
Semaphore.WaitForSignal
Gfx.WaitForGfxCommandsFromMainThread
Gfx.UploadTexture
In the scope:
RenderLoop
I first thought enabling Read/Write would solve this issue but that didn’t fix it. Also strange, it doesn’t happen every time. Sometimes everything works as usual.
I never saw this error and am kinda lost. Does anyone know why this happens?
This isn’t a 2D or XR thing, this profiler marker is related to the GFX device stuff (looks like it’s used in a GFX worker thread) when it’s processing a GFX command uploading a texture. Not my area though so I cannot advise further but it’s definately a bug in the profiler/GFX stuff.
I’d say report it as a bug and in the very least, add the callstack you’re seeing.
My project is very large and not suitable to upload for bug reproduction, but I will try to create a project with the bare essentials to reproduce the bug.
Have you searched all C# scripts in your project to make sure you don’t have something calling Profiler.BeginSample() without a matching call to Profiler.EndSample()?