3
$\begingroup$

I am porting some code from Metal to OpenGL since we want to run our app on Windows too. Xcode is my preferred IDE, but the newer versions of Xcode do not support any OpenGL debugging.

Question: What do people usually use as a debugger for OpenGL? Eg: Frame capture on Metal is great and allows you to do shader debugging etc and nicely view the call hierarchy. Is there any thing similar for OpenGL?

If there are some good solutions on Windows, i can consider switching to Visual Studio.

$\endgroup$

2 Answers 2

4
$\begingroup$

There's nothing like frame capture for OpenGL on macOS, unfortunately. But there are 2 other tools that are useful for GL debugging: OpenGL Profiler and OpenGL Driver Monitor. You can read about them here. (Warning the images in the article are really old. They look like normal apps today without all the brushed metal, etc.) To download them, you need to log in to your developer account on developer.apple.com, click on "Downloads" on the left side. On the downloads page in the upper right is a tiny "more" link. If you click on that, you'll get the search tool. Enter "OpenGL Profiler" for your search and you'll be presented with a number of packages for different versions of Xcode. Choose the one that matches whichever version of Xcode you have. It's in the "Graphics Tools" section of the download.

OpenGL Profiler can show you the resources currently in use by a program. You can set breakpoints on any OpenGL call and when it breaks you can see all textures, shaders, FBOs, etc. and see what their contents are as well as all OpenGL state.

OpenGL Driver Monitor will graph over time how many textures are in use, or how much texture memory, etc. It can tell you the frequency of page-ons and page-offs for the GPU and other useful statistics.

$\endgroup$
4
$\begingroup$

UPD: Intel GPA dropped macOS support for some reason. Intel GPA Metal support page says Metal is not supported too, maybe that was before they dropped macOS version completely.

If you're lucky you can find an old version of GPA. When I'm writing this there's still a link to macOS version on Russian version of Intel website

UPD2: This link from Intel GPA Metal support page: https://registrationcenter.intel.com/forms/?productid=3055 after you register allows you to download 2019 R1 version (should support OGL) or 2021 R1 version (supports macOS not sure about OGL)

Original post:

Kinda late on reply, but I'm still gonna post it here for future searches.

Since all (or many, I'm not sure) macs use Intel GPUs you can use Intel Analyzers. It isn't much, but still got frame capture, texture browser etc. and helps to debug many errors.

$\endgroup$
1
  • $\begingroup$ The 2019 R1 is working, but does seem to show any info. Do I need to use Mojave to run it? $\endgroup$ Commented Aug 10, 2022 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.