summarylogtreecommitdiffstats
path: root/3751.patch
blob: ea648e07d79cbc99d63fd8d59cf97959c8e247ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
From 814a740a9be61a01047004b3b56a78220cd5156f Mon Sep 17 00:00:00 2001
From: lizzie <lizzie@eden-emu.dev>
Date: Thu, 19 Mar 2026 04:00:18 +0000
Subject: [PATCH 1/3] [externals] update renderdoc to 1.7.0

Signed-off-by: lizzie <lizzie@eden-emu.dev>
---
 externals/renderdoc/renderdoc_app.h | 164 +++++++++++++++++++++++++---
 1 file changed, 149 insertions(+), 15 deletions(-)

diff --git a/externals/renderdoc/renderdoc_app.h b/externals/renderdoc/renderdoc_app.h
index e6c1511deb..c379f0ac40 100644
--- a/externals/renderdoc/renderdoc_app.h
+++ b/externals/renderdoc/renderdoc_app.h
@@ -7,7 +7,7 @@
 /******************************************************************************
  * The MIT License (MIT)
  *
- * Copyright (c) 2019-2025 Baldur Karlsson
+ * Copyright (c) 2015-2026 Baldur Karlsson
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -72,6 +72,10 @@ extern "C" {
 // truncated version when only a uint64_t is available (e.g. Vulkan tags):
 #define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL
 
+// this is a magic value for vulkan user tags to indicate which dispatchable API objects are which
+// for object annotations
+#define RENDERDOC_APIObjectAnnotationHelper 0xfbb3b337b664d0adULL
+
 //////////////////////////////////////////////////////////////////////////////////////////////////
 // RenderDoc capture options
 //
@@ -564,6 +568,128 @@ typedef uint32_t(RENDERDOC_CC *pRENDERDOC_DiscardFrameCapture)(RENDERDOC_DeviceP
 // multiple times only the last title will be used.
 typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureTitle)(const char *title);
 
+// Annotations API:
+//
+// These functions allow you to specify annotations either on a per-command level, or a per-object
+// level.
+//
+// Basic types of annotations are supported, as well as vector versions and references to API objects.
+//
+// The annotations are stored as keys, with the key being a dot-separated path allowing arbitrary
+// nesting and user organisation. The keys are sorted in human order so `foo.2.bar` will be displayed
+// before `foo.10.bar` to allow creation of arrays if desired.
+//
+// Deleting an annotation can be done by assigning an empty value to it.
+
+// the type of an annotation value, or Empty to delete an annotation
+typedef enum RENDERDOC_AnnotationType
+{
+  eRENDERDOC_Empty,
+  eRENDERDOC_Bool,
+  eRENDERDOC_Int32,
+  eRENDERDOC_UInt32,
+  eRENDERDOC_Int64,
+  eRENDERDOC_UInt64,
+  eRENDERDOC_Float,
+  eRENDERDOC_Double,
+  eRENDERDOC_String,
+  eRENDERDOC_APIObject,
+  eRENDERDOC_AnnotationMax = 0x7FFFFFFF,
+} RENDERDOC_AnnotationType;
+
+// a union with vector annotation value data
+typedef union RENDERDOC_AnnotationVectorValue
+{
+  bool boolean[4];
+  int32_t int32[4];
+  int64_t int64[4];
+  uint32_t uint32[4];
+  uint64_t uint64[4];
+  float float32[4];
+  double float64[4];
+} RENDERDOC_AnnotationVectorValue;
+
+// a union with scalar annotation value data
+typedef union RENDERDOC_AnnotationValue
+{
+  bool boolean;
+  int32_t int32;
+  int64_t int64;
+  uint32_t uint32;
+  uint64_t uint64;
+  float float32;
+  double float64;
+
+  RENDERDOC_AnnotationVectorValue vector;
+
+  const char *string;
+  void *apiObject;
+} RENDERDOC_AnnotationValue;
+
+// a struct for specifying a GL object, as we don't have pointers we can use so instead we specify a
+// pointer to this struct giving both the type and the name
+typedef struct RENDERDOC_GLResourceReference
+{
+  // this is the same GLenum identifier as passed to glObjectLabel
+  uint32_t identifier;
+  uint32_t name;
+} GLResourceReference;
+
+// simple C++ helpers to avoid the need for a temporary objects for value passing and GL object specification
+#ifdef __cplusplus
+struct RDGLObjectHelper
+{
+  RENDERDOC_GLResourceReference gl;
+
+  RDGLObjectHelper(uint32_t identifier, uint32_t name)
+  {
+    gl.identifier = identifier;
+    gl.name = name;
+  }
+
+  operator RENDERDOC_GLResourceReference *() { return &gl; }
+};
+
+struct RDAnnotationHelper
+{
+  RENDERDOC_AnnotationValue val;
+
+  RDAnnotationHelper(bool b) { val.boolean = b; }
+  RDAnnotationHelper(int32_t i) { val.int32 = i; }
+  RDAnnotationHelper(int64_t i) { val.int64 = i; }
+  RDAnnotationHelper(uint32_t i) { val.uint32 = i; }
+  RDAnnotationHelper(uint64_t i) { val.uint64 = i; }
+  RDAnnotationHelper(float f) { val.float32 = f; }
+  RDAnnotationHelper(double d) { val.float64 = d; }
+  RDAnnotationHelper(const char *s) { val.string = s; }
+
+  operator RENDERDOC_AnnotationValue *() { return &val; }
+};
+#endif
+
+// The device is specified in the same way as other API calls that take a RENDERDOC_DevicePointer
+// to specify the device.
+//
+// The object or queue/commandbuffer will depend on the graphics API in question.
+//
+// Return value:
+// 0 - The annotation was applied successfully.
+// 1 - The device is unknown/invalid
+// 2 - The device is valid but the annotation is not supported for API-specific reasons, such as an
+//     unrecognised or invalid object or queue/commandbuffer
+// 3 - The call is ill-formed or invalid e.g. empty is specified with a value pointer, or non-empty
+//     is specified with a NULL value pointer
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_SetObjectAnnotation)(RENDERDOC_DevicePointer device,
+                                                               void *object, const char *key,
+                                                               RENDERDOC_AnnotationType valueType,
+                                                               uint32_t valueVectorWidth,
+                                                               const RENDERDOC_AnnotationValue *value);
+
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_SetCommandAnnotation)(
+    RENDERDOC_DevicePointer device, void *queueOrCommandBuffer, const char *key,
+    RENDERDOC_AnnotationType valueType, uint32_t valueVectorWidth,
+    const RENDERDOC_AnnotationValue *value);
+
 //////////////////////////////////////////////////////////////////////////////////////////////////
 // RenderDoc API versions
 //
@@ -592,6 +718,7 @@ typedef enum RENDERDOC_Version
   eRENDERDOC_API_Version_1_4_2 = 10402,    // RENDERDOC_API_1_4_2 = 1 04 02
   eRENDERDOC_API_Version_1_5_0 = 10500,    // RENDERDOC_API_1_5_0 = 1 05 00
   eRENDERDOC_API_Version_1_6_0 = 10600,    // RENDERDOC_API_1_6_0 = 1 06 00
+  eRENDERDOC_API_Version_1_7_0 = 10700,    // RENDERDOC_API_1_7_0 = 1 07 00
 } RENDERDOC_Version;
 
 // API version changelog:
@@ -622,8 +749,10 @@ typedef enum RENDERDOC_Version
 // 1.5.0 - Added feature: ShowReplayUI() to request that the replay UI show itself if connected
 // 1.6.0 - Added feature: SetCaptureTitle() which can be used to set a title for a
 //         capture made with StartFrameCapture() or EndFrameCapture()
+// 1.7.0 - Added feature: SetObjectAnnotation() / SetCommandAnnotation() for adding rich
+//         annotations to objects and command streams
 
-typedef struct RENDERDOC_API_1_6_0
+typedef struct RENDERDOC_API_1_7_0
 {
   pRENDERDOC_GetAPIVersion GetAPIVersion;
 
@@ -701,20 +830,25 @@ typedef struct RENDERDOC_API_1_6_0
 
   // new function in 1.6.0
   pRENDERDOC_SetCaptureTitle SetCaptureTitle;
-} RENDERDOC_API_1_6_0;
 
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_0;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_1;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_2;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_0;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_1;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_2;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_2_0;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_3_0;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_0;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_1;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_2;
-typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_5_0;
+  // new functions in 1.7.0
+  pRENDERDOC_SetObjectAnnotation SetObjectAnnotation;
+  pRENDERDOC_SetCommandAnnotation SetCommandAnnotation;
+} RENDERDOC_API_1_7_0;
+
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_0_0;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_0_1;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_0_2;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_1_0;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_1_1;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_1_2;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_2_0;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_3_0;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_4_0;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_4_1;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_4_2;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_5_0;
+typedef RENDERDOC_API_1_7_0 RENDERDOC_API_1_6_0;
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
 // RenderDoc API entry point
-- 
2.39.5


From 0895d29cb9c75bf8fbcb63b73956dbaf2b2f3e38 Mon Sep 17 00:00:00 2001
From: lizzie <lizzie@eden-emu.dev>
Date: Thu, 19 Mar 2026 04:17:05 +0000
Subject: [PATCH 2/3] fix fuck

---
 src/core/tools/renderdoc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/tools/renderdoc.h b/src/core/tools/renderdoc.h
index 0e5e43da5b..99aefb01f6 100644
--- a/src/core/tools/renderdoc.h
+++ b/src/core/tools/renderdoc.h
@@ -3,7 +3,7 @@
 
 #pragma once
 
-struct RENDERDOC_API_1_6_0;
+struct RENDERDOC_API_1_7_0;
 
 namespace Tools {
 
@@ -15,7 +15,7 @@ public:
     void ToggleCapture();
 
 private:
-    RENDERDOC_API_1_6_0* rdoc_api{};
+    RENDERDOC_API_1_7_0* rdoc_api{};
     bool is_capturing{false};
 };
 
-- 
2.39.5


From 89f5dd61de7eb8895e3aa9b7638dc0a8f924ae31 Mon Sep 17 00:00:00 2001
From: lizzie <lizzie@eden-emu.dev>
Date: Thu, 19 Mar 2026 04:20:23 +0000
Subject: [PATCH 3/3] AF[GPOIKJHFOKJPLDFG

---
 src/core/tools/renderdoc.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/core/tools/renderdoc.h b/src/core/tools/renderdoc.h
index 99aefb01f6..689b0a383a 100644
--- a/src/core/tools/renderdoc.h
+++ b/src/core/tools/renderdoc.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
 // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
 // SPDX-License-Identifier: GPL-2.0-or-later
 
-- 
2.39.5