cube: Remove dependency on VK_DYNAMIC_STATE_RANGE_SIZE
authorTony-LunarG <tony@lunarg.com>
Thu, 7 May 2020 16:02:58 +0000 (10:02 -0600)
committerTony Barbour <tony@lunarg.com>
Thu, 7 May 2020 17:47:09 +0000 (11:47 -0600)
Change-Id: Id6b3906d2605c4742ad0af45747fc37c23cab03e

cube/cube.c

index 602b4bd..8c87b5c 100644 (file)
@@ -1974,6 +1974,8 @@ static void demo_prepare_fs(struct demo *demo) {
 }
 
 static void demo_prepare_pipeline(struct demo *demo) {
+#define NUM_DYNAMIC_STATES 2 /*Viewport + Scissor*/
+
     VkGraphicsPipelineCreateInfo pipeline;
     VkPipelineCacheCreateInfo pipelineCache;
     VkPipelineVertexInputStateCreateInfo vi;
@@ -1983,7 +1985,7 @@ static void demo_prepare_pipeline(struct demo *demo) {
     VkPipelineDepthStencilStateCreateInfo ds;
     VkPipelineViewportStateCreateInfo vp;
     VkPipelineMultisampleStateCreateInfo ms;
-    VkDynamicState dynamicStateEnables[VK_DYNAMIC_STATE_RANGE_SIZE];
+    VkDynamicState dynamicStateEnables[NUM_DYNAMIC_STATES];
     VkPipelineDynamicStateCreateInfo dynamicState;
     VkResult U_ASSERT_ONLY err;