[{"data":1,"prerenderedAt":917},["ShallowReactive",2],{"MyYitwVrSj":3},{"title":4,"description":5,"parent":6,"cmd_buf_level":7,"render_pass_scope":10,"supported_queue_types":11,"tasks":13,"type":15,"xrefs":16,"body":17,"_type":916,"_id":4},"vkCmdSetScissor","Set scissor rectangles dynamically for a command buffer","VK_VERSION_1_0",[8,9],"primary","secondary","both",[12],"graphics",[14],"state","protos",[],{"type":18,"children":19,"toc":914},"root",[20,37,309,365,391,441,713,862,908],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,35],{"type":26,"value":27},"text","To ",{"type":21,"tag":29,"props":30,"children":32},"a",{"href":31},"/chapters/pipelines#pipelines-dynamic-state",[33],{"type":26,"value":34},"dynamically set",{"type":26,"value":36}," the scissor rectangles,\ncall:",{"type":21,"tag":38,"props":39,"children":40},"code-group",{},[41,162],{"type":21,"tag":42,"props":43,"children":49},"pre",{"className":44,"code":45,"filename":46,"language":47,"meta":48,"style":48},"language-c shiki shiki-themes github-light-default github-dark-default","void vkCmdSetScissor(\n VkCommandBuffer commandBuffer,\n uint32_t firstScissor,\n uint32_t scissorCount,\n const VkRect2D* pScissors);\n","C","c","",[50],{"type":21,"tag":51,"props":52,"children":53},"code",{"__ignoreMap":48},[54,78,98,116,133],{"type":21,"tag":55,"props":56,"children":59},"span",{"class":57,"line":58},"line",1,[60,66,72],{"type":21,"tag":55,"props":61,"children":63},{"style":62},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[64],{"type":26,"value":65},"void",{"type":21,"tag":55,"props":67,"children":69},{"style":68},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[70],{"type":26,"value":71}," vkCmdSetScissor",{"type":21,"tag":55,"props":73,"children":75},{"style":74},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[76],{"type":26,"value":77},"(\n",{"type":21,"tag":55,"props":79,"children":81},{"class":57,"line":80},2,[82,87,93],{"type":21,"tag":55,"props":83,"children":84},{"style":74},[85],{"type":26,"value":86}," VkCommandBuffer ",{"type":21,"tag":55,"props":88,"children":90},{"style":89},"--shiki-default:#953800;--shiki-dark:#FFA657",[91],{"type":26,"value":92},"commandBuffer",{"type":21,"tag":55,"props":94,"children":95},{"style":74},[96],{"type":26,"value":97},",\n",{"type":21,"tag":55,"props":99,"children":101},{"class":57,"line":100},3,[102,107,112],{"type":21,"tag":55,"props":103,"children":104},{"style":62},[105],{"type":26,"value":106}," uint32_t",{"type":21,"tag":55,"props":108,"children":109},{"style":89},[110],{"type":26,"value":111}," firstScissor",{"type":21,"tag":55,"props":113,"children":114},{"style":74},[115],{"type":26,"value":97},{"type":21,"tag":55,"props":117,"children":119},{"class":57,"line":118},4,[120,124,129],{"type":21,"tag":55,"props":121,"children":122},{"style":62},[123],{"type":26,"value":106},{"type":21,"tag":55,"props":125,"children":126},{"style":89},[127],{"type":26,"value":128}," scissorCount",{"type":21,"tag":55,"props":130,"children":131},{"style":74},[132],{"type":26,"value":97},{"type":21,"tag":55,"props":134,"children":136},{"class":57,"line":135},5,[137,142,147,152,157],{"type":21,"tag":55,"props":138,"children":139},{"style":62},[140],{"type":26,"value":141}," const",{"type":21,"tag":55,"props":143,"children":144},{"style":74},[145],{"type":26,"value":146}," VkRect2D",{"type":21,"tag":55,"props":148,"children":149},{"style":62},[150],{"type":26,"value":151},"*",{"type":21,"tag":55,"props":153,"children":154},{"style":89},[155],{"type":26,"value":156}," pScissors",{"type":21,"tag":55,"props":158,"children":159},{"style":74},[160],{"type":26,"value":161},");\n",{"type":21,"tag":42,"props":163,"children":168},{"className":164,"code":165,"filename":166,"language":167,"meta":48,"style":48},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_set_scissor(\n command_buffer: vk::CommandBuffer,\n first_scissor: u32,\n scissor_count: u32,\n p_scissors: *const vk::Rect2D,\n);\n","Rust","rs",[169],{"type":21,"tag":51,"props":170,"children":171},{"__ignoreMap":48},[172,194,226,247,267,301],{"type":21,"tag":55,"props":173,"children":174},{"class":57,"line":58},[175,180,185,190],{"type":21,"tag":55,"props":176,"children":177},{"style":62},[178],{"type":26,"value":179},"pub",{"type":21,"tag":55,"props":181,"children":182},{"style":62},[183],{"type":26,"value":184}," fn",{"type":21,"tag":55,"props":186,"children":187},{"style":68},[188],{"type":26,"value":189}," cmd_set_scissor",{"type":21,"tag":55,"props":191,"children":192},{"style":74},[193],{"type":26,"value":77},{"type":21,"tag":55,"props":195,"children":196},{"class":57,"line":80},[197,202,207,212,217,222],{"type":21,"tag":55,"props":198,"children":199},{"style":74},[200],{"type":26,"value":201}," command_buffer",{"type":21,"tag":55,"props":203,"children":204},{"style":62},[205],{"type":26,"value":206},":",{"type":21,"tag":55,"props":208,"children":209},{"style":89},[210],{"type":26,"value":211}," vk",{"type":21,"tag":55,"props":213,"children":214},{"style":62},[215],{"type":26,"value":216},"::",{"type":21,"tag":55,"props":218,"children":219},{"style":89},[220],{"type":26,"value":221},"CommandBuffer",{"type":21,"tag":55,"props":223,"children":224},{"style":74},[225],{"type":26,"value":97},{"type":21,"tag":55,"props":227,"children":228},{"class":57,"line":100},[229,234,238,243],{"type":21,"tag":55,"props":230,"children":231},{"style":74},[232],{"type":26,"value":233}," first_scissor",{"type":21,"tag":55,"props":235,"children":236},{"style":62},[237],{"type":26,"value":206},{"type":21,"tag":55,"props":239,"children":240},{"style":89},[241],{"type":26,"value":242}," u32",{"type":21,"tag":55,"props":244,"children":245},{"style":74},[246],{"type":26,"value":97},{"type":21,"tag":55,"props":248,"children":249},{"class":57,"line":118},[250,255,259,263],{"type":21,"tag":55,"props":251,"children":252},{"style":74},[253],{"type":26,"value":254}," scissor_count",{"type":21,"tag":55,"props":256,"children":257},{"style":62},[258],{"type":26,"value":206},{"type":21,"tag":55,"props":260,"children":261},{"style":89},[262],{"type":26,"value":242},{"type":21,"tag":55,"props":264,"children":265},{"style":74},[266],{"type":26,"value":97},{"type":21,"tag":55,"props":268,"children":269},{"class":57,"line":135},[270,275,279,284,288,292,297],{"type":21,"tag":55,"props":271,"children":272},{"style":74},[273],{"type":26,"value":274}," p_scissors",{"type":21,"tag":55,"props":276,"children":277},{"style":62},[278],{"type":26,"value":206},{"type":21,"tag":55,"props":280,"children":281},{"style":62},[282],{"type":26,"value":283}," *const",{"type":21,"tag":55,"props":285,"children":286},{"style":89},[287],{"type":26,"value":211},{"type":21,"tag":55,"props":289,"children":290},{"style":62},[291],{"type":26,"value":216},{"type":21,"tag":55,"props":293,"children":294},{"style":89},[295],{"type":26,"value":296},"Rect2D",{"type":21,"tag":55,"props":298,"children":299},{"style":74},[300],{"type":26,"value":97},{"type":21,"tag":55,"props":302,"children":304},{"class":57,"line":303},6,[305],{"type":21,"tag":55,"props":306,"children":307},{"style":74},[308],{"type":26,"value":161},{"type":21,"tag":310,"props":311,"children":312},"ul",{},[313,324,335,346],{"type":21,"tag":314,"props":315,"children":316},"li",{},[317,322],{"type":21,"tag":51,"props":318,"children":320},{"className":319},[],[321],{"type":26,"value":92},{"type":26,"value":323}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":314,"props":325,"children":326},{},[327,333],{"type":21,"tag":51,"props":328,"children":330},{"className":329},[],[331],{"type":26,"value":332},"firstScissor",{"type":26,"value":334}," is the index of the first scissor whose state is\nupdated by the command.",{"type":21,"tag":314,"props":336,"children":337},{},[338,344],{"type":21,"tag":51,"props":339,"children":341},{"className":340},[],[342],{"type":26,"value":343},"scissorCount",{"type":26,"value":345}," is the number of scissors whose rectangles are\nupdated by the command.",{"type":21,"tag":314,"props":347,"children":348},{},[349,355,357,363],{"type":21,"tag":51,"props":350,"children":352},{"className":351},[],[353],{"type":26,"value":354},"pScissors",{"type":26,"value":356}," is a pointer to an array of ",{"type":21,"tag":29,"props":358,"children":360},{"href":359},"/man/VkRect2D",[361],{"type":26,"value":362},"VkRect2D",{"type":26,"value":364}," structures\ndefining scissor rectangles.",{"type":21,"tag":22,"props":366,"children":367},{},[368,370,375,377,382,384,389],{"type":26,"value":369},"The scissor rectangles taken from element i of ",{"type":21,"tag":51,"props":371,"children":373},{"className":372},[],[374],{"type":26,"value":354},{"type":26,"value":376}," replace\nthe current state for the scissor index ",{"type":21,"tag":51,"props":378,"children":380},{"className":379},[],[381],{"type":26,"value":332},{"type":26,"value":383}," + i,\nfor i in [0, ",{"type":21,"tag":51,"props":385,"children":387},{"className":386},[],[388],{"type":26,"value":343},{"type":26,"value":390},").",{"type":21,"tag":22,"props":392,"children":393},{},[394,396,402,404,410,412,418,419,425,427,433,434,439],{"type":26,"value":395},"This command sets the scissor rectangles for subsequent drawing commands\nwhen drawing using ",{"type":21,"tag":29,"props":397,"children":399},{"href":398},"/chapters/shaders#shaders-objects",[400],{"type":26,"value":401},"shader objects",{"type":26,"value":403},", or\nwhen the graphics pipeline is created with ",{"type":21,"tag":51,"props":405,"children":407},{"className":406},[],[408],{"type":26,"value":409},"VK_DYNAMIC_STATE_SCISSOR",{"type":26,"value":411},"\nset in ",{"type":21,"tag":29,"props":413,"children":415},{"href":414},"/man/VkPipelineDynamicStateCreateInfo",[416],{"type":26,"value":417},"VkPipelineDynamicStateCreateInfo",{"type":26,"value":216},{"type":21,"tag":51,"props":420,"children":422},{"className":421},[],[423],{"type":26,"value":424},"pDynamicStates",{"type":26,"value":426},".\nOtherwise, this state is specified by the\n",{"type":21,"tag":29,"props":428,"children":430},{"href":429},"/man/VkPipelineViewportStateCreateInfo",[431],{"type":26,"value":432},"VkPipelineViewportStateCreateInfo",{"type":26,"value":216},{"type":21,"tag":51,"props":435,"children":437},{"className":436},[],[438],{"type":26,"value":354},{"type":26,"value":440}," values used to\ncreate the currently active pipeline.",{"type":21,"tag":442,"props":443,"children":445},"validity-group",{"name":444},"Valid Usage",[446,499,537,569,617,652,684],{"type":21,"tag":447,"props":448,"children":450},"validity-field",{"name":449},"VUID-vkCmdSetScissor-firstScissor-00592",[451],{"type":21,"tag":22,"props":452,"children":453},{},[454,456,461,463,468,470,475,477,483,484,490,491,497],{"type":26,"value":455},"The sum of ",{"type":21,"tag":51,"props":457,"children":459},{"className":458},[],[460],{"type":26,"value":332},{"type":26,"value":462}," and ",{"type":21,"tag":51,"props":464,"children":466},{"className":465},[],[467],{"type":26,"value":343},{"type":26,"value":469}," ",{"type":21,"tag":471,"props":472,"children":474},"normative",{"type":473},"must",[],{"type":26,"value":476}," be between\n",{"type":21,"tag":51,"props":478,"children":480},{"className":479},[],[481],{"type":26,"value":482},"1",{"type":26,"value":462},{"type":21,"tag":51,"props":485,"children":487},{"className":486},[],[488],{"type":26,"value":489},"VkPhysicalDeviceLimits",{"type":26,"value":216},{"type":21,"tag":51,"props":492,"children":494},{"className":493},[],[495],{"type":26,"value":496},"maxViewports",{"type":26,"value":498},", inclusive",{"type":21,"tag":447,"props":500,"children":502},{"name":501},"VUID-vkCmdSetScissor-firstScissor-00593",[503],{"type":21,"tag":22,"props":504,"children":505},{},[506,508,518,520,525,526,529,531],{"type":26,"value":507},"If the ",{"type":21,"tag":29,"props":509,"children":511},{"href":510},"/man/VkPhysicalDeviceFeatures#features-multiViewport",[512],{"type":21,"tag":51,"props":513,"children":515},{"className":514},[],[516],{"type":26,"value":517},"multiViewport",{"type":26,"value":519}," feature is not\nenabled, ",{"type":21,"tag":51,"props":521,"children":523},{"className":522},[],[524],{"type":26,"value":332},{"type":26,"value":469},{"type":21,"tag":471,"props":527,"children":528},{"type":473},[],{"type":26,"value":530}," be ",{"type":21,"tag":51,"props":532,"children":534},{"className":533},[],[535],{"type":26,"value":536},"0",{"type":21,"tag":447,"props":538,"children":540},{"name":539},"VUID-vkCmdSetScissor-scissorCount-00594",[541],{"type":21,"tag":22,"props":542,"children":543},{},[544,545,553,554,559,560,563,564],{"type":26,"value":507},{"type":21,"tag":29,"props":546,"children":547},{"href":510},[548],{"type":21,"tag":51,"props":549,"children":551},{"className":550},[],[552],{"type":26,"value":517},{"type":26,"value":519},{"type":21,"tag":51,"props":555,"children":557},{"className":556},[],[558],{"type":26,"value":343},{"type":26,"value":469},{"type":21,"tag":471,"props":561,"children":562},{"type":473},[],{"type":26,"value":530},{"type":21,"tag":51,"props":565,"children":567},{"className":566},[],[568],{"type":26,"value":482},{"type":21,"tag":447,"props":570,"children":572},{"name":571},"VUID-vkCmdSetScissor-x-00595",[573],{"type":21,"tag":22,"props":574,"children":575},{},[576,578,584,585,591,593,599,601,606,607,610,612],{"type":26,"value":577},"The ",{"type":21,"tag":51,"props":579,"children":581},{"className":580},[],[582],{"type":26,"value":583},"x",{"type":26,"value":462},{"type":21,"tag":51,"props":586,"children":588},{"className":587},[],[589],{"type":26,"value":590},"y",{"type":26,"value":592}," members of ",{"type":21,"tag":51,"props":594,"children":596},{"className":595},[],[597],{"type":26,"value":598},"offset",{"type":26,"value":600}," member of any element of\n",{"type":21,"tag":51,"props":602,"children":604},{"className":603},[],[605],{"type":26,"value":354},{"type":26,"value":469},{"type":21,"tag":471,"props":608,"children":609},{"type":473},[],{"type":26,"value":611}," be greater than or equal to ",{"type":21,"tag":51,"props":613,"children":615},{"className":614},[],[616],{"type":26,"value":536},{"type":21,"tag":447,"props":618,"children":620},{"name":619},"VUID-vkCmdSetScissor-offset-00596",[621],{"type":21,"tag":22,"props":622,"children":623},{},[624,626,632,634,640,642,645,647],{"type":26,"value":625},"Evaluation of (",{"type":21,"tag":51,"props":627,"children":629},{"className":628},[],[630],{"type":26,"value":631},"offset.x",{"type":26,"value":633}," + ",{"type":21,"tag":51,"props":635,"children":637},{"className":636},[],[638],{"type":26,"value":639},"extent.width",{"type":26,"value":641},") ",{"type":21,"tag":471,"props":643,"children":644},{"type":473},[],{"type":26,"value":646}," not\ncause a signed integer addition overflow for any element of\n",{"type":21,"tag":51,"props":648,"children":650},{"className":649},[],[651],{"type":26,"value":354},{"type":21,"tag":447,"props":653,"children":655},{"name":654},"VUID-vkCmdSetScissor-offset-00597",[656],{"type":21,"tag":22,"props":657,"children":658},{},[659,660,666,667,673,674,677,679],{"type":26,"value":625},{"type":21,"tag":51,"props":661,"children":663},{"className":662},[],[664],{"type":26,"value":665},"offset.y",{"type":26,"value":633},{"type":21,"tag":51,"props":668,"children":670},{"className":669},[],[671],{"type":26,"value":672},"extent.height",{"type":26,"value":641},{"type":21,"tag":471,"props":675,"children":676},{"type":473},[],{"type":26,"value":678},"\nnot cause a signed integer addition overflow for any element of\n",{"type":21,"tag":51,"props":680,"children":682},{"className":681},[],[683],{"type":26,"value":354},{"type":21,"tag":447,"props":685,"children":687},{"name":686},"VUID-vkCmdSetScissor-viewportScissor2D-04789",[688],{"type":21,"tag":22,"props":689,"children":690},{},[691,693,699,700,706,708,711],{"type":26,"value":692},"If this command is recorded in a secondary command buffer with\n",{"type":21,"tag":29,"props":694,"children":696},{"href":695},"/man/VkCommandBufferInheritanceViewportScissorInfoNV",[697],{"type":26,"value":698},"VkCommandBufferInheritanceViewportScissorInfoNV",{"type":26,"value":216},{"type":21,"tag":51,"props":701,"children":703},{"className":702},[],[704],{"type":26,"value":705},"viewportScissor2D",{"type":26,"value":707},"\nenabled, then this function ",{"type":21,"tag":471,"props":709,"children":710},{"type":473},[],{"type":26,"value":712}," not be called",{"type":21,"tag":442,"props":714,"children":716},{"name":715},"Valid Usage (Implicit)",[717,743,773,797,825,839],{"type":21,"tag":447,"props":718,"children":720},{"name":719},"VUID-vkCmdSetScissor-commandBuffer-parameter",[721],{"type":21,"tag":22,"props":722,"children":723},{},[724,729,730,733,735,741],{"type":21,"tag":51,"props":725,"children":727},{"className":726},[],[728],{"type":26,"value":92},{"type":26,"value":469},{"type":21,"tag":471,"props":731,"children":732},{"type":473},[],{"type":26,"value":734}," be a valid ",{"type":21,"tag":29,"props":736,"children":738},{"href":737},"/man/VkCommandBuffer",[739],{"type":26,"value":740},"VkCommandBuffer",{"type":26,"value":742}," handle",{"type":21,"tag":447,"props":744,"children":746},{"name":745},"VUID-vkCmdSetScissor-pScissors-parameter",[747],{"type":21,"tag":22,"props":748,"children":749},{},[750,755,756,759,761,766,767,771],{"type":21,"tag":51,"props":751,"children":753},{"className":752},[],[754],{"type":26,"value":354},{"type":26,"value":469},{"type":21,"tag":471,"props":757,"children":758},{"type":473},[],{"type":26,"value":760}," be a valid pointer to an array of ",{"type":21,"tag":51,"props":762,"children":764},{"className":763},[],[765],{"type":26,"value":343},{"type":26,"value":469},{"type":21,"tag":29,"props":768,"children":769},{"href":359},[770],{"type":26,"value":362},{"type":26,"value":772}," structures",{"type":21,"tag":447,"props":774,"children":776},{"name":775},"VUID-vkCmdSetScissor-commandBuffer-recording",[777],{"type":21,"tag":22,"props":778,"children":779},{},[780,785,786,789,791],{"type":21,"tag":51,"props":781,"children":783},{"className":782},[],[784],{"type":26,"value":92},{"type":26,"value":469},{"type":21,"tag":471,"props":787,"children":788},{"type":473},[],{"type":26,"value":790}," be in the ",{"type":21,"tag":29,"props":792,"children":794},{"href":793},"/chapters/commandbuffers#commandbuffers-lifecycle",[795],{"type":26,"value":796},"recording state",{"type":21,"tag":447,"props":798,"children":800},{"name":799},"VUID-vkCmdSetScissor-commandBuffer-cmdpool",[801],{"type":21,"tag":22,"props":802,"children":803},{},[804,805,811,813,818,820,823],{"type":26,"value":577},{"type":21,"tag":51,"props":806,"children":808},{"className":807},[],[809],{"type":26,"value":810},"VkCommandPool",{"type":26,"value":812}," that ",{"type":21,"tag":51,"props":814,"children":816},{"className":815},[],[817],{"type":26,"value":92},{"type":26,"value":819}," was allocated from ",{"type":21,"tag":471,"props":821,"children":822},{"type":473},[],{"type":26,"value":824}," support graphics operations",{"type":21,"tag":447,"props":826,"children":828},{"name":827},"VUID-vkCmdSetScissor-videocoding",[829],{"type":21,"tag":22,"props":830,"children":831},{},[832,834,837],{"type":26,"value":833},"This command ",{"type":21,"tag":471,"props":835,"children":836},{"type":473},[],{"type":26,"value":838}," only be called outside of a video coding scope",{"type":21,"tag":447,"props":840,"children":842},{"name":841},"VUID-vkCmdSetScissor-scissorCount-arraylength",[843],{"type":21,"tag":22,"props":844,"children":845},{},[846,851,852,855,857],{"type":21,"tag":51,"props":847,"children":849},{"className":848},[],[850],{"type":26,"value":343},{"type":26,"value":469},{"type":21,"tag":471,"props":853,"children":854},{"type":473},[],{"type":26,"value":856}," be greater than ",{"type":21,"tag":51,"props":858,"children":860},{"className":859},[],[861],{"type":26,"value":536},{"type":21,"tag":863,"props":864,"children":866},"validity-box",{"name":865},"Host Synchronization",[867],{"type":21,"tag":310,"props":868,"children":869},{},[870,886],{"type":21,"tag":314,"props":871,"children":872},{},[873,875,880,881,884],{"type":26,"value":874},"Host access to ",{"type":21,"tag":51,"props":876,"children":878},{"className":877},[],[879],{"type":26,"value":92},{"type":26,"value":469},{"type":21,"tag":471,"props":882,"children":883},{"type":473},[],{"type":26,"value":885}," be externally synchronized",{"type":21,"tag":314,"props":887,"children":888},{},[889,891,896,897,902,903,906],{"type":26,"value":890},"Host access to the ",{"type":21,"tag":51,"props":892,"children":894},{"className":893},[],[895],{"type":26,"value":810},{"type":26,"value":812},{"type":21,"tag":51,"props":898,"children":900},{"className":899},[],[901],{"type":26,"value":92},{"type":26,"value":819},{"type":21,"tag":471,"props":904,"children":905},{"type":473},[],{"type":26,"value":907}," be externally synchronized\n::",{"type":21,"tag":909,"props":910,"children":911},"style",{},[912],{"type":26,"value":913},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":48,"searchDepth":80,"depth":80,"links":915},[],"markdown",1729612506356]