[{"data":1,"prerenderedAt":467},["ShallowReactive",2],{"OP9wF1pCNm":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":466,"_id":4},"VkSharingMode","Buffer and image sharing modes","VK_VERSION_1_0","enums",[],{"type":10,"children":11,"toc":464},"root",[12,35,279,306,333,378,410,427,458],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,26,28,33],{"type":18,"value":19},"text","Buffer and image objects are created with a ",{"type":13,"tag":21,"props":22,"children":23},"em",{},[24],{"type":18,"value":25},"sharing mode",{"type":18,"value":27}," controlling how\nthey ",{"type":13,"tag":29,"props":30,"children":32},"normative",{"type":31},"can",[],{"type":18,"value":34}," be accessed from queues.\nThe supported sharing modes are:",{"type":13,"tag":36,"props":37,"children":38},"code-group",{},[39,131],{"type":13,"tag":40,"props":41,"children":47},"pre",{"className":42,"code":43,"filename":44,"language":45,"meta":46,"style":46},"language-c shiki shiki-themes github-light-default github-dark-default","typedef enum VkSharingMode {\n VK_SHARING_MODE_EXCLUSIVE = 0,\n VK_SHARING_MODE_CONCURRENT = 1,\n} VkSharingMode;\n","C","c","",[48],{"type":13,"tag":49,"props":50,"children":51},"code",{"__ignoreMap":46},[52,75,100,122],{"type":13,"tag":53,"props":54,"children":57},"span",{"class":55,"line":56},"line",1,[58,64,69],{"type":13,"tag":53,"props":59,"children":61},{"style":60},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[62],{"type":18,"value":63},"typedef",{"type":13,"tag":53,"props":65,"children":66},{"style":60},[67],{"type":18,"value":68}," enum",{"type":13,"tag":53,"props":70,"children":72},{"style":71},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[73],{"type":18,"value":74}," VkSharingMode {\n",{"type":13,"tag":53,"props":76,"children":78},{"class":55,"line":77},2,[79,84,89,95],{"type":13,"tag":53,"props":80,"children":81},{"style":71},[82],{"type":18,"value":83}," VK_SHARING_MODE_EXCLUSIVE ",{"type":13,"tag":53,"props":85,"children":86},{"style":60},[87],{"type":18,"value":88},"=",{"type":13,"tag":53,"props":90,"children":92},{"style":91},"--shiki-default:#0550AE;--shiki-dark:#79C0FF",[93],{"type":18,"value":94}," 0",{"type":13,"tag":53,"props":96,"children":97},{"style":71},[98],{"type":18,"value":99},",\n",{"type":13,"tag":53,"props":101,"children":103},{"class":55,"line":102},3,[104,109,113,118],{"type":13,"tag":53,"props":105,"children":106},{"style":71},[107],{"type":18,"value":108}," VK_SHARING_MODE_CONCURRENT ",{"type":13,"tag":53,"props":110,"children":111},{"style":60},[112],{"type":18,"value":88},{"type":13,"tag":53,"props":114,"children":115},{"style":91},[116],{"type":18,"value":117}," 1",{"type":13,"tag":53,"props":119,"children":120},{"style":71},[121],{"type":18,"value":99},{"type":13,"tag":53,"props":123,"children":125},{"class":55,"line":124},4,[126],{"type":13,"tag":53,"props":127,"children":128},{"style":71},[129],{"type":18,"value":130},"} VkSharingMode;\n",{"type":13,"tag":40,"props":132,"children":137},{"className":133,"code":134,"filename":135,"language":136,"meta":46,"style":46},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct SharingMode(u32);\nimpl SharingMode {\n pub const EXCLUSIVE: Self = 0;\n pub const CONCURRENT: Self = 1;\n}\n","Rust","rs",[138],{"type":13,"tag":49,"props":139,"children":140},{"__ignoreMap":46},[141,175,192,234,270],{"type":13,"tag":53,"props":142,"children":143},{"class":55,"line":56},[144,149,154,160,165,170],{"type":13,"tag":53,"props":145,"children":146},{"style":60},[147],{"type":18,"value":148},"pub",{"type":13,"tag":53,"props":150,"children":151},{"style":60},[152],{"type":18,"value":153}," struct",{"type":13,"tag":53,"props":155,"children":157},{"style":156},"--shiki-default:#953800;--shiki-dark:#FFA657",[158],{"type":18,"value":159}," SharingMode",{"type":13,"tag":53,"props":161,"children":162},{"style":71},[163],{"type":18,"value":164},"(",{"type":13,"tag":53,"props":166,"children":167},{"style":156},[168],{"type":18,"value":169},"u32",{"type":13,"tag":53,"props":171,"children":172},{"style":71},[173],{"type":18,"value":174},");\n",{"type":13,"tag":53,"props":176,"children":177},{"class":55,"line":77},[178,183,187],{"type":13,"tag":53,"props":179,"children":180},{"style":60},[181],{"type":18,"value":182},"impl",{"type":13,"tag":53,"props":184,"children":185},{"style":156},[186],{"type":18,"value":159},{"type":13,"tag":53,"props":188,"children":189},{"style":71},[190],{"type":18,"value":191}," {\n",{"type":13,"tag":53,"props":193,"children":194},{"class":55,"line":102},[195,200,205,210,215,220,225,229],{"type":13,"tag":53,"props":196,"children":197},{"style":60},[198],{"type":18,"value":199}," pub",{"type":13,"tag":53,"props":201,"children":202},{"style":60},[203],{"type":18,"value":204}," const",{"type":13,"tag":53,"props":206,"children":207},{"style":91},[208],{"type":18,"value":209}," EXCLUSIVE",{"type":13,"tag":53,"props":211,"children":212},{"style":60},[213],{"type":18,"value":214},":",{"type":13,"tag":53,"props":216,"children":217},{"style":91},[218],{"type":18,"value":219}," Self",{"type":13,"tag":53,"props":221,"children":222},{"style":60},[223],{"type":18,"value":224}," =",{"type":13,"tag":53,"props":226,"children":227},{"style":91},[228],{"type":18,"value":94},{"type":13,"tag":53,"props":230,"children":231},{"style":71},[232],{"type":18,"value":233},";\n",{"type":13,"tag":53,"props":235,"children":236},{"class":55,"line":124},[237,241,245,250,254,258,262,266],{"type":13,"tag":53,"props":238,"children":239},{"style":60},[240],{"type":18,"value":199},{"type":13,"tag":53,"props":242,"children":243},{"style":60},[244],{"type":18,"value":204},{"type":13,"tag":53,"props":246,"children":247},{"style":91},[248],{"type":18,"value":249}," CONCURRENT",{"type":13,"tag":53,"props":251,"children":252},{"style":60},[253],{"type":18,"value":214},{"type":13,"tag":53,"props":255,"children":256},{"style":91},[257],{"type":18,"value":219},{"type":13,"tag":53,"props":259,"children":260},{"style":60},[261],{"type":18,"value":224},{"type":13,"tag":53,"props":263,"children":264},{"style":91},[265],{"type":18,"value":117},{"type":13,"tag":53,"props":267,"children":268},{"style":71},[269],{"type":18,"value":233},{"type":13,"tag":53,"props":271,"children":273},{"class":55,"line":272},5,[274],{"type":13,"tag":53,"props":275,"children":276},{"style":71},[277],{"type":18,"value":278},"}\n",{"type":13,"tag":280,"props":281,"children":282},"ul",{},[283,295],{"type":13,"tag":284,"props":285,"children":286},"li",{},[287,293],{"type":13,"tag":49,"props":288,"children":290},{"className":289},[],[291],{"type":18,"value":292},"VK_SHARING_MODE_EXCLUSIVE",{"type":18,"value":294}," specifies that access to any range or\nimage subresource of the object will be exclusive to a single queue\nfamily at a time.",{"type":13,"tag":284,"props":296,"children":297},{},[298,304],{"type":13,"tag":49,"props":299,"children":301},{"className":300},[],[302],{"type":18,"value":303},"VK_SHARING_MODE_CONCURRENT",{"type":18,"value":305}," specifies that concurrent access to any\nrange or image subresource of the object from multiple queue families is\nsupported.",{"type":13,"tag":307,"props":308,"children":309},"note",{},[310],{"type":13,"tag":14,"props":311,"children":312},{},[313,318,320,324,326,331],{"type":13,"tag":49,"props":314,"children":316},{"className":315},[],[317],{"type":18,"value":303},{"type":18,"value":319}," ",{"type":13,"tag":29,"props":321,"children":323},{"type":322},"may",[],{"type":18,"value":325}," result in lower performance access to\nthe buffer or image than ",{"type":13,"tag":49,"props":327,"children":329},{"className":328},[],[330],{"type":18,"value":292},{"type":18,"value":332},".",{"type":13,"tag":14,"props":334,"children":335},{},[336,338,343,344,348,350,355,357,362,364,367,369,376],{"type":18,"value":337},"Ranges of buffers and image subresources of image objects created using\n",{"type":13,"tag":49,"props":339,"children":341},{"className":340},[],[342],{"type":18,"value":292},{"type":18,"value":319},{"type":13,"tag":29,"props":345,"children":347},{"type":346},"must",[],{"type":18,"value":349}," only be accessed by queues in the\nqueue family that has ",{"type":13,"tag":21,"props":351,"children":352},{},[353],{"type":18,"value":354},"ownership",{"type":18,"value":356}," of the resource.\nUpon creation, such resources are not owned by any queue family; ownership\nis implicitly acquired upon first use within a queue.\nOnce a resource using ",{"type":13,"tag":49,"props":358,"children":360},{"className":359},[],[361],{"type":18,"value":292},{"type":18,"value":363}," is owned by some queue\nfamily, the application ",{"type":13,"tag":29,"props":365,"children":366},{"type":346},[],{"type":18,"value":368}," perform a\n",{"type":13,"tag":370,"props":371,"children":373},"a",{"href":372},"/chapters/synchronization#synchronization-queue-transfers",[374],{"type":18,"value":375},"queue family ownership transfer",{"type":18,"value":377}," to make\nthe memory contents of a range or image subresource accessible to a\ndifferent queue family.",{"type":13,"tag":307,"props":379,"children":380},{},[381],{"type":13,"tag":14,"props":382,"children":383},{},[384,386,392,394,400,402,408],{"type":18,"value":385},"Images still require a ",{"type":13,"tag":370,"props":387,"children":389},{"href":388},"/chapters/resources#resources-image-layouts",[390],{"type":18,"value":391},"layout transition",{"type":18,"value":393}," from\n",{"type":13,"tag":49,"props":395,"children":397},{"className":396},[],[398],{"type":18,"value":399},"VK_IMAGE_LAYOUT_UNDEFINED",{"type":18,"value":401}," or ",{"type":13,"tag":49,"props":403,"children":405},{"className":404},[],[406],{"type":18,"value":407},"VK_IMAGE_LAYOUT_PREINITIALIZED",{"type":18,"value":409},"\nbefore being used on the first queue.",{"type":13,"tag":14,"props":411,"children":412},{},[413,415,418,420,425],{"type":18,"value":414},"A queue family ",{"type":13,"tag":29,"props":416,"children":417},{"type":31},[],{"type":18,"value":419}," take ownership of an image subresource or buffer range\nof a resource created with ",{"type":13,"tag":49,"props":421,"children":423},{"className":422},[],[424],{"type":18,"value":292},{"type":18,"value":426},", without an\nownership transfer, in the same way as for a resource that was just created;\nhowever, taking ownership in this way has the effect that the contents of\nthe image subresource or buffer range are undefined:.",{"type":13,"tag":14,"props":428,"children":429},{},[430,431,436,437,440,442,448,450,456],{"type":18,"value":337},{"type":13,"tag":49,"props":432,"children":434},{"className":433},[],[435],{"type":18,"value":303},{"type":18,"value":319},{"type":13,"tag":29,"props":438,"children":439},{"type":346},[],{"type":18,"value":441}," only be accessed by queues from the\nqueue families specified through the ",{"type":13,"tag":49,"props":443,"children":445},{"className":444},[],[446],{"type":18,"value":447},"queueFamilyIndexCount",{"type":18,"value":449}," and\n",{"type":13,"tag":49,"props":451,"children":453},{"className":452},[],[454],{"type":18,"value":455},"pQueueFamilyIndices",{"type":18,"value":457}," members of the corresponding create info\nstructures.",{"type":13,"tag":459,"props":460,"children":461},"style",{},[462],{"type":18,"value":463},"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":46,"searchDepth":77,"depth":77,"links":465},[],"markdown",1725732586696]