bug 14365: make separate viewport and scissor cmds
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Mon, 21 Sep 2015 17:44:06 +0000 (11:44 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Wed, 23 Sep 2015 17:15:00 +0000 (11:15 -0600)
14 files changed:
demos/cube.c
demos/tri.c
icd/nulldrv/nulldrv.c
include/vk_layer.h
include/vulkan.h
layers/device_limits.cpp
layers/draw_state.cpp
layers/draw_state.h
layers/mem_tracker.cpp
layers/param_checker.cpp
loader/gpa_helper.h
loader/table_ops.h
loader/trampoline.c
vulkan.py

index 77d27147d5658c72638427106541ce7cdd041baf..aba534881b7d1f9e13d3b73d2ee13f345c108ee3 100644 (file)
@@ -548,6 +548,7 @@ static void demo_draw_build_cmd(struct demo *demo, VkCmdBuffer cmd_buf)
     viewport.width = (float) demo->width;
     viewport.minDepth = (float) 0.0f;
     viewport.maxDepth = (float) 1.0f;
+    vkCmdSetViewport(cmd_buf, 1, &viewport);
 
     VkRect2D scissor;
     memset(&scissor, 0, sizeof(scissor));
@@ -555,7 +556,7 @@ static void demo_draw_build_cmd(struct demo *demo, VkCmdBuffer cmd_buf)
     scissor.extent.height = demo->height;
     scissor.offset.x = 0;
     scissor.offset.y = 0;
-    vkCmdSetViewport(cmd_buf, 1, &viewport, &scissor);
+    vkCmdSetScissor(cmd_buf, 1, &scissor);
 
     vkCmdSetLineWidth(cmd_buf, 1.0);
     vkCmdSetDepthBias(cmd_buf, 0.0f, 0.0f, 0.0f);
index cc13b825dbc3a87c2dc7fb80f3ac22b205f6e49b..f64c82422d028b6f1e05fe0ac2ffeb324e5abf6b 100644 (file)
@@ -391,6 +391,7 @@ static void demo_draw_build_cmd(struct demo *demo)
     viewport.width = (float) demo->width;
     viewport.minDepth = (float) 0.0f;
     viewport.maxDepth = (float) 1.0f;
+    vkCmdSetViewport(demo->draw_cmd, 1, &viewport);
 
     VkRect2D scissor;
     memset(&scissor, 0, sizeof(scissor));
@@ -398,7 +399,7 @@ static void demo_draw_build_cmd(struct demo *demo)
     scissor.extent.height = demo->height;
     scissor.offset.x = 0;
     scissor.offset.y = 0;
-    vkCmdSetViewport(demo->draw_cmd, 1, &viewport, &scissor);
+    vkCmdSetScissor(demo->draw_cmd, 1, &scissor);
 
     vkCmdSetLineWidth(demo->draw_cmd, 1.0);
     vkCmdSetDepthBias(demo->draw_cmd, 0.0f, 0.0f, 0.0f);
index f6fbe164dacebc7a32bc3683e4f32053f3e13a13..828c42726d198e22b6112ba09a27cadf04dc5d71 100644 (file)
@@ -1077,7 +1077,12 @@ ICD_EXPORT void VKAPI vkCmdBindPipeline(
     NULLDRV_LOG_FUNC;
 }
 
-ICD_EXPORT void VKAPI vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportAndScissorCount, const VkViewport* pViewports, const VkRect2D* pScissors)
+ICD_EXPORT void VKAPI vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports)
+{
+    NULLDRV_LOG_FUNC;
+}
+
+ICD_EXPORT void VKAPI vkCmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors)
 {
     NULLDRV_LOG_FUNC;
 }
index 28e3f788629610c40e846a378c237e76d7eb94a1..82b66ffc9aecdf7f77c66a9d19ba066657959723 100644 (file)
@@ -118,6 +118,7 @@ typedef struct VkLayerDispatchTable_
     PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers;
     PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer;
     PFN_vkCmdSetViewport CmdSetViewport;
+    PFN_vkCmdSetScissor CmdSetScissor;
     PFN_vkCmdSetLineWidth CmdSetLineWidth;
     PFN_vkCmdSetDepthBias CmdSetDepthBias;
     PFN_vkCmdSetBlendConstants CmdSetBlendConstants;
index 5c0052d9f18b5d2cbca776af17923501fd9dd4a2..2a1e06d4e6625cbb9e75582ffbe52a5cc90eacb5 100644 (file)
@@ -2158,7 +2158,8 @@ typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const
 typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer);
 typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags);
 typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
-typedef void (VKAPI *PFN_vkCmdSetViewport)(VkCmdBuffer cmdBuffer, uint32_t viewportAndScissorCount, const VkViewport* pViewports, const VkRect2D* pScissors);
+typedef void (VKAPI *PFN_vkCmdSetViewport)(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports);
+typedef void (VKAPI *PFN_vkCmdSetScissor)(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors);
 typedef void (VKAPI *PFN_vkCmdSetLineWidth)(VkCmdBuffer cmdBuffer, float lineWidth);
 typedef void (VKAPI *PFN_vkCmdSetDepthBias)(VkCmdBuffer cmdBuffer, float depthBias, float depthBiasClamp, float slopeScaledDepthBias);
 typedef void (VKAPI *PFN_vkCmdSetBlendConstants)(VkCmdBuffer cmdBuffer, const float blendConst[4]);
@@ -2700,8 +2701,12 @@ void VKAPI vkCmdBindPipeline(
 
 void VKAPI vkCmdSetViewport(
     VkCmdBuffer                                 cmdBuffer,
-    uint32_t                                    viewportAndScissorCount,
-    const VkViewport*                           pViewports,
+    uint32_t                                    viewportCount,
+    const VkViewport*                           pViewports);
+
+void VKAPI vkCmdSetScissor(
+    VkCmdBuffer                                 cmdBuffer,
+    uint32_t                                    scissorCount,
     const VkRect2D*                             pScissors);
 
 void VKAPI vkCmdSetLineWidth(
index 33c4250eb4370776060ee5f663fcd8f86bf5003f..30e57d4463eddc9953fa22a09268a3cf3239ac7b 100644 (file)
@@ -299,14 +299,26 @@ VK_LAYER_EXPORT VkResult VKAPI vkGetPhysicalDeviceSparseImageFormatProperties(Vk
 
 VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(
     VkCmdBuffer                         cmdBuffer,
-    uint32_t                            viewportAndScissorCount,
-    const VkViewport*                   pViewports,
+    uint32_t                            viewportCount,
+    const VkViewport*                   pViewports)
+{
+    VkBool32 skipCall = VK_FALSE;
+    /* TODO: Verify viewportCount < maxViewports from VkPhysicalDeviceLimits */
+    if (VK_FALSE == skipCall) {
+        get_dispatch_table(device_limits_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportCount, pViewports);
+    }
+}
+
+VK_LAYER_EXPORT void VKAPI vkCmdSetScissor(
+    VkCmdBuffer                         cmdBuffer,
+    uint32_t                            scissorCount,
     const VkRect2D*                     pScissors)
 {
     VkBool32 skipCall = VK_FALSE;
-    /* TODO: Verify viewportAndScissorCount < maxViewports from VkPhysicalDeviceLimits */
+    /* TODO: Verify scissorCount < maxViewports from VkPhysicalDeviceLimits */
+    /* TODO: viewportCount and scissorCount must match at draw time */
     if (VK_FALSE == skipCall) {
-        get_dispatch_table(device_limits_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportAndScissorCount, pViewports, pScissors);
+        get_dispatch_table(device_limits_device_table_map, cmdBuffer)->CmdSetScissor(cmdBuffer, scissorCount, pScissors);
     }
 }
 
index b5035c0fd6a57b67a78487ca9a68eb77cc1264e6..f6b6a6d2927e7900b356305e88995da2961b94aa 100644 (file)
@@ -1969,9 +1969,8 @@ VK_LAYER_EXPORT void VKAPI vkCmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBi
 
 VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(
     VkCmdBuffer                         cmdBuffer,
-    uint32_t                            viewportAndScissorCount,
-    const VkViewport*                   pViewports,
-    const VkRect2D*                     pScissors)
+    uint32_t                            viewportCount,
+    const VkViewport*                   pViewports)
 {
     VkBool32 skipCall = VK_FALSE;
     GLOBAL_CB_NODE* pCB = getCBNode(cmdBuffer);
@@ -1985,17 +1984,43 @@ VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(
             }
             loader_platform_thread_lock_mutex(&globalLock);
             pCB->status |= CBSTATUS_VIEWPORT_SET;
-            pCB->viewports.resize(viewportAndScissorCount);
-            memcpy(pCB->viewports.data(), pViewports, viewportAndScissorCount);
-            pCB->scissors.resize(viewportAndScissorCount);
-            memcpy(pCB->scissors.data(), pScissors, viewportAndScissorCount);
+            pCB->viewports.resize(viewportCount);
+            memcpy(pCB->viewports.data(), pViewports, viewportCount);
             loader_platform_thread_unlock_mutex(&globalLock);
         } else {
             skipCall |= report_error_no_cb_begin(cmdBuffer, "vkCmdSetViewport()");
         }
     }
     if (VK_FALSE == skipCall)
-        get_dispatch_table(draw_state_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportAndScissorCount, pViewports, pScissors);
+        get_dispatch_table(draw_state_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportCount, pViewports);
+}
+
+VK_LAYER_EXPORT void VKAPI vkCmdSetScissor(
+    VkCmdBuffer                         cmdBuffer,
+    uint32_t                            scissorCount,
+    const VkRect2D*                     pScissors)
+{
+    VkBool32 skipCall = VK_FALSE;
+    GLOBAL_CB_NODE* pCB = getCBNode(cmdBuffer);
+    if (pCB) {
+        if (pCB->state == CB_UPDATE_ACTIVE) {
+            updateCBTracking(cmdBuffer);
+            skipCall |= addCmd(pCB, CMD_SETSCISSORSTATE);
+            if (!pCB->activeRenderPass) {
+                skipCall |= log_msg(mdd(pCB->cmdBuffer), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType) 0, 0, 0, DRAWSTATE_NO_ACTIVE_RENDERPASS, "DS",
+                        "Incorrect call to vkCmdSetScissor() without an active RenderPass.");
+            }
+            loader_platform_thread_lock_mutex(&globalLock);
+            pCB->status |= CBSTATUS_SCISSOR_SET;
+            pCB->scissors.resize(scissorCount);
+            memcpy(pCB->scissors.data(), pScissors, scissorCount);
+            loader_platform_thread_unlock_mutex(&globalLock);
+        } else {
+            skipCall |= report_error_no_cb_begin(cmdBuffer, "vkCmdSetScissor()");
+        }
+    }
+    if (VK_FALSE == skipCall)
+        get_dispatch_table(draw_state_device_table_map, cmdBuffer)->CmdSetScissor(cmdBuffer, scissorCount, pScissors);
 }
 
 VK_LAYER_EXPORT void VKAPI vkCmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth)
@@ -2307,6 +2332,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdDraw(VkCmdBuffer cmdBuffer, uint32_t firstVertex
         if (pCB->state == CB_UPDATE_ACTIVE) {
             pCB->drawCount[DRAW]++;
             skipCall |= validate_draw_state(pCB, VK_FALSE);
+            /* TODO: Check that scissor and viewport counts are the same */
             // TODO : Need to pass cmdBuffer as srcObj here
             skipCall |= log_msg(mdd(cmdBuffer), VK_DBG_REPORT_INFO_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, 0, 0, DRAWSTATE_NONE, "DS",
                     "vkCmdDraw() call #%lu, reporting DS state:", g_drawCount[DRAW]++);
@@ -3179,6 +3205,8 @@ VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI vkGetDeviceProcAddr(VkDevice dev, const
         return (PFN_vkVoidFunction) vkCmdBindPipeline;
     if (!strcmp(funcName, "vkCmdSetViewport"))
         return (PFN_vkVoidFunction) vkCmdSetViewport;
+    if (!strcmp(funcName, "vkCmdSetScissor"))
+        return (PFN_vkVoidFunction) vkCmdSetScissor;
     if (!strcmp(funcName, "vkCmdSetLineWidth"))
         return (PFN_vkVoidFunction) vkCmdSetLineWidth;
     if (!strcmp(funcName, "vkCmdSetDepthBias"))
index 4edea80f50ac56c8e8e920e568d744bd71d17ec4..ecd9486b8d39e1f6a95b9e5e293179864d5085fb 100644 (file)
@@ -167,6 +167,7 @@ typedef enum _CMD_TYPE
     CMD_BINDPIPELINE,
     CMD_BINDPIPELINEDELTA,
     CMD_SETVIEWPORTSTATE,
+    CMD_SETSCISSORSTATE,
     CMD_SETLINEWIDTHSTATE,
     CMD_SETDEPTHBIASSTATE,
     CMD_SETBLENDSTATE,
@@ -243,6 +244,7 @@ typedef enum _CBStatusFlagBits
     CBSTATUS_STENCIL_WRITE_MASK_SET            = 0x00000200, // Stencil write mask has been set
     CBSTATUS_STENCIL_REFERENCE_SET             = 0x00000400, // Stencil reference has been set
     CBSTATUS_INDEX_BUFFER_BOUND                = 0x00000800, // Index buffer has been set
+    CBSTATUS_SCISSOR_SET                       = 0x00001000, // Scissor has been set
 } CBStatusFlagBits;
 
 typedef struct stencil_data {
index 80df83876db7c4af4e4500f38a23427e495ab79d..36574f60cd8d73f5aae65ba1a6b5786302b210ec 100644 (file)
@@ -2237,8 +2237,25 @@ VK_LAYER_EXPORT void VKAPI vkCmdBindPipeline(
 
 VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(
     VkCmdBuffer                         cmdBuffer,
-    uint32_t                            viewportAndScissorCount,
-    const VkViewport*                   pViewports,
+    uint32_t                            viewportCount,
+    const VkViewport*                   pViewports)
+{
+    VkBool32 skipCall = VK_FALSE;
+    loader_platform_thread_lock_mutex(&globalLock);
+    MT_CB_INFO *pCmdBuf = get_cmd_buf_info(cmdBuffer);
+    if (!pCmdBuf) {
+        skipCall = log_msg(mdd(cmdBuffer), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_COMMAND_BUFFER, (uint64_t)cmdBuffer, 0,
+                       MEMTRACK_INVALID_CB, "MEM", "Unable to find command buffer object %p, was it ever created?", (void*)cmdBuffer);
+    }
+    loader_platform_thread_unlock_mutex(&globalLock);
+    if (VK_FALSE == skipCall) {
+        get_dispatch_table(mem_tracker_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportCount, pViewports);
+    }
+}
+
+VK_LAYER_EXPORT void VKAPI vkCmdSetScissor(
+    VkCmdBuffer                         cmdBuffer,
+    uint32_t                            scissorCount,
     const VkRect2D*                     pScissors)
 {
     VkBool32 skipCall = VK_FALSE;
@@ -2250,7 +2267,7 @@ VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(
     }
     loader_platform_thread_unlock_mutex(&globalLock);
     if (VK_FALSE == skipCall) {
-        get_dispatch_table(mem_tracker_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportAndScissorCount, pViewports, pScissors);
+        get_dispatch_table(mem_tracker_device_table_map, cmdBuffer)->CmdSetScissor(cmdBuffer, scissorCount, pScissors);
     }
 }
 
@@ -2949,6 +2966,8 @@ VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI vkGetDeviceProcAddr(
         return (PFN_vkVoidFunction) vkCmdBindPipeline;
     if (!strcmp(funcName, "vkCmdSetViewport"))
         return (PFN_vkVoidFunction) vkCmdSetViewport;
+    if (!strcmp(funcName, "vkCmdSetScissor"))
+        return (PFN_vkVoidFunction) vkCmdSetScissor;
     if (!strcmp(funcName, "vkCmdSetLineWidth"))
         return (PFN_vkVoidFunction) vkCmdSetLineWidth;
     if (!strcmp(funcName, "vkCmdSetDepthBias"))
index 029d085f19a60ad685c50e3da6f13744752befba..2ffeefa6775ffeea35f24831a2c8c74523bef797 100644 (file)
@@ -5497,9 +5497,14 @@ VK_LAYER_EXPORT void VKAPI vkCmdBindPipeline(
     PostCmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline);
 }
 
-VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportAndScissorCount, const VkViewport* pViewports, const VkRect2D* pScissors)
+VK_LAYER_EXPORT void VKAPI vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports)
 {
-    get_dispatch_table(pc_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportAndScissorCount, pViewports, pScissors);
+    get_dispatch_table(pc_device_table_map, cmdBuffer)->CmdSetViewport(cmdBuffer, viewportCount, pViewports);
+}
+
+VK_LAYER_EXPORT void VKAPI vkCmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors)
+{
+    get_dispatch_table(pc_device_table_map, cmdBuffer)->CmdSetScissor(cmdBuffer, scissorCount, pScissors);
 }
 
 VK_LAYER_EXPORT void VKAPI vkCmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth)
@@ -6982,6 +6987,8 @@ VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI vkGetDeviceProcAddr(VkDevice device, co
         return (PFN_vkVoidFunction) vkAllocDescriptorSets;
     if (!strcmp(funcName, "vkCmdSetViewport"))
         return (PFN_vkVoidFunction) vkCmdSetViewport;
+    if (!strcmp(funcName, "vkCmdSetScissor"))
+        return (PFN_vkVoidFunction) vkCmdSetScissor;
     if (!strcmp(funcName, "vkCmdSetLineWidth"))
         return (PFN_vkVoidFunction) vkCmdSetLineWidth;
     if (!strcmp(funcName, "vkCmdSetDepthBias"))
index 212e93eaca27a5e077b94a2610cbc44195ddc436..bc5c7b6098734c985f349f2d8e0461941f27af1c 100644 (file)
@@ -235,6 +235,8 @@ static inline void* globalGetProcAddr(const char *name)
         return (void*) vkCmdBindPipeline;
     if (!strcmp(name, "CmdSetViewport"))
         return (void*) vkCmdSetViewport;
+    if (!strcmp(name, "CmdSetScissor"))
+        return (void*) vkCmdSetScissor;
     if (!strcmp(name, "CmdSetLineWidth"))
         return (void*) vkCmdSetLineWidth;
     if (!strcmp(name, "CmdSetDepthBias"))
index 7024532f647e2776e5bdfb057027feddb3ad249f..6c732d0a85ada67562a72ad988e1b3bdbea63a9c 100644 (file)
@@ -123,6 +123,7 @@ static inline void loader_init_device_dispatch_table(VkLayerDispatchTable *table
     table->ResetCommandBuffer = (PFN_vkResetCommandBuffer) gpa(dev, "vkResetCommandBuffer");
     table->CmdBindPipeline = (PFN_vkCmdBindPipeline) gpa(dev, "vkCmdBindPipeline");
     table->CmdSetViewport = (PFN_vkCmdSetViewport) gpa(dev, "vkCmdSetViewport");
+    table->CmdSetScissor = (PFN_vkCmdSetScissor) gpa(dev, "vkCmdSetScissor");
     table->CmdSetLineWidth = (PFN_vkCmdSetLineWidth) gpa(dev, "vkCmdSetLineWidth");
     table->CmdSetDepthBias = (PFN_vkCmdSetDepthBias) gpa(dev, "vkCmdSetDepthBias");
     table->CmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) gpa(dev, "vkCmdSetBlendConstants");
@@ -360,6 +361,8 @@ static inline void *loader_lookup_device_dispatch_table(
         return (void *) table->CmdBindPipeline;
     if (!strcmp(name, "CmdSetViewport"))
         return (void *) table->CmdSetViewport;
+    if (!strcmp(name, "CmdSetScissor"))
+        return (void *) table->CmdSetScissor;
     if (!strcmp(name, "CmdSetLineWidth"))
         return (void *) table->CmdSetLineWidth;
     if (!strcmp(name, "CmdSetDepthBias"))
index bd6f43b8d203ed921591b2b68c731a6470f14b17..5074f3b21ba9737594f933269765050c8de1b8d7 100644 (file)
@@ -1112,13 +1112,22 @@ LOADER_EXPORT void VKAPI vkCmdBindPipeline(VkCmdBuffer cmdBuffer, VkPipelineBind
     disp->CmdBindPipeline(cmdBuffer, pipelineBindPoint, pipeline);
 }
 
-LOADER_EXPORT void VKAPI vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportAndScissorCount, const VkViewport* pViewports, const VkRect2D* pScissors)
+LOADER_EXPORT void VKAPI vkCmdSetViewport(VkCmdBuffer cmdBuffer, uint32_t viewportCount, const VkViewport* pViewports)
 {
     const VkLayerDispatchTable *disp;
 
     disp = loader_get_dispatch(cmdBuffer);
 
-    disp->CmdSetViewport(cmdBuffer, viewportAndScissorCount, pViewports, pScissors);
+    disp->CmdSetViewport(cmdBuffer, viewportCount, pViewports);
+}
+
+LOADER_EXPORT void VKAPI vkCmdSetScissor(VkCmdBuffer cmdBuffer, uint32_t scissorCount, const VkRect2D* pScissors)
+{
+    const VkLayerDispatchTable *disp;
+
+    disp = loader_get_dispatch(cmdBuffer);
+
+    disp->CmdSetScissor(cmdBuffer, scissorCount, pScissors);
 }
 
 LOADER_EXPORT void VKAPI vkCmdSetLineWidth(VkCmdBuffer cmdBuffer, float lineWidth)
index e508d01afbb4da25260ad35ede225cefaaa749c7..880a1079bdfe82c9aa106598d659e6815ef97ce5 100755 (executable)
--- a/vulkan.py
+++ b/vulkan.py
@@ -953,8 +953,12 @@ core = Extension(
 
         Proto("void", "CmdSetViewport",
             [Param("VkCmdBuffer", "cmdBuffer"),
-             Param("uint32_t", "viewportAndScissorCount"),
-             Param("const VkViewport*", "pViewports"),
+             Param("uint32_t", "viewportCount"),
+             Param("const VkViewport*", "pViewports")]),
+
+        Proto("void", "CmdSetScissor",
+            [Param("VkCmdBuffer", "cmdBuffer"),
+             Param("uint32_t", "scissorCount"),
              Param("const VkRect2D*", "pScissors")]),
 
         Proto("void", "CmdSetLineWidth",