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