@@ -142,6 +142,13 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
142142 // / Default window height.
143143 const uint32_t kDefaultWindowHeight = 300 ;
144144
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+
145152#ifdef ANDROID
146153 inline void SetWindow (ANativeWindow* native_window)
147154 {
@@ -242,7 +249,7 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
242249
243250 // / Sample Id that the application (not GPA) assigns to the cube.
244251 // / 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 ;
246253 } cube_;
247254
248255 // / @brief Container for objects related to drawing the wireframe.
@@ -256,7 +263,7 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
256263
257264 // / Sample Id that the application (not GPA) assigns to the wireframe.
258265 // / 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 ;
260267 } wire_frame_;
261268
262269 // / @brief Container for objects related to drawing the cube and wireframe.
@@ -279,7 +286,7 @@ class AMDVulkanDemo : public gpa_example::GpaSampleApp
279286
280287 // / Sample Id that the application (not GPA) assigns to the cube wireframe.
281288 // / 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 ;
283290 } cube_and_wire_frame_;
284291 };
285292
0 commit comments