[{"data":1,"prerenderedAt":646},["ShallowReactive",2],{"B4S3PMiSPI":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":645,"_id":4},"vkCmdSetColorWriteEnableEXT","Enable or disable writes to a color attachment dynamically for a command buffer","VK_EXT_color_write_enable",[8,9],"primary","secondary","both",[12],"graphics",[14],"state","protos",[],{"type":18,"children":19,"toc":643},"root",[20,37,272,324,374,441,591,637],{"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 enable or disable",{"type":26,"value":36}," writes to a\ncolor attachment, call:",{"type":21,"tag":38,"props":39,"children":40},"code-group",{},[41,145],{"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 vkCmdSetColorWriteEnableEXT(\n VkCommandBuffer commandBuffer,\n uint32_t attachmentCount,\n const VkBool32* pColorWriteEnables);\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}," vkCmdSetColorWriteEnableEXT",{"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}," attachmentCount",{"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,135,140],{"type":21,"tag":55,"props":121,"children":122},{"style":62},[123],{"type":26,"value":124}," const",{"type":21,"tag":55,"props":126,"children":127},{"style":74},[128],{"type":26,"value":129}," VkBool32",{"type":21,"tag":55,"props":131,"children":132},{"style":62},[133],{"type":26,"value":134},"*",{"type":21,"tag":55,"props":136,"children":137},{"style":89},[138],{"type":26,"value":139}," pColorWriteEnables",{"type":21,"tag":55,"props":141,"children":142},{"style":74},[143],{"type":26,"value":144},");\n",{"type":21,"tag":42,"props":146,"children":151},{"className":147,"code":148,"filename":149,"language":150,"meta":48,"style":48},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_set_color_write_enable_ext(\n command_buffer: vk::CommandBuffer,\n attachment_count: u32,\n p_color_write_enables: *const vk::Bool32,\n);\n","Rust","rs",[152],{"type":21,"tag":51,"props":153,"children":154},{"__ignoreMap":48},[155,177,209,230,264],{"type":21,"tag":55,"props":156,"children":157},{"class":57,"line":58},[158,163,168,173],{"type":21,"tag":55,"props":159,"children":160},{"style":62},[161],{"type":26,"value":162},"pub",{"type":21,"tag":55,"props":164,"children":165},{"style":62},[166],{"type":26,"value":167}," fn",{"type":21,"tag":55,"props":169,"children":170},{"style":68},[171],{"type":26,"value":172}," cmd_set_color_write_enable_ext",{"type":21,"tag":55,"props":174,"children":175},{"style":74},[176],{"type":26,"value":77},{"type":21,"tag":55,"props":178,"children":179},{"class":57,"line":80},[180,185,190,195,200,205],{"type":21,"tag":55,"props":181,"children":182},{"style":74},[183],{"type":26,"value":184}," command_buffer",{"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}," vk",{"type":21,"tag":55,"props":196,"children":197},{"style":62},[198],{"type":26,"value":199},"::",{"type":21,"tag":55,"props":201,"children":202},{"style":89},[203],{"type":26,"value":204},"CommandBuffer",{"type":21,"tag":55,"props":206,"children":207},{"style":74},[208],{"type":26,"value":97},{"type":21,"tag":55,"props":210,"children":211},{"class":57,"line":100},[212,217,221,226],{"type":21,"tag":55,"props":213,"children":214},{"style":74},[215],{"type":26,"value":216}," attachment_count",{"type":21,"tag":55,"props":218,"children":219},{"style":62},[220],{"type":26,"value":189},{"type":21,"tag":55,"props":222,"children":223},{"style":89},[224],{"type":26,"value":225}," u32",{"type":21,"tag":55,"props":227,"children":228},{"style":74},[229],{"type":26,"value":97},{"type":21,"tag":55,"props":231,"children":232},{"class":57,"line":118},[233,238,242,247,251,255,260],{"type":21,"tag":55,"props":234,"children":235},{"style":74},[236],{"type":26,"value":237}," p_color_write_enables",{"type":21,"tag":55,"props":239,"children":240},{"style":62},[241],{"type":26,"value":189},{"type":21,"tag":55,"props":243,"children":244},{"style":62},[245],{"type":26,"value":246}," *const",{"type":21,"tag":55,"props":248,"children":249},{"style":89},[250],{"type":26,"value":194},{"type":21,"tag":55,"props":252,"children":253},{"style":62},[254],{"type":26,"value":199},{"type":21,"tag":55,"props":256,"children":257},{"style":89},[258],{"type":26,"value":259},"Bool32",{"type":21,"tag":55,"props":261,"children":262},{"style":74},[263],{"type":26,"value":97},{"type":21,"tag":55,"props":265,"children":267},{"class":57,"line":266},5,[268],{"type":21,"tag":55,"props":269,"children":270},{"style":74},[271],{"type":26,"value":144},{"type":21,"tag":273,"props":274,"children":275},"ul",{},[276,287,314],{"type":21,"tag":277,"props":278,"children":279},"li",{},[280,285],{"type":21,"tag":51,"props":281,"children":283},{"className":282},[],[284],{"type":26,"value":92},{"type":26,"value":286}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":277,"props":288,"children":289},{},[290,296,298,304,306,312],{"type":21,"tag":51,"props":291,"children":293},{"className":292},[],[294],{"type":26,"value":295},"attachmentCount",{"type":26,"value":297}," is the number of ",{"type":21,"tag":29,"props":299,"children":301},{"href":300},"/man/VkBool32",[302],{"type":26,"value":303},"VkBool32",{"type":26,"value":305}," elements in\n",{"type":21,"tag":51,"props":307,"children":309},{"className":308},[],[310],{"type":26,"value":311},"pColorWriteEnables",{"type":26,"value":313},".",{"type":21,"tag":277,"props":315,"children":316},{},[317,322],{"type":21,"tag":51,"props":318,"children":320},{"className":319},[],[321],{"type":26,"value":311},{"type":26,"value":323}," is a pointer to an array of per target\nattachment boolean values specifying whether color writes are enabled\nfor the given attachment.",{"type":21,"tag":22,"props":325,"children":326},{},[327,329,335,337,343,345,351,352,358,360,366,367,372],{"type":26,"value":328},"This command sets the color write enables for subsequent drawing commands\nwhen drawing using ",{"type":21,"tag":29,"props":330,"children":332},{"href":331},"/chapters/shaders#shaders-objects",[333],{"type":26,"value":334},"shader objects",{"type":26,"value":336},", or\nwhen the graphics pipeline is created with\n",{"type":21,"tag":51,"props":338,"children":340},{"className":339},[],[341],{"type":26,"value":342},"VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT",{"type":26,"value":344}," set in\n",{"type":21,"tag":29,"props":346,"children":348},{"href":347},"/man/VkPipelineDynamicStateCreateInfo",[349],{"type":26,"value":350},"VkPipelineDynamicStateCreateInfo",{"type":26,"value":199},{"type":21,"tag":51,"props":353,"children":355},{"className":354},[],[356],{"type":26,"value":357},"pDynamicStates",{"type":26,"value":359},".\nOtherwise, this state is specified by the\n",{"type":21,"tag":29,"props":361,"children":363},{"href":362},"/man/VkPipelineColorWriteCreateInfoEXT",[364],{"type":26,"value":365},"VkPipelineColorWriteCreateInfoEXT",{"type":26,"value":199},{"type":21,"tag":51,"props":368,"children":370},{"className":369},[],[371],{"type":26,"value":311},{"type":26,"value":373}," values\nused to create the currently active pipeline.",{"type":21,"tag":375,"props":376,"children":378},"validity-group",{"name":377},"Valid Usage",[379,408],{"type":21,"tag":380,"props":381,"children":383},"validity-field",{"name":382},"VUID-vkCmdSetColorWriteEnableEXT-None-04803",[384],{"type":21,"tag":22,"props":385,"children":386},{},[387,389,399,401,406],{"type":26,"value":388},"The ",{"type":21,"tag":29,"props":390,"children":392},{"href":391},"/man/VkPhysicalDeviceColorWriteEnableFeaturesEXT#features-colorWriteEnable",[393],{"type":21,"tag":51,"props":394,"children":396},{"className":395},[],[397],{"type":26,"value":398},"colorWriteEnable",{"type":26,"value":400}," feature ",{"type":21,"tag":402,"props":403,"children":405},"normative",{"type":404},"must",[],{"type":26,"value":407},"\nbe enabled",{"type":21,"tag":380,"props":409,"children":411},{"name":410},"VUID-vkCmdSetColorWriteEnableEXT-attachmentCount-06656",[412],{"type":21,"tag":22,"props":413,"children":414},{},[415,420,422,425,427,433,435],{"type":21,"tag":51,"props":416,"children":418},{"className":417},[],[419],{"type":26,"value":295},{"type":26,"value":421}," ",{"type":21,"tag":402,"props":423,"children":424},{"type":404},[],{"type":26,"value":426}," be less than or equal to the\n",{"type":21,"tag":51,"props":428,"children":430},{"className":429},[],[431],{"type":26,"value":432},"maxColorAttachments",{"type":26,"value":434}," member of ",{"type":21,"tag":51,"props":436,"children":438},{"className":437},[],[439],{"type":26,"value":440},"VkPhysicalDeviceLimits",{"type":21,"tag":375,"props":442,"children":444},{"name":443},"Valid Usage (Implicit)",[445,471,501,525,553,567],{"type":21,"tag":380,"props":446,"children":448},{"name":447},"VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-parameter",[449],{"type":21,"tag":22,"props":450,"children":451},{},[452,457,458,461,463,469],{"type":21,"tag":51,"props":453,"children":455},{"className":454},[],[456],{"type":26,"value":92},{"type":26,"value":421},{"type":21,"tag":402,"props":459,"children":460},{"type":404},[],{"type":26,"value":462}," be a valid ",{"type":21,"tag":29,"props":464,"children":466},{"href":465},"/man/VkCommandBuffer",[467],{"type":26,"value":468},"VkCommandBuffer",{"type":26,"value":470}," handle",{"type":21,"tag":380,"props":472,"children":474},{"name":473},"VUID-vkCmdSetColorWriteEnableEXT-pColorWriteEnables-parameter",[475],{"type":21,"tag":22,"props":476,"children":477},{},[478,483,484,487,489,494,495,499],{"type":21,"tag":51,"props":479,"children":481},{"className":480},[],[482],{"type":26,"value":311},{"type":26,"value":421},{"type":21,"tag":402,"props":485,"children":486},{"type":404},[],{"type":26,"value":488}," be a valid pointer to an array of ",{"type":21,"tag":51,"props":490,"children":492},{"className":491},[],[493],{"type":26,"value":295},{"type":26,"value":421},{"type":21,"tag":29,"props":496,"children":497},{"href":300},[498],{"type":26,"value":303},{"type":26,"value":500}," values",{"type":21,"tag":380,"props":502,"children":504},{"name":503},"VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-recording",[505],{"type":21,"tag":22,"props":506,"children":507},{},[508,513,514,517,519],{"type":21,"tag":51,"props":509,"children":511},{"className":510},[],[512],{"type":26,"value":92},{"type":26,"value":421},{"type":21,"tag":402,"props":515,"children":516},{"type":404},[],{"type":26,"value":518}," be in the ",{"type":21,"tag":29,"props":520,"children":522},{"href":521},"/chapters/commandbuffers#commandbuffers-lifecycle",[523],{"type":26,"value":524},"recording state",{"type":21,"tag":380,"props":526,"children":528},{"name":527},"VUID-vkCmdSetColorWriteEnableEXT-commandBuffer-cmdpool",[529],{"type":21,"tag":22,"props":530,"children":531},{},[532,533,539,541,546,548,551],{"type":26,"value":388},{"type":21,"tag":51,"props":534,"children":536},{"className":535},[],[537],{"type":26,"value":538},"VkCommandPool",{"type":26,"value":540}," that ",{"type":21,"tag":51,"props":542,"children":544},{"className":543},[],[545],{"type":26,"value":92},{"type":26,"value":547}," was allocated from ",{"type":21,"tag":402,"props":549,"children":550},{"type":404},[],{"type":26,"value":552}," support graphics operations",{"type":21,"tag":380,"props":554,"children":556},{"name":555},"VUID-vkCmdSetColorWriteEnableEXT-videocoding",[557],{"type":21,"tag":22,"props":558,"children":559},{},[560,562,565],{"type":26,"value":561},"This command ",{"type":21,"tag":402,"props":563,"children":564},{"type":404},[],{"type":26,"value":566}," only be called outside of a video coding scope",{"type":21,"tag":380,"props":568,"children":570},{"name":569},"VUID-vkCmdSetColorWriteEnableEXT-attachmentCount-arraylength",[571],{"type":21,"tag":22,"props":572,"children":573},{},[574,579,580,583,585],{"type":21,"tag":51,"props":575,"children":577},{"className":576},[],[578],{"type":26,"value":295},{"type":26,"value":421},{"type":21,"tag":402,"props":581,"children":582},{"type":404},[],{"type":26,"value":584}," be greater than ",{"type":21,"tag":51,"props":586,"children":588},{"className":587},[],[589],{"type":26,"value":590},"0",{"type":21,"tag":592,"props":593,"children":595},"validity-box",{"name":594},"Host Synchronization",[596],{"type":21,"tag":273,"props":597,"children":598},{},[599,615],{"type":21,"tag":277,"props":600,"children":601},{},[602,604,609,610,613],{"type":26,"value":603},"Host access to ",{"type":21,"tag":51,"props":605,"children":607},{"className":606},[],[608],{"type":26,"value":92},{"type":26,"value":421},{"type":21,"tag":402,"props":611,"children":612},{"type":404},[],{"type":26,"value":614}," be externally synchronized",{"type":21,"tag":277,"props":616,"children":617},{},[618,620,625,626,631,632,635],{"type":26,"value":619},"Host access to the ",{"type":21,"tag":51,"props":621,"children":623},{"className":622},[],[624],{"type":26,"value":538},{"type":26,"value":540},{"type":21,"tag":51,"props":627,"children":629},{"className":628},[],[630],{"type":26,"value":92},{"type":26,"value":547},{"type":21,"tag":402,"props":633,"children":634},{"type":404},[],{"type":26,"value":636}," be externally synchronized\n::",{"type":21,"tag":638,"props":639,"children":640},"style",{},[641],{"type":26,"value":642},"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":644},[],"markdown",1725732607928]