[{"data":1,"prerenderedAt":523},["ShallowReactive",2],{"856qdgptmi":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":522,"_id":4},"vkCmdSetBlendConstants","Set the values of blend constants","VK_VERSION_1_0",[8,9],"primary","secondary","both",[12],"graphics",[14],"state","protos",[],{"type":18,"children":19,"toc":520},"root",[20,37,252,311,316,366,468,514],{"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 and change",{"type":26,"value":36}," the blend\nconstants, call:",{"type":21,"tag":38,"props":39,"children":40},"code-group",{},[41,133],{"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 vkCmdSetBlendConstants(\n VkCommandBuffer commandBuffer,\n const float blendConstants[4]);\n","C","c","",[50],{"type":21,"tag":51,"props":52,"children":53},"code",{"__ignoreMap":48},[54,78,98],{"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}," vkCmdSetBlendConstants",{"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,117,122,128],{"type":21,"tag":55,"props":103,"children":104},{"style":62},[105],{"type":26,"value":106}," const",{"type":21,"tag":55,"props":108,"children":109},{"style":62},[110],{"type":26,"value":111}," float",{"type":21,"tag":55,"props":113,"children":114},{"style":89},[115],{"type":26,"value":116}," blendConstants",{"type":21,"tag":55,"props":118,"children":119},{"style":74},[120],{"type":26,"value":121},"[",{"type":21,"tag":55,"props":123,"children":125},{"style":124},"--shiki-default:#0550AE;--shiki-dark:#79C0FF",[126],{"type":26,"value":127},"4",{"type":21,"tag":55,"props":129,"children":130},{"style":74},[131],{"type":26,"value":132},"]);\n",{"type":21,"tag":42,"props":134,"children":139},{"className":135,"code":136,"filename":137,"language":138,"meta":48,"style":48},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_set_blend_constants(\n command_buffer: vk::CommandBuffer,\n blend_constants: *const [f32 ; 4usize],\n);\n","Rust","rs",[140],{"type":21,"tag":51,"props":141,"children":142},{"__ignoreMap":48},[143,165,197,243],{"type":21,"tag":55,"props":144,"children":145},{"class":57,"line":58},[146,151,156,161],{"type":21,"tag":55,"props":147,"children":148},{"style":62},[149],{"type":26,"value":150},"pub",{"type":21,"tag":55,"props":152,"children":153},{"style":62},[154],{"type":26,"value":155}," fn",{"type":21,"tag":55,"props":157,"children":158},{"style":68},[159],{"type":26,"value":160}," cmd_set_blend_constants",{"type":21,"tag":55,"props":162,"children":163},{"style":74},[164],{"type":26,"value":77},{"type":21,"tag":55,"props":166,"children":167},{"class":57,"line":80},[168,173,178,183,188,193],{"type":21,"tag":55,"props":169,"children":170},{"style":74},[171],{"type":26,"value":172}," command_buffer",{"type":21,"tag":55,"props":174,"children":175},{"style":62},[176],{"type":26,"value":177},":",{"type":21,"tag":55,"props":179,"children":180},{"style":89},[181],{"type":26,"value":182}," vk",{"type":21,"tag":55,"props":184,"children":185},{"style":62},[186],{"type":26,"value":187},"::",{"type":21,"tag":55,"props":189,"children":190},{"style":89},[191],{"type":26,"value":192},"CommandBuffer",{"type":21,"tag":55,"props":194,"children":195},{"style":74},[196],{"type":26,"value":97},{"type":21,"tag":55,"props":198,"children":199},{"class":57,"line":100},[200,205,209,214,219,224,229,233,238],{"type":21,"tag":55,"props":201,"children":202},{"style":74},[203],{"type":26,"value":204}," blend_constants",{"type":21,"tag":55,"props":206,"children":207},{"style":62},[208],{"type":26,"value":177},{"type":21,"tag":55,"props":210,"children":211},{"style":62},[212],{"type":26,"value":213}," *const",{"type":21,"tag":55,"props":215,"children":216},{"style":74},[217],{"type":26,"value":218}," [",{"type":21,"tag":55,"props":220,"children":221},{"style":89},[222],{"type":26,"value":223},"f32",{"type":21,"tag":55,"props":225,"children":226},{"style":74},[227],{"type":26,"value":228}," ; ",{"type":21,"tag":55,"props":230,"children":231},{"style":124},[232],{"type":26,"value":127},{"type":21,"tag":55,"props":234,"children":235},{"style":89},[236],{"type":26,"value":237},"usize",{"type":21,"tag":55,"props":239,"children":240},{"style":74},[241],{"type":26,"value":242},"],\n",{"type":21,"tag":55,"props":244,"children":246},{"class":57,"line":245},4,[247],{"type":21,"tag":55,"props":248,"children":249},{"style":74},[250],{"type":26,"value":251},");\n",{"type":21,"tag":253,"props":254,"children":255},"ul",{},[256,267],{"type":21,"tag":257,"props":258,"children":259},"li",{},[260,265],{"type":21,"tag":51,"props":261,"children":263},{"className":262},[],[264],{"type":26,"value":92},{"type":26,"value":266}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":257,"props":268,"children":269},{},[270,276,278,283,285,289,291,295,297,301,303,309],{"type":21,"tag":51,"props":271,"children":273},{"className":272},[],[274],{"type":26,"value":275},"blendConstants",{"type":26,"value":277}," is a pointer to an array of four values specifying\nthe R",{"type":21,"tag":279,"props":280,"children":281},"sub",{},[282],{"type":26,"value":47},{"type":26,"value":284},", G",{"type":21,"tag":279,"props":286,"children":287},{},[288],{"type":26,"value":47},{"type":26,"value":290},", B",{"type":21,"tag":279,"props":292,"children":293},{},[294],{"type":26,"value":47},{"type":26,"value":296},", and A",{"type":21,"tag":279,"props":298,"children":299},{},[300],{"type":26,"value":47},{"type":26,"value":302}," components of the\nblend constant color used in blending, depending on the\n",{"type":21,"tag":29,"props":304,"children":306},{"href":305},"/chapters/framebuffer#framebuffer-blendfactors",[307],{"type":26,"value":308},"blend factor",{"type":26,"value":310},".",{"type":21,"tag":312,"props":313,"children":315},"anchor",{"id":314},"framebuffer-blendconstants",[],{"type":21,"tag":22,"props":317,"children":318},{},[319,321,327,329,335,337,343,344,350,352,358,359,364],{"type":26,"value":320},"This command sets blend constants for subsequent drawing commands when\nwhen drawing using ",{"type":21,"tag":29,"props":322,"children":324},{"href":323},"/chapters/shaders#shaders-objects",[325],{"type":26,"value":326},"shader objects",{"type":26,"value":328},", or\nthe graphics pipeline is created with ",{"type":21,"tag":51,"props":330,"children":332},{"className":331},[],[333],{"type":26,"value":334},"VK_DYNAMIC_STATE_BLEND_CONSTANTS",{"type":26,"value":336},"\nset in ",{"type":21,"tag":29,"props":338,"children":340},{"href":339},"/man/VkPipelineDynamicStateCreateInfo",[341],{"type":26,"value":342},"VkPipelineDynamicStateCreateInfo",{"type":26,"value":187},{"type":21,"tag":51,"props":345,"children":347},{"className":346},[],[348],{"type":26,"value":349},"pDynamicStates",{"type":26,"value":351},".\nOtherwise, this state is specified by the\n",{"type":21,"tag":29,"props":353,"children":355},{"href":354},"/man/VkPipelineColorBlendStateCreateInfo",[356],{"type":26,"value":357},"VkPipelineColorBlendStateCreateInfo",{"type":26,"value":187},{"type":21,"tag":51,"props":360,"children":362},{"className":361},[],[363],{"type":26,"value":275},{"type":26,"value":365}," values used\nto create the currently active pipeline.",{"type":21,"tag":367,"props":368,"children":370},"validity-group",{"name":369},"Valid Usage (Implicit)",[371,401,425,454],{"type":21,"tag":372,"props":373,"children":375},"validity-field",{"name":374},"VUID-vkCmdSetBlendConstants-commandBuffer-parameter",[376],{"type":21,"tag":22,"props":377,"children":378},{},[379,384,386,391,393,399],{"type":21,"tag":51,"props":380,"children":382},{"className":381},[],[383],{"type":26,"value":92},{"type":26,"value":385}," ",{"type":21,"tag":387,"props":388,"children":390},"normative",{"type":389},"must",[],{"type":26,"value":392}," be a valid ",{"type":21,"tag":29,"props":394,"children":396},{"href":395},"/man/VkCommandBuffer",[397],{"type":26,"value":398},"VkCommandBuffer",{"type":26,"value":400}," handle",{"type":21,"tag":372,"props":402,"children":404},{"name":403},"VUID-vkCmdSetBlendConstants-commandBuffer-recording",[405],{"type":21,"tag":22,"props":406,"children":407},{},[408,413,414,417,419],{"type":21,"tag":51,"props":409,"children":411},{"className":410},[],[412],{"type":26,"value":92},{"type":26,"value":385},{"type":21,"tag":387,"props":415,"children":416},{"type":389},[],{"type":26,"value":418}," be in the ",{"type":21,"tag":29,"props":420,"children":422},{"href":421},"/chapters/commandbuffers#commandbuffers-lifecycle",[423],{"type":26,"value":424},"recording state",{"type":21,"tag":372,"props":426,"children":428},{"name":427},"VUID-vkCmdSetBlendConstants-commandBuffer-cmdpool",[429],{"type":21,"tag":22,"props":430,"children":431},{},[432,434,440,442,447,449,452],{"type":26,"value":433},"The ",{"type":21,"tag":51,"props":435,"children":437},{"className":436},[],[438],{"type":26,"value":439},"VkCommandPool",{"type":26,"value":441}," that ",{"type":21,"tag":51,"props":443,"children":445},{"className":444},[],[446],{"type":26,"value":92},{"type":26,"value":448}," was allocated from ",{"type":21,"tag":387,"props":450,"children":451},{"type":389},[],{"type":26,"value":453}," support graphics operations",{"type":21,"tag":372,"props":455,"children":457},{"name":456},"VUID-vkCmdSetBlendConstants-videocoding",[458],{"type":21,"tag":22,"props":459,"children":460},{},[461,463,466],{"type":26,"value":462},"This command ",{"type":21,"tag":387,"props":464,"children":465},{"type":389},[],{"type":26,"value":467}," only be called outside of a video coding scope",{"type":21,"tag":469,"props":470,"children":472},"validity-box",{"name":471},"Host Synchronization",[473],{"type":21,"tag":253,"props":474,"children":475},{},[476,492],{"type":21,"tag":257,"props":477,"children":478},{},[479,481,486,487,490],{"type":26,"value":480},"Host access to ",{"type":21,"tag":51,"props":482,"children":484},{"className":483},[],[485],{"type":26,"value":92},{"type":26,"value":385},{"type":21,"tag":387,"props":488,"children":489},{"type":389},[],{"type":26,"value":491}," be externally synchronized",{"type":21,"tag":257,"props":493,"children":494},{},[495,497,502,503,508,509,512],{"type":26,"value":496},"Host access to the ",{"type":21,"tag":51,"props":498,"children":500},{"className":499},[],[501],{"type":26,"value":439},{"type":26,"value":441},{"type":21,"tag":51,"props":504,"children":506},{"className":505},[],[507],{"type":26,"value":92},{"type":26,"value":448},{"type":21,"tag":387,"props":510,"children":511},{"type":389},[],{"type":26,"value":513}," be externally synchronized\n::",{"type":21,"tag":515,"props":516,"children":517},"style",{},[518],{"type":26,"value":519},"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":521},[],"markdown",1725732607773]