[{"data":1,"prerenderedAt":585},["ShallowReactive",2],{"91EMoIAIhc":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":584,"_id":4},"vkCmdSetStencilWriteMask","Set stencil write mask dynamically for a command buffer","VK_VERSION_1_0",[8,9],"primary","secondary","both",[12],"graphics",[14],"state","protos",[],{"type":18,"children":19,"toc":582},"root",[20,37,257,309,380,530,576],{"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 stencil write mask,\ncall:",{"type":21,"tag":38,"props":39,"children":40},"code-group",{},[41,135],{"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 vkCmdSetStencilWriteMask(\n VkCommandBuffer commandBuffer,\n VkStencilFaceFlags faceMask,\n uint32_t writeMask);\n","C","c","",[50],{"type":21,"tag":51,"props":52,"children":53},"code",{"__ignoreMap":48},[54,78,98,116],{"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}," vkCmdSetStencilWriteMask",{"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":74},[105],{"type":26,"value":106}," VkStencilFaceFlags ",{"type":21,"tag":55,"props":108,"children":109},{"style":89},[110],{"type":26,"value":111},"faceMask",{"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,125,130],{"type":21,"tag":55,"props":121,"children":122},{"style":62},[123],{"type":26,"value":124}," uint32_t",{"type":21,"tag":55,"props":126,"children":127},{"style":89},[128],{"type":26,"value":129}," writeMask",{"type":21,"tag":55,"props":131,"children":132},{"style":74},[133],{"type":26,"value":134},");\n",{"type":21,"tag":42,"props":136,"children":141},{"className":137,"code":138,"filename":139,"language":140,"meta":48,"style":48},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_set_stencil_write_mask(\n command_buffer: vk::CommandBuffer,\n face_mask: vk::StencilFaceFlags,\n write_mask: u32,\n);\n","Rust","rs",[142],{"type":21,"tag":51,"props":143,"children":144},{"__ignoreMap":48},[145,167,199,228,249],{"type":21,"tag":55,"props":146,"children":147},{"class":57,"line":58},[148,153,158,163],{"type":21,"tag":55,"props":149,"children":150},{"style":62},[151],{"type":26,"value":152},"pub",{"type":21,"tag":55,"props":154,"children":155},{"style":62},[156],{"type":26,"value":157}," fn",{"type":21,"tag":55,"props":159,"children":160},{"style":68},[161],{"type":26,"value":162}," cmd_set_stencil_write_mask",{"type":21,"tag":55,"props":164,"children":165},{"style":74},[166],{"type":26,"value":77},{"type":21,"tag":55,"props":168,"children":169},{"class":57,"line":80},[170,175,180,185,190,195],{"type":21,"tag":55,"props":171,"children":172},{"style":74},[173],{"type":26,"value":174}," command_buffer",{"type":21,"tag":55,"props":176,"children":177},{"style":62},[178],{"type":26,"value":179},":",{"type":21,"tag":55,"props":181,"children":182},{"style":89},[183],{"type":26,"value":184}," vk",{"type":21,"tag":55,"props":186,"children":187},{"style":62},[188],{"type":26,"value":189},"::",{"type":21,"tag":55,"props":191,"children":192},{"style":89},[193],{"type":26,"value":194},"CommandBuffer",{"type":21,"tag":55,"props":196,"children":197},{"style":74},[198],{"type":26,"value":97},{"type":21,"tag":55,"props":200,"children":201},{"class":57,"line":100},[202,207,211,215,219,224],{"type":21,"tag":55,"props":203,"children":204},{"style":74},[205],{"type":26,"value":206}," face_mask",{"type":21,"tag":55,"props":208,"children":209},{"style":62},[210],{"type":26,"value":179},{"type":21,"tag":55,"props":212,"children":213},{"style":89},[214],{"type":26,"value":184},{"type":21,"tag":55,"props":216,"children":217},{"style":62},[218],{"type":26,"value":189},{"type":21,"tag":55,"props":220,"children":221},{"style":89},[222],{"type":26,"value":223},"StencilFaceFlags",{"type":21,"tag":55,"props":225,"children":226},{"style":74},[227],{"type":26,"value":97},{"type":21,"tag":55,"props":229,"children":230},{"class":57,"line":118},[231,236,240,245],{"type":21,"tag":55,"props":232,"children":233},{"style":74},[234],{"type":26,"value":235}," write_mask",{"type":21,"tag":55,"props":237,"children":238},{"style":62},[239],{"type":26,"value":179},{"type":21,"tag":55,"props":241,"children":242},{"style":89},[243],{"type":26,"value":244}," u32",{"type":21,"tag":55,"props":246,"children":247},{"style":74},[248],{"type":26,"value":97},{"type":21,"tag":55,"props":250,"children":252},{"class":57,"line":251},5,[253],{"type":21,"tag":55,"props":254,"children":255},{"style":74},[256],{"type":26,"value":134},{"type":21,"tag":258,"props":259,"children":260},"ul",{},[261,272,298],{"type":21,"tag":262,"props":263,"children":264},"li",{},[265,270],{"type":21,"tag":51,"props":266,"children":268},{"className":267},[],[269],{"type":26,"value":92},{"type":26,"value":271}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":262,"props":273,"children":274},{},[275,280,282,288,290,296],{"type":21,"tag":51,"props":276,"children":278},{"className":277},[],[279],{"type":26,"value":111},{"type":26,"value":281}," is a bitmask of ",{"type":21,"tag":29,"props":283,"children":285},{"href":284},"/man/VkStencilFaceFlagBits",[286],{"type":26,"value":287},"VkStencilFaceFlagBits",{"type":26,"value":289}," specifying\nthe set of stencil state for which to update the write mask, as\ndescribed above for ",{"type":21,"tag":29,"props":291,"children":293},{"href":292},"/man/vkCmdSetStencilCompareMask",[294],{"type":26,"value":295},"vkCmdSetStencilCompareMask",{"type":26,"value":297},".",{"type":21,"tag":262,"props":299,"children":300},{},[301,307],{"type":21,"tag":51,"props":302,"children":304},{"className":303},[],[305],{"type":26,"value":306},"writeMask",{"type":26,"value":308}," is the new value to use as the stencil write mask.",{"type":21,"tag":22,"props":310,"children":311},{},[312,314,320,322,328,330,336,337,343,345,350,352,358,359,365,367,371,372,378],{"type":26,"value":313},"This command sets the stencil write mask for subsequent drawing commands\nwhen drawing using ",{"type":21,"tag":29,"props":315,"children":317},{"href":316},"/chapters/shaders#shaders-objects",[318],{"type":26,"value":319},"shader objects",{"type":26,"value":321},", or\nwhen the graphics pipeline is created with\n",{"type":21,"tag":51,"props":323,"children":325},{"className":324},[],[326],{"type":26,"value":327},"VK_DYNAMIC_STATE_STENCIL_WRITE_MASK",{"type":26,"value":329}," set in\n",{"type":21,"tag":29,"props":331,"children":333},{"href":332},"/man/VkPipelineDynamicStateCreateInfo",[334],{"type":26,"value":335},"VkPipelineDynamicStateCreateInfo",{"type":26,"value":189},{"type":21,"tag":51,"props":338,"children":340},{"className":339},[],[341],{"type":26,"value":342},"pDynamicStates",{"type":26,"value":344},".\nOtherwise, this state is specified by the ",{"type":21,"tag":51,"props":346,"children":348},{"className":347},[],[349],{"type":26,"value":306},{"type":26,"value":351}," value used to\ncreate the currently active pipeline, for both\n",{"type":21,"tag":29,"props":353,"children":355},{"href":354},"/man/VkPipelineDepthStencilStateCreateInfo",[356],{"type":26,"value":357},"VkPipelineDepthStencilStateCreateInfo",{"type":26,"value":189},{"type":21,"tag":51,"props":360,"children":362},{"className":361},[],[363],{"type":26,"value":364},"front",{"type":26,"value":366}," and\n",{"type":21,"tag":29,"props":368,"children":369},{"href":354},[370],{"type":26,"value":357},{"type":26,"value":189},{"type":21,"tag":51,"props":373,"children":375},{"className":374},[],[376],{"type":26,"value":377},"back",{"type":26,"value":379}," faces.",{"type":21,"tag":381,"props":382,"children":384},"validity-group",{"name":383},"Valid Usage (Implicit)",[385,415,439,463,487,516],{"type":21,"tag":386,"props":387,"children":389},"validity-field",{"name":388},"VUID-vkCmdSetStencilWriteMask-commandBuffer-parameter",[390],{"type":21,"tag":22,"props":391,"children":392},{},[393,398,400,405,407,413],{"type":21,"tag":51,"props":394,"children":396},{"className":395},[],[397],{"type":26,"value":92},{"type":26,"value":399}," ",{"type":21,"tag":401,"props":402,"children":404},"normative",{"type":403},"must",[],{"type":26,"value":406}," be a valid ",{"type":21,"tag":29,"props":408,"children":410},{"href":409},"/man/VkCommandBuffer",[411],{"type":26,"value":412},"VkCommandBuffer",{"type":26,"value":414}," handle",{"type":21,"tag":386,"props":416,"children":418},{"name":417},"VUID-vkCmdSetStencilWriteMask-faceMask-parameter",[419],{"type":21,"tag":22,"props":420,"children":421},{},[422,427,428,431,433,437],{"type":21,"tag":51,"props":423,"children":425},{"className":424},[],[426],{"type":26,"value":111},{"type":26,"value":399},{"type":21,"tag":401,"props":429,"children":430},{"type":403},[],{"type":26,"value":432}," be a valid combination of ",{"type":21,"tag":29,"props":434,"children":435},{"href":284},[436],{"type":26,"value":287},{"type":26,"value":438}," values",{"type":21,"tag":386,"props":440,"children":442},{"name":441},"VUID-vkCmdSetStencilWriteMask-faceMask-requiredbitmask",[443],{"type":21,"tag":22,"props":444,"children":445},{},[446,451,452,455,457],{"type":21,"tag":51,"props":447,"children":449},{"className":448},[],[450],{"type":26,"value":111},{"type":26,"value":399},{"type":21,"tag":401,"props":453,"children":454},{"type":403},[],{"type":26,"value":456}," not be ",{"type":21,"tag":51,"props":458,"children":460},{"className":459},[],[461],{"type":26,"value":462},"0",{"type":21,"tag":386,"props":464,"children":466},{"name":465},"VUID-vkCmdSetStencilWriteMask-commandBuffer-recording",[467],{"type":21,"tag":22,"props":468,"children":469},{},[470,475,476,479,481],{"type":21,"tag":51,"props":471,"children":473},{"className":472},[],[474],{"type":26,"value":92},{"type":26,"value":399},{"type":21,"tag":401,"props":477,"children":478},{"type":403},[],{"type":26,"value":480}," be in the ",{"type":21,"tag":29,"props":482,"children":484},{"href":483},"/chapters/commandbuffers#commandbuffers-lifecycle",[485],{"type":26,"value":486},"recording state",{"type":21,"tag":386,"props":488,"children":490},{"name":489},"VUID-vkCmdSetStencilWriteMask-commandBuffer-cmdpool",[491],{"type":21,"tag":22,"props":492,"children":493},{},[494,496,502,504,509,511,514],{"type":26,"value":495},"The ",{"type":21,"tag":51,"props":497,"children":499},{"className":498},[],[500],{"type":26,"value":501},"VkCommandPool",{"type":26,"value":503}," that ",{"type":21,"tag":51,"props":505,"children":507},{"className":506},[],[508],{"type":26,"value":92},{"type":26,"value":510}," was allocated from ",{"type":21,"tag":401,"props":512,"children":513},{"type":403},[],{"type":26,"value":515}," support graphics operations",{"type":21,"tag":386,"props":517,"children":519},{"name":518},"VUID-vkCmdSetStencilWriteMask-videocoding",[520],{"type":21,"tag":22,"props":521,"children":522},{},[523,525,528],{"type":26,"value":524},"This command ",{"type":21,"tag":401,"props":526,"children":527},{"type":403},[],{"type":26,"value":529}," only be called outside of a video coding scope",{"type":21,"tag":531,"props":532,"children":534},"validity-box",{"name":533},"Host Synchronization",[535],{"type":21,"tag":258,"props":536,"children":537},{},[538,554],{"type":21,"tag":262,"props":539,"children":540},{},[541,543,548,549,552],{"type":26,"value":542},"Host access to ",{"type":21,"tag":51,"props":544,"children":546},{"className":545},[],[547],{"type":26,"value":92},{"type":26,"value":399},{"type":21,"tag":401,"props":550,"children":551},{"type":403},[],{"type":26,"value":553}," be externally synchronized",{"type":21,"tag":262,"props":555,"children":556},{},[557,559,564,565,570,571,574],{"type":26,"value":558},"Host access to the ",{"type":21,"tag":51,"props":560,"children":562},{"className":561},[],[563],{"type":26,"value":501},{"type":26,"value":503},{"type":21,"tag":51,"props":566,"children":568},{"className":567},[],[569],{"type":26,"value":92},{"type":26,"value":510},{"type":21,"tag":401,"props":572,"children":573},{"type":403},[],{"type":26,"value":575}," be externally synchronized\n::",{"type":21,"tag":577,"props":578,"children":579},"style",{},[580],{"type":26,"value":581},"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":583},[],"markdown",1729612506588]