Skip to content

Commit c6b5c48

Browse files
brianrobtstrycore
authored andcommitted
doc: formatting
1 parent 6977de4 commit c6b5c48

File tree

1 file changed

+34
-19
lines changed

1 file changed

+34
-19
lines changed

Apitracing.md

+34-19
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Apitracing a game
2-
This guide in detail describes how to create an apitrace capture of a game, which can be very useful for debugging purposes.
2+
3+
This guide in detail describes how to create an [apitrace](https://apitrace.github.io/) capture of a game, which can be very useful for debugging purposes.
4+
35
## On Linux
6+
47
* Check whether the game is 64-bit or 32-bit.
58

6-
To determine that on Linux, use `file` command on the game's exe in the terminal:
9+
To determine that on Linux, use the `file` command on the game's exe in the terminal,
710
> file /path/to/executable/program.exe
811
9-
where `/path/to/executable/` is an an actual location of the game's EXE file and `program.exe` is its actual name.
12+
where `/path/to/executable/` is the actual location of the game's EXE file and `program.exe` is its actual name.
1013

11-
If the game is **32-bit**, you will see this in the output
14+
If the game is **32-bit**, you will see this in the output:
1215
> PE32 executable (GUI) Intel 80386, for MS Windows
1316
1417
And if it's **64-bit**, you will get this instead:
@@ -17,6 +20,7 @@ And if it's **64-bit**, you will get this instead:
1720
* Open `winecfg` and add a `native,builtin` override for `d3d9`, `d3d11` and `dxgi.dll`. Here's a GIF that showcases the process:
1821

1922
![Peek 2020-04-09 17-32](https://user-images.githubusercontent.com/10602045/78906537-29951b00-7a88-11ea-8142-3681f1ba8af0.gif)
23+
2024
* Download prebuilt apitrace files:
2125

2226
If the game is **32-bit**
@@ -28,25 +32,33 @@ And if it's **64-bit**
2832
* Extract the archive.
2933
* Now you have to copy the appropriate `d3d9.dll`, `d3d11.dll`, `dxgi.dll` and `dxgitrace.dll` files.
3034

31-
If the game is **32-bit**, choose the files located in
35+
If the game is **32-bit**, choose the files located in:
3236
>apitrace-10.0-**win32**/lib/wrappers
3337
34-
And if it's **64-bit**, choose the file located in
38+
And if it's **64-bit**, choose the file located in:
3539
>apitrace-10.0-**win64**/lib/wrappers
40+
3641
* Now copy those DLL files into **the same folder as the game's .EXE**.
3742
* Before the next step, make sure you disable or get rid of DXVK files first, as it's preferred that you use WineD3D to make an apitrace.
38-
* However, if WineD3D doesn't work, you may use apitrace in combination with DXVK as long as DXVK dlls are located in the Windows/system32 (64-bit libraries) and Windows/syswod64 (32-bit libraries). Yes, this is not a mistake, 64-bit libraries go into system32, this is just how Windows/Wine works.
43+
* However, if WineD3D doesn't work, you may use apitrace in combination with DXVK as long as DXVK dlls are located in the Windows/system32 (64-bit libraries) and Windows/syswod64 (32-bit libraries). Yes, this is not a mistake, 64-bit libraries go into system32.
44+
This is just how Windows/Wine works.
3945
* Make sure to mention the backend you used (WineD3D or DXVK) in your report.
4046
* Launch the game and try to reproduce your issue as fast as possible, then exit the game after that (using ALT+F4 is fine).
41-
* Locate the `.trace` file. If you've done everything correctly, in wine, you can usually find it in `/path/to/prefix/drive_c/users/USERNAME/Desktop`, where `/path/to/prefix` is the location of your Wine prefix and `USERNAME` is your username in the system. It will have the name of the game's .exe, but use the `.trace` extension.
42-
* A properly generated trace should have the size of at least a few hundred megabytes (or at least one hundred or so if the game is very simple), quite often it's a few gigabytes.
43-
If the size is way less than that (like a few bytes or kilobytes) and/or the game crashed during the tracing process, then it most likely means it's is not really traceable, at least on Linux. Make sure you mention this.
44-
* However, in some rare instances, apitrace is able to capture at least a single frame of the game, resulting in a `.trace` that has a size of few megabytes or a few hundred kilobytes. In some rare instances, it could be enough to reproduce something like a crash on launch. In that case, attaching such file to your report won't hurt, but make sure to mention the size.
45-
* Compress the `.trace` file (preferably in a common file format with good compression, something like `.tar.xz` or `.7z`) and share it using a *common* file sharing service like Google Drive or Mega. **Don't** use temporary file sharing services, as the link to the file may expire before the person it was made for can download it. Additionally, don't remove the `.trace` file from your cloud storage until the issue is resolved and closed.
47+
* Locate the `.trace` file. If you've done everything correctly, in Wine, you can usually find it in `/path/to/prefix/drive_c/users/USERNAME/Desktop`, where `/path/to/prefix` is the location of your Wine prefix and `USERNAME` is your username in the system.
48+
It will have the name of the game's .exe, but use the `.trace` extension.
49+
* A properly generated trace should have the size of at least a few hundred megabytes (or at least one hundred or so if the game is very simple). Quite often it's a few gigabytes.
50+
If the size is way less than that (by a few bytes or kilobytes) and/or the game crashed during the tracing process, then it most likely means it's not really traceable, at least on Linux. Make sure you mention this.
51+
* However, in some rare instances, apitrace is able to capture at least a single frame of the game, resulting in a `.trace` that has a size of few megabytes or a few hundred kilobytes. In some rare instances, it could be enough to reproduce something like a crash on launch.
52+
In that case, attaching such a file to your report won't hurt, but make sure to mention the size.
53+
* Compress the `.trace` file (preferably in a common file format with good compression, something like `.tar.xz` or `.7z`) and share it using a *common* file sharing service like Google Drive or Mega. **Don't** use temporary file sharing services,
54+
as the link to the file may expire before the person it was made for can download it. Additionally, don't remove the `.trace` file from your cloud storage until the issue is resolved and closed.
4655

4756
## On Windows
57+
4858
If you have access to Windows, it's best that you perform the tracing on it rather than on Linux.
59+
4960
* Check whether the game is 64-bit or 32-bit.
61+
5062
To do that on Windows, right-click on the executable file you want to check, select “Properties”, then click the tab “Compatibility”.
5163

5264
If you see older Windows versions in that menu, like "Windows 98", then the game is **32-bit**.
@@ -59,25 +71,28 @@ If the first Windows version in the list is "Windows Vista", then it means the g
5971

6072
* Download prebuilt apitrace files:
6173

62-
If the game is **32-bit**
74+
If the game is **32-bit**:
6375
>https://github.com/apitrace/apitrace/releases/download/10.0/apitrace-10.0-win32.7z
6476
65-
And if it's **64-bit**
77+
And if it's **64-bit**:
6678
>https://github.com/apitrace/apitrace/releases/download/10.0/apitrace-10.0-win64.7z
6779
6880
* Extract the archive.
6981
* Now you have to copy the appropriate `d3d9.dll`, `d3d11.dll`, `dxgi.dll` and `dxgitrace.dll` files.
7082

71-
If the game is **32-bit**, choose the files located in
83+
If the game is **32-bit**, choose the files located in :
7284
>apitrace-10.0-**win32**/lib/wrappers
7385
74-
And if it's **64-bit**, choose the file located in
86+
And if it's **64-bit**, choose the file located in:
7587
>apitrace-10.0-**win64**/lib/wrappers
88+
7689
* Now copy those DLL files into **the same folder as the game's .EXE**.
7790
* Launch the game and try to reproduce your issue as fast as possible, then exit the game after that (using ALT+F4 is fine).
7891
* The .trace file should be located on your Desktop.
7992
* Locate the .trace file. If you've done everything correctly, in wine, you can usually find it on your Desktop. It will have the name of the game's .exe, but use the `.trace` extension.
8093
* A properly generated trace should have the size of at least a few hundred megabytes (or at least one hundred or so if the game is very simple), quite often it's a few gigabytes.
81-
If the size is way less than that (like a few bytes or kilobytes) and/or the game crashed during the tracing process, then it most likely means it's is not really traceable. Make sure you mention this.
82-
* However, in some rare instances, apitrace is able to capture only a single frame of the game, resulting in a `.trace` that has a size of few megabytes or a few hundred kilobytes. In some rare instances, it could be enough to reproduce something like a crash on launch. In that case, attaching such file to your report won't hurt, but make sure to mention the size.
83-
* Compress the `.trace` file (preferably in a common file format with good compression, something like `.tar.xz` or `.7z`) and share it using a *common* file sharing service like Google Drive or Mega. **Don't** use temporary file sharing services, as the link to the file may expire before the person it was made for can download it. Additionally, don't remove the `.trace` file from your cloud storage until the issue is resolved and closed.
94+
If the size is way less than that (like a few bytes or kilobytes) and/or the game crashed during the tracing process, then it most likely means it's is not really traceable. Make sure you mention this.
95+
* However, in some rare instances, apitrace is able to capture only a single frame of the game, resulting in a `.trace` that has a size of few megabytes or a few hundred kilobytes. In some rare instances, it could be enough to reproduce something like a crash on launch.
96+
In that case, attaching such file to your report won't hurt, but make sure to mention the size.
97+
* Compress the `.trace` file (preferably in a common file format with good compression, something like `.tar.xz` or `.7z`) and share it using a *common* file sharing service like Google Drive or Mega. **Don't** use temporary file sharing services, as the link to the
98+
file may expire before the person it was made for can download it. Additionally, don't remove the `.trace` file from your cloud storage until the issue is resolved and closed.

0 commit comments

Comments
 (0)