Skip to content
caseymcc edited this page Nov 10, 2018 · 4 revisions

CodeXL

CodeXL is AMD's GPU debugging suite. Although it is geared for AMD it will run on nVidia or Intel GPUs however some of the functionality will not work (like shader debugging). You can grab the latest version from github.

Setup

In order to run it with SoA you will need to create a project for it. First select "Create a new project for debugging" as shown below.

create project

Next fill out the Project settings, at the moment you will only need to fill out the "General" tab.

settings

Settings/General

  1. Give the project a name "SoA" works.
  2. Set the "Executable Path:" - this will be the path to the exe built by the compiler. It will be in the repo folder under the directory "build/Soa/Debug/soa.exe" (or "build/Soa/Release/soa.exe" if you are running the release version) if you used the build.bat/sh files, otherwise it will be under the directory you gave to cmake under "Soa/Debug/soa.exe".
  3. Set the "Working Directory" to the game Submodule folder, this should be at the repo root directory.
  4. Set "Command Line Arguments", this will just be "-a"
  5. Set the "Source Files Directories:", choose the "..." button and add the "SoA" folder and the "Vorb/src" at the root of the repo directory.

source

Once you have completed the settings choose the "OK" button and your project should be ready.

Debugging

At the same github link there is also a CodeXL_Quick_Start_Guide.pdf which will get you started, but here is a little information as well.

You can start the debugger with the green triangle in the toolbar. start debugging

You can set some break points that can help debug crash issues you may have from OpenGL errors by using the "Break on OpenGL Error" and "Break on Detected Error" under the menu "Debug/BreakPoints" breakpoints

You can also add additional breakpoints on OpenGL API calls using the "Debug/Add or Remove Breakpoints...". Here you can choose individual API calls to break on. api break points

Once a breakpoint is hit you can control the flow using the step functions in the toolbar. control tools

When using the Break on OpenGL Error" and "Break on Detected Error" you will likely hit a few errors/warnings that don't currently matter, like

Debug String: CodeXL warning: The debugged process asked for an extension function pointer ... from one render context, but called this function pointer in another render context (context #2)

although this is a legitimate warning/error the application will function properly as current drivers provide the same address to both context. Hopefully this and others will get corrected in the near future.