[{"data":1,"prerenderedAt":856},["ShallowReactive",2],{"ZogKwJIfnt":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":855,"_id":4},"vkCmdSetDiscardRectangleEXT","Set discard rectangles dynamically for a command buffer","VK_EXT_discard_rectangles",[8,9],"primary","secondary","both",[12],"graphics",[14],"state","protos",[],{"type":18,"children":19,"toc":853},"root",[20,37,309,365,391,441,652,801,847],{"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 discard 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 vkCmdSetDiscardRectangleEXT(\n VkCommandBuffer commandBuffer,\n uint32_t firstDiscardRectangle,\n uint32_t discardRectangleCount,\n const VkRect2D* pDiscardRectangles);\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}," vkCmdSetDiscardRectangleEXT",{"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}," firstDiscardRectangle",{"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}," discardRectangleCount",{"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}," pDiscardRectangles",{"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_discard_rectangle_ext(\n command_buffer: vk::CommandBuffer,\n first_discard_rectangle: u32,\n discard_rectangle_count: u32,\n p_discard_rectangles: *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_discard_rectangle_ext",{"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_discard_rectangle",{"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}," discard_rectangle_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_discard_rectangles",{"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},"firstDiscardRectangle",{"type":26,"value":334}," is the index of the first discard rectangle\nwhose state is updated 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},"discardRectangleCount",{"type":26,"value":345}," is the number of discard rectangles whose\nstate are updated 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},"pDiscardRectangles",{"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},"\nstructures specifying discard rectangles.",{"type":21,"tag":22,"props":366,"children":367},{},[368,370,375,377,382,384,389],{"type":26,"value":369},"The discard rectangle taken from element i of ",{"type":21,"tag":51,"props":371,"children":373},{"className":372},[],[374],{"type":26,"value":354},{"type":26,"value":376},"\nreplace the current state for the discard rectangle at index\n",{"type":21,"tag":51,"props":378,"children":380},{"className":379},[],[381],{"type":26,"value":332},{"type":26,"value":383}," + i, for i in [0,\n",{"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 discard 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\n",{"type":21,"tag":51,"props":405,"children":407},{"className":406},[],[408],{"type":26,"value":409},"VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT",{"type":26,"value":411}," set in\n",{"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/VkPipelineDiscardRectangleStateCreateInfoEXT",[431],{"type":26,"value":432},"VkPipelineDiscardRectangleStateCreateInfoEXT",{"type":26,"value":216},{"type":21,"tag":51,"props":435,"children":437},{"className":436},[],[438],{"type":26,"value":354},{"type":26,"value":440},"\nvalues used to create the currently active pipeline.",{"type":21,"tag":442,"props":443,"children":445},"validity-group",{"name":444},"Valid Usage",[446,488,544,586,623],{"type":21,"tag":447,"props":448,"children":450},"validity-field",{"name":449},"VUID-vkCmdSetDiscardRectangleEXT-firstDiscardRectangle-00585",[451],{"type":21,"tag":22,"props":452,"children":453},{},[454,456,461,463,468,473,475,481,482],{"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":21,"tag":469,"props":470,"children":472},"normative",{"type":471},"must",[],{"type":26,"value":474}," be less than or equal to\n",{"type":21,"tag":29,"props":476,"children":478},{"href":477},"/man/VkPhysicalDeviceDiscardRectanglePropertiesEXT",[479],{"type":26,"value":480},"VkPhysicalDeviceDiscardRectanglePropertiesEXT",{"type":26,"value":216},{"type":21,"tag":51,"props":483,"children":485},{"className":484},[],[486],{"type":26,"value":487},"maxDiscardRectangles",{"type":21,"tag":447,"props":489,"children":491},{"name":490},"VUID-vkCmdSetDiscardRectangleEXT-x-00587",[492],{"type":21,"tag":22,"props":493,"children":494},{},[495,497,503,504,510,512,518,520,524,526,531,533,536,538],{"type":26,"value":496},"The ",{"type":21,"tag":51,"props":498,"children":500},{"className":499},[],[501],{"type":26,"value":502},"x",{"type":26,"value":462},{"type":21,"tag":51,"props":505,"children":507},{"className":506},[],[508],{"type":26,"value":509},"y",{"type":26,"value":511}," member of ",{"type":21,"tag":51,"props":513,"children":515},{"className":514},[],[516],{"type":26,"value":517},"offset",{"type":26,"value":519}," in each ",{"type":21,"tag":29,"props":521,"children":522},{"href":359},[523],{"type":26,"value":362},{"type":26,"value":525},"\nelement of ",{"type":21,"tag":51,"props":527,"children":529},{"className":528},[],[530],{"type":26,"value":354},{"type":26,"value":532}," ",{"type":21,"tag":469,"props":534,"children":535},{"type":471},[],{"type":26,"value":537}," be greater than or equal to\n",{"type":21,"tag":51,"props":539,"children":541},{"className":540},[],[542],{"type":26,"value":543},"0",{"type":21,"tag":447,"props":545,"children":547},{"name":546},"VUID-vkCmdSetDiscardRectangleEXT-offset-00588",[548],{"type":21,"tag":22,"props":549,"children":550},{},[551,553,559,561,567,569,573,575,580,581,584],{"type":26,"value":552},"Evaluation of (",{"type":21,"tag":51,"props":554,"children":556},{"className":555},[],[557],{"type":26,"value":558},"offset.x",{"type":26,"value":560}," + ",{"type":21,"tag":51,"props":562,"children":564},{"className":563},[],[565],{"type":26,"value":566},"extent.width",{"type":26,"value":568},") in each\n",{"type":21,"tag":29,"props":570,"children":571},{"href":359},[572],{"type":26,"value":362},{"type":26,"value":574}," element of ",{"type":21,"tag":51,"props":576,"children":578},{"className":577},[],[579],{"type":26,"value":354},{"type":26,"value":532},{"type":21,"tag":469,"props":582,"children":583},{"type":471},[],{"type":26,"value":585}," not cause a\nsigned integer addition overflow",{"type":21,"tag":447,"props":587,"children":589},{"name":588},"VUID-vkCmdSetDiscardRectangleEXT-offset-00589",[590],{"type":21,"tag":22,"props":591,"children":592},{},[593,594,600,601,607,608,612,613,618,619,622],{"type":26,"value":552},{"type":21,"tag":51,"props":595,"children":597},{"className":596},[],[598],{"type":26,"value":599},"offset.y",{"type":26,"value":560},{"type":21,"tag":51,"props":602,"children":604},{"className":603},[],[605],{"type":26,"value":606},"extent.height",{"type":26,"value":568},{"type":21,"tag":29,"props":609,"children":610},{"href":359},[611],{"type":26,"value":362},{"type":26,"value":574},{"type":21,"tag":51,"props":614,"children":616},{"className":615},[],[617],{"type":26,"value":354},{"type":26,"value":532},{"type":21,"tag":469,"props":620,"children":621},{"type":471},[],{"type":26,"value":585},{"type":21,"tag":447,"props":624,"children":626},{"name":625},"VUID-vkCmdSetDiscardRectangleEXT-viewportScissor2D-04788",[627],{"type":21,"tag":22,"props":628,"children":629},{},[630,632,638,639,645,647,650],{"type":26,"value":631},"If this command is recorded in a secondary command buffer with\n",{"type":21,"tag":29,"props":633,"children":635},{"href":634},"/man/VkCommandBufferInheritanceViewportScissorInfoNV",[636],{"type":26,"value":637},"VkCommandBufferInheritanceViewportScissorInfoNV",{"type":26,"value":216},{"type":21,"tag":51,"props":640,"children":642},{"className":641},[],[643],{"type":26,"value":644},"viewportScissor2D",{"type":26,"value":646},"\nenabled, then this function ",{"type":21,"tag":469,"props":648,"children":649},{"type":471},[],{"type":26,"value":651}," not be called",{"type":21,"tag":442,"props":653,"children":655},{"name":654},"Valid Usage (Implicit)",[656,682,712,736,764,778],{"type":21,"tag":447,"props":657,"children":659},{"name":658},"VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-parameter",[660],{"type":21,"tag":22,"props":661,"children":662},{},[663,668,669,672,674,680],{"type":21,"tag":51,"props":664,"children":666},{"className":665},[],[667],{"type":26,"value":92},{"type":26,"value":532},{"type":21,"tag":469,"props":670,"children":671},{"type":471},[],{"type":26,"value":673}," be a valid ",{"type":21,"tag":29,"props":675,"children":677},{"href":676},"/man/VkCommandBuffer",[678],{"type":26,"value":679},"VkCommandBuffer",{"type":26,"value":681}," handle",{"type":21,"tag":447,"props":683,"children":685},{"name":684},"VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-parameter",[686],{"type":21,"tag":22,"props":687,"children":688},{},[689,694,695,698,700,705,706,710],{"type":21,"tag":51,"props":690,"children":692},{"className":691},[],[693],{"type":26,"value":354},{"type":26,"value":532},{"type":21,"tag":469,"props":696,"children":697},{"type":471},[],{"type":26,"value":699}," be a valid pointer to an array of ",{"type":21,"tag":51,"props":701,"children":703},{"className":702},[],[704],{"type":26,"value":343},{"type":26,"value":532},{"type":21,"tag":29,"props":707,"children":708},{"href":359},[709],{"type":26,"value":362},{"type":26,"value":711}," structures",{"type":21,"tag":447,"props":713,"children":715},{"name":714},"VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-recording",[716],{"type":21,"tag":22,"props":717,"children":718},{},[719,724,725,728,730],{"type":21,"tag":51,"props":720,"children":722},{"className":721},[],[723],{"type":26,"value":92},{"type":26,"value":532},{"type":21,"tag":469,"props":726,"children":727},{"type":471},[],{"type":26,"value":729}," be in the ",{"type":21,"tag":29,"props":731,"children":733},{"href":732},"/chapters/commandbuffers#commandbuffers-lifecycle",[734],{"type":26,"value":735},"recording state",{"type":21,"tag":447,"props":737,"children":739},{"name":738},"VUID-vkCmdSetDiscardRectangleEXT-commandBuffer-cmdpool",[740],{"type":21,"tag":22,"props":741,"children":742},{},[743,744,750,752,757,759,762],{"type":26,"value":496},{"type":21,"tag":51,"props":745,"children":747},{"className":746},[],[748],{"type":26,"value":749},"VkCommandPool",{"type":26,"value":751}," that ",{"type":21,"tag":51,"props":753,"children":755},{"className":754},[],[756],{"type":26,"value":92},{"type":26,"value":758}," was allocated from ",{"type":21,"tag":469,"props":760,"children":761},{"type":471},[],{"type":26,"value":763}," support graphics operations",{"type":21,"tag":447,"props":765,"children":767},{"name":766},"VUID-vkCmdSetDiscardRectangleEXT-videocoding",[768],{"type":21,"tag":22,"props":769,"children":770},{},[771,773,776],{"type":26,"value":772},"This command ",{"type":21,"tag":469,"props":774,"children":775},{"type":471},[],{"type":26,"value":777}," only be called outside of a video coding scope",{"type":21,"tag":447,"props":779,"children":781},{"name":780},"VUID-vkCmdSetDiscardRectangleEXT-discardRectangleCount-arraylength",[782],{"type":21,"tag":22,"props":783,"children":784},{},[785,790,791,794,796],{"type":21,"tag":51,"props":786,"children":788},{"className":787},[],[789],{"type":26,"value":343},{"type":26,"value":532},{"type":21,"tag":469,"props":792,"children":793},{"type":471},[],{"type":26,"value":795}," be greater than ",{"type":21,"tag":51,"props":797,"children":799},{"className":798},[],[800],{"type":26,"value":543},{"type":21,"tag":802,"props":803,"children":805},"validity-box",{"name":804},"Host Synchronization",[806],{"type":21,"tag":310,"props":807,"children":808},{},[809,825],{"type":21,"tag":314,"props":810,"children":811},{},[812,814,819,820,823],{"type":26,"value":813},"Host access to ",{"type":21,"tag":51,"props":815,"children":817},{"className":816},[],[818],{"type":26,"value":92},{"type":26,"value":532},{"type":21,"tag":469,"props":821,"children":822},{"type":471},[],{"type":26,"value":824}," be externally synchronized",{"type":21,"tag":314,"props":826,"children":827},{},[828,830,835,836,841,842,845],{"type":26,"value":829},"Host access to the ",{"type":21,"tag":51,"props":831,"children":833},{"className":832},[],[834],{"type":26,"value":749},{"type":26,"value":751},{"type":21,"tag":51,"props":837,"children":839},{"className":838},[],[840],{"type":26,"value":92},{"type":26,"value":758},{"type":21,"tag":469,"props":843,"children":844},{"type":471},[],{"type":26,"value":846}," be externally synchronized\n::",{"type":21,"tag":848,"props":849,"children":850},"style",{},[851],{"type":26,"value":852},"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":854},[],"markdown",1729612505060]