@@ -142,6 +142,13 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
142
142
// / Default window height.
143
143
const uint32_t kDefaultWindowHeight = 300 ;
144
144
145
+ // / Note that GPA sample IDs are client defined. However, the Vulkan GPA
146
+ // / extension assigns an ID to each sample (they are not client defined).
147
+ // / The GPA library manages the mapping between them. These are the former.
148
+ static constexpr GpaUInt32 kGpaSampleIdCube = 0 ;
149
+ static constexpr GpaUInt32 kGpaSampleIdWireframe = 1 ;
150
+ static constexpr GpaUInt32 kGpaSampleIdCubeAndWireframe = 2 ;
151
+
145
152
#ifdef ANDROID
146
153
inline void SetWindow (ANativeWindow* native_window)
147
154
{
@@ -242,7 +249,7 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
242
249
243
250
// / Sample Id that the application (not GPA) assigns to the cube.
244
251
// / The cube will have this same sample_id in all passes.
245
- const GpaUInt32 gpa_sample_id = 0 ;
252
+ const GpaUInt32 gpa_sample_id = kGpaSampleIdCube ;
246
253
} cube_;
247
254
248
255
// / @brief Container for objects related to drawing the wireframe.
@@ -256,7 +263,7 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
256
263
257
264
// / Sample Id that the application (not GPA) assigns to the wireframe.
258
265
// / The wireframe will have this same sample_id in all passes.
259
- const GpaUInt32 gpa_sample_id = 1 ;
266
+ const GpaUInt32 gpa_sample_id = kGpaSampleIdWireframe ;
260
267
} wire_frame_;
261
268
262
269
// / @brief Container for objects related to drawing the cube and wireframe.
@@ -279,7 +286,7 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
279
286
280
287
// / Sample Id that the application (not GPA) assigns to the cube wireframe.
281
288
// / The combined cube + wireframe sample will have this same sample_id in all passes.
282
- const GpaUInt32 gpa_sample_id = 2 ;
289
+ const GpaUInt32 gpa_sample_id = kGpaSampleIdCubeAndWireframe ;
283
290
} cube_and_wire_frame_;
284
291
};
285
292
0 commit comments