Skip to content

Commit 2d87fa5

Browse files
committed
[tracy] update to 0.13
1 parent c2aeddd commit 2d87fa5

8 files changed

Lines changed: 643 additions & 26 deletions

File tree

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
diff --git a/profiler/src/profiler/TracySourceView.cpp b/profiler/src/profiler/TracySourceView.cpp
2+
index c79948b8..2795bf92 100644
3+
--- a/profiler/src/profiler/TracySourceView.cpp
4+
+++ b/profiler/src/profiler/TracySourceView.cpp
5+
@@ -4,7 +4,7 @@
6+
#include <sstream>
7+
#include <stdio.h>
8+
9+
-#include <capstone.h>
10+
+#include <capstone/capstone.h>
11+
12+
#include "imgui.h"
13+
#include "TracyCharUtil.hpp"
14+
@@ -713,7 +713,7 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
15+
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
16+
break;
17+
case CpuArchArm64:
18+
- rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle );
19+
+ rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
20+
break;
21+
default:
22+
assert( false );
23+
@@ -778,9 +778,9 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
24+
}
25+
break;
26+
case CpuArchArm64:
27+
- if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM )
28+
+ if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
29+
{
30+
- jumpAddr = (uint64_t)detail.aarch64.operands[0].imm;
31+
+ jumpAddr = (uint64_t)detail.arm64.operands[0].imm;
32+
}
33+
break;
34+
default:
35+
@@ -865,18 +865,18 @@ bool SourceView::Disassemble( uint64_t symAddr, const Worker& worker )
36+
}
37+
break;
38+
case CpuArchArm64:
39+
- for( uint8_t i=0; i<detail.aarch64.op_count; i++ )
40+
+ for( uint8_t i=0; i<detail.arm64.op_count; i++ )
41+
{
42+
uint8_t type = 0;
43+
- switch( detail.aarch64.operands[i].type )
44+
+ switch( detail.arm64.operands[i].type )
45+
{
46+
- case AARCH64_OP_IMM:
47+
+ case ARM64_OP_IMM:
48+
type = 0;
49+
break;
50+
- case AARCH64_OP_REG:
51+
+ case ARM64_OP_REG:
52+
type = 1;
53+
break;
54+
- case AARCH64_OP_MEM:
55+
+ case ARM64_OP_MEM:
56+
type = 2;
57+
break;
58+
default:
59+
diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp
60+
index d94a1ab5..437f4a78 100644
61+
--- a/server/TracyWorker.cpp
62+
+++ b/server/TracyWorker.cpp
63+
@@ -21,7 +21,7 @@
64+
#include <inttypes.h>
65+
#include <sys/stat.h>
66+
67+
-#include <capstone.h>
68+
+#include <capstone/capstone.h>
69+
70+
#define ZDICT_STATIC_LINKING_ONLY
71+
#include <zdict.h>
72+
@@ -3912,7 +3912,7 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
73+
rval = cs_open( CS_ARCH_ARM, CS_MODE_ARM, &handle );
74+
break;
75+
case CpuArchArm64:
76+
- rval = cs_open( CS_ARCH_AARCH64, CS_MODE_ARM, &handle );
77+
+ rval = cs_open( CS_ARCH_ARM64, CS_MODE_ARM, &handle );
78+
break;
79+
default:
80+
assert( false );
81+
@@ -3952,9 +3952,9 @@ void Worker::AddSymbolCode( uint64_t ptr, const char* data, size_t sz )
82+
}
83+
break;
84+
case CpuArchArm64:
85+
- if( detail.aarch64.op_count == 1 && detail.aarch64.operands[0].type == AARCH64_OP_IMM )
86+
+ if( detail.arm64.op_count == 1 && detail.arm64.operands[0].type == ARM64_OP_IMM )
87+
{
88+
- callAddr = (uint64_t)detail.aarch64.operands[0].imm;
89+
+ callAddr = (uint64_t)detail.arm64.operands[0].imm;
90+
}
91+
break;
92+
default:

ports/tracy/fix-imgui-patch.patch

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
diff --git a/cmake/imgui-loader.patch b/cmake/imgui-loader.patch
2+
index 145fa755..71e5d6cb 100644
3+
--- a/cmake/imgui-loader.patch
4+
+++ b/cmake/imgui-loader.patch
5+
@@ -1,16 +1,16 @@
6+
-diff --git i/backends/imgui_impl_opengl3_loader.h w/backends/imgui_impl_opengl3_loader.h
7+
-index 4ca0536..a1ff572 100644
8+
---- i/backends/imgui_impl_opengl3_loader.h
9+
-+++ w/backends/imgui_impl_opengl3_loader.h
10+
-@@ -180,6 +180,7 @@ typedef khronos_uint8_t GLubyte;
11+
- #define GL_VERSION 0x1F02
12+
+diff --git a/backends/imgui_impl_opengl3_loader.h b/backends/imgui_impl_opengl3_loader.h
13+
+index 2c80cc598..1177da586 100644
14+
+--- a/backends/imgui_impl_opengl3_loader.h
15+
++++ b/backends/imgui_impl_opengl3_loader.h
16+
+@@ -182,6 +182,7 @@ typedef khronos_uint8_t GLubyte;
17+
#define GL_EXTENSIONS 0x1F03
18+
+ #define GL_NEAREST 0x2600
19+
#define GL_LINEAR 0x2601
20+
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
21+
#define GL_TEXTURE_MAG_FILTER 0x2800
22+
#define GL_TEXTURE_MIN_FILTER 0x2801
23+
#define GL_TEXTURE_WRAP_S 0x2802
24+
-@@ -244,8 +245,10 @@ GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
25+
+@@ -246,8 +247,10 @@ GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
26+
#define GL_TEXTURE0 0x84C0
27+
#define GL_ACTIVE_TEXTURE 0x84E0
28+
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
29+
@@ -21,7 +21,7 @@ index 4ca0536..a1ff572 100644
30+
#endif
31+
#endif /* GL_VERSION_1_3 */
32+
#ifndef GL_VERSION_1_4
33+
-@@ -481,7 +484,7 @@ GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc);
34+
+@@ -490,7 +493,7 @@ GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc);
35+
36+
/* gl3w internal state */
37+
union ImGL3WProcs {
38+
@@ -30,7 +30,7 @@ index 4ca0536..a1ff572 100644
39+
struct {
40+
PFNGLACTIVETEXTUREPROC ActiveTexture;
41+
PFNGLATTACHSHADERPROC AttachShader;
42+
-@@ -497,6 +500,7 @@ union ImGL3WProcs {
43+
+@@ -506,6 +509,7 @@ union ImGL3WProcs {
44+
PFNGLCLEARPROC Clear;
45+
PFNGLCLEARCOLORPROC ClearColor;
46+
PFNGLCOMPILESHADERPROC CompileShader;
47+
@@ -38,7 +38,7 @@ index 4ca0536..a1ff572 100644
48+
PFNGLCREATEPROGRAMPROC CreateProgram;
49+
PFNGLCREATESHADERPROC CreateShader;
50+
PFNGLDELETEBUFFERSPROC DeleteBuffers;
51+
-@@ -563,6 +567,7 @@ GL3W_API extern union ImGL3WProcs imgl3wProcs;
52+
+@@ -575,6 +579,7 @@ GL3W_API extern union ImGL3WProcs imgl3wProcs;
53+
#define glClear imgl3wProcs.gl.Clear
54+
#define glClearColor imgl3wProcs.gl.ClearColor
55+
#define glCompileShader imgl3wProcs.gl.CompileShader
56+
@@ -46,7 +46,7 @@ index 4ca0536..a1ff572 100644
57+
#define glCreateProgram imgl3wProcs.gl.CreateProgram
58+
#define glCreateShader imgl3wProcs.gl.CreateShader
59+
#define glDeleteBuffers imgl3wProcs.gl.DeleteBuffers
60+
-@@ -859,6 +864,7 @@ static const char *proc_names[] = {
61+
+@@ -883,6 +888,7 @@ static const char *proc_names[] = {
62+
"glClear",
63+
"glClearColor",
64+
"glCompileShader",

0 commit comments

Comments
 (0)