[{"data":1,"prerenderedAt":563},["ShallowReactive",2],{"uk8lp9te5C":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":562,"_id":4},"vkDeferredOperationJoinKHR","Assign a thread to a deferred operation","VK_KHR_deferred_host_operations","protos",[],{"type":10,"children":11,"toc":560},"root",[12,20,243,275,287,292,416,427,475,554],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To assign a thread to a deferred operation, call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,98],{"type":13,"tag":25,"props":26,"children":32},"pre",{"className":27,"code":28,"filename":29,"language":30,"meta":31,"style":31},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkDeferredOperationJoinKHR(\n VkDevice device,\n VkDeferredOperationKHR operation);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,79],{"type":13,"tag":38,"props":39,"children":42},"span",{"class":40,"line":41},"line",1,[43,49,54],{"type":13,"tag":38,"props":44,"children":46},{"style":45},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[47],{"type":18,"value":48},"VkResult ",{"type":13,"tag":38,"props":50,"children":52},{"style":51},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[53],{"type":18,"value":4},{"type":13,"tag":38,"props":55,"children":56},{"style":45},[57],{"type":18,"value":58},"(\n",{"type":13,"tag":38,"props":60,"children":62},{"class":40,"line":61},2,[63,68,74],{"type":13,"tag":38,"props":64,"children":65},{"style":45},[66],{"type":18,"value":67}," VkDevice ",{"type":13,"tag":38,"props":69,"children":71},{"style":70},"--shiki-default:#953800;--shiki-dark:#FFA657",[72],{"type":18,"value":73},"device",{"type":13,"tag":38,"props":75,"children":76},{"style":45},[77],{"type":18,"value":78},",\n",{"type":13,"tag":38,"props":80,"children":82},{"class":40,"line":81},3,[83,88,93],{"type":13,"tag":38,"props":84,"children":85},{"style":45},[86],{"type":18,"value":87}," VkDeferredOperationKHR ",{"type":13,"tag":38,"props":89,"children":90},{"style":70},[91],{"type":18,"value":92},"operation",{"type":13,"tag":38,"props":94,"children":95},{"style":45},[96],{"type":18,"value":97},");\n",{"type":13,"tag":25,"props":99,"children":104},{"className":100,"code":101,"filename":102,"language":103,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn deferred_operation_join_khr(\n device: crate :: vk :: vk::Device,\n operation: vk::DeferredOperationKHR,\n) -> vk::Result;\n","Rust","rs",[105],{"type":13,"tag":34,"props":106,"children":107},{"__ignoreMap":31},[108,131,182,211],{"type":13,"tag":38,"props":109,"children":110},{"class":40,"line":41},[111,117,122,127],{"type":13,"tag":38,"props":112,"children":114},{"style":113},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[115],{"type":18,"value":116},"pub",{"type":13,"tag":38,"props":118,"children":119},{"style":113},[120],{"type":18,"value":121}," fn",{"type":13,"tag":38,"props":123,"children":124},{"style":51},[125],{"type":18,"value":126}," deferred_operation_join_khr",{"type":13,"tag":38,"props":128,"children":129},{"style":45},[130],{"type":18,"value":58},{"type":13,"tag":38,"props":132,"children":133},{"class":40,"line":61},[134,139,144,149,154,159,164,169,173,178],{"type":13,"tag":38,"props":135,"children":136},{"style":45},[137],{"type":18,"value":138}," device",{"type":13,"tag":38,"props":140,"children":141},{"style":113},[142],{"type":18,"value":143},":",{"type":13,"tag":38,"props":145,"children":146},{"style":113},[147],{"type":18,"value":148}," crate",{"type":13,"tag":38,"props":150,"children":151},{"style":113},[152],{"type":18,"value":153}," ::",{"type":13,"tag":38,"props":155,"children":156},{"style":45},[157],{"type":18,"value":158}," vk ",{"type":13,"tag":38,"props":160,"children":161},{"style":113},[162],{"type":18,"value":163},"::",{"type":13,"tag":38,"props":165,"children":166},{"style":70},[167],{"type":18,"value":168}," vk",{"type":13,"tag":38,"props":170,"children":171},{"style":113},[172],{"type":18,"value":163},{"type":13,"tag":38,"props":174,"children":175},{"style":70},[176],{"type":18,"value":177},"Device",{"type":13,"tag":38,"props":179,"children":180},{"style":45},[181],{"type":18,"value":78},{"type":13,"tag":38,"props":183,"children":184},{"class":40,"line":81},[185,190,194,198,202,207],{"type":13,"tag":38,"props":186,"children":187},{"style":45},[188],{"type":18,"value":189}," operation",{"type":13,"tag":38,"props":191,"children":192},{"style":113},[193],{"type":18,"value":143},{"type":13,"tag":38,"props":195,"children":196},{"style":70},[197],{"type":18,"value":168},{"type":13,"tag":38,"props":199,"children":200},{"style":113},[201],{"type":18,"value":163},{"type":13,"tag":38,"props":203,"children":204},{"style":70},[205],{"type":18,"value":206},"DeferredOperationKHR",{"type":13,"tag":38,"props":208,"children":209},{"style":45},[210],{"type":18,"value":78},{"type":13,"tag":38,"props":212,"children":214},{"class":40,"line":213},4,[215,220,225,229,233,238],{"type":13,"tag":38,"props":216,"children":217},{"style":45},[218],{"type":18,"value":219},") ",{"type":13,"tag":38,"props":221,"children":222},{"style":113},[223],{"type":18,"value":224},"->",{"type":13,"tag":38,"props":226,"children":227},{"style":70},[228],{"type":18,"value":168},{"type":13,"tag":38,"props":230,"children":231},{"style":113},[232],{"type":18,"value":163},{"type":13,"tag":38,"props":234,"children":235},{"style":70},[236],{"type":18,"value":237},"Result",{"type":13,"tag":38,"props":239,"children":240},{"style":45},[241],{"type":18,"value":242},";\n",{"type":13,"tag":244,"props":245,"children":246},"ul",{},[247,265],{"type":13,"tag":248,"props":249,"children":250},"li",{},[251,256,258,263],{"type":13,"tag":34,"props":252,"children":254},{"className":253},[],[255],{"type":18,"value":73},{"type":18,"value":257}," is the device which owns ",{"type":13,"tag":34,"props":259,"children":261},{"className":260},[],[262],{"type":18,"value":92},{"type":18,"value":264},".",{"type":13,"tag":248,"props":266,"children":267},{},[268,273],{"type":13,"tag":34,"props":269,"children":271},{"className":270},[],[272],{"type":18,"value":92},{"type":18,"value":274}," is the deferred operation that the calling thread should\nwork on.",{"type":13,"tag":14,"props":276,"children":277},{},[278,280,285],{"type":18,"value":279},"The ",{"type":13,"tag":34,"props":281,"children":283},{"className":282},[],[284],{"type":18,"value":4},{"type":18,"value":286}," command will execute a portion of the\ndeferred operation on the calling thread.",{"type":13,"tag":14,"props":288,"children":289},{},[290],{"type":18,"value":291},"The return value will be one of the following:",{"type":13,"tag":244,"props":293,"children":294},{},[295,337,375],{"type":13,"tag":248,"props":296,"children":297},{},[298,300,306,308,313,315,320,322,329,331,336],{"type":18,"value":299},"A return value of ",{"type":13,"tag":34,"props":301,"children":303},{"className":302},[],[304],{"type":18,"value":305},"VK_SUCCESS",{"type":18,"value":307}," indicates that ",{"type":13,"tag":34,"props":309,"children":311},{"className":310},[],[312],{"type":18,"value":92},{"type":18,"value":314}," is\ncomplete.\nThe application ",{"type":13,"tag":316,"props":317,"children":319},"normative",{"type":318},"should",[],{"type":18,"value":321}," use ",{"type":13,"tag":323,"props":324,"children":326},"a",{"href":325},"/man/vkGetDeferredOperationResultKHR",[327],{"type":18,"value":328},"vkGetDeferredOperationResultKHR",{"type":18,"value":330}," to\nretrieve the result of ",{"type":13,"tag":34,"props":332,"children":334},{"className":333},[],[335],{"type":18,"value":92},{"type":18,"value":264},{"type":13,"tag":248,"props":338,"children":339},{},[340,341,347,349,354,356,360,362,366,368,373],{"type":18,"value":299},{"type":13,"tag":34,"props":342,"children":344},{"className":343},[],[345],{"type":18,"value":346},"VK_THREAD_DONE_KHR",{"type":18,"value":348}," indicates that the deferred\noperation is not complete, but there is no work remaining to assign to\nthreads.\nFuture calls to ",{"type":13,"tag":323,"props":350,"children":352},{"href":351},"/man/vkDeferredOperationJoinKHR",[353],{"type":18,"value":4},{"type":18,"value":355}," are not necessary and\nwill simply harm performance.\nThis situation ",{"type":13,"tag":316,"props":357,"children":359},{"type":358},"may",[],{"type":18,"value":361}," occur when other threads executing\n",{"type":13,"tag":323,"props":363,"children":364},{"href":351},[365],{"type":18,"value":4},{"type":18,"value":367}," are about to complete ",{"type":13,"tag":34,"props":369,"children":371},{"className":370},[],[372],{"type":18,"value":92},{"type":18,"value":374},",\nand the implementation is unable to partition the workload any further.",{"type":13,"tag":248,"props":376,"children":377},{},[378,379,385,387,390,392,397,399,403,405,409,411,414],{"type":18,"value":299},{"type":13,"tag":34,"props":380,"children":382},{"className":381},[],[383],{"type":18,"value":384},"VK_THREAD_IDLE_KHR",{"type":18,"value":386}," indicates that the deferred\noperation is not complete, and there is no work for the thread to do at\nthe time of the call.\nThis situation ",{"type":13,"tag":316,"props":388,"children":389},{"type":358},[],{"type":18,"value":391}," occur if the operation encounters a temporary\nreduction in parallelism.\nBy returning ",{"type":13,"tag":34,"props":393,"children":395},{"className":394},[],[396],{"type":18,"value":384},{"type":18,"value":398},", the implementation is signaling\nthat it expects that more opportunities for parallelism will emerge as\nexecution progresses, and that future calls to\n",{"type":13,"tag":323,"props":400,"children":401},{"href":351},[402],{"type":18,"value":4},{"type":18,"value":404}," ",{"type":13,"tag":316,"props":406,"children":408},{"type":407},"can",[],{"type":18,"value":410}," be beneficial.\nIn the meantime, the application ",{"type":13,"tag":316,"props":412,"children":413},{"type":407},[],{"type":18,"value":415}," perform other work on the calling\nthread.",{"type":13,"tag":14,"props":417,"children":418},{},[419,421,425],{"type":18,"value":420},"Implementations ",{"type":13,"tag":316,"props":422,"children":424},{"type":423},"must",[],{"type":18,"value":426}," guarantee forward progress by enforcing the following\ninvariants:",{"type":13,"tag":428,"props":429,"children":430},"ol",{},[431,453],{"type":13,"tag":248,"props":432,"children":433},{},[434,436,440,442,445,447,452],{"type":18,"value":435},"If only one thread has invoked ",{"type":13,"tag":323,"props":437,"children":438},{"href":351},[439],{"type":18,"value":4},{"type":18,"value":441}," on a\ngiven operation, that thread ",{"type":13,"tag":316,"props":443,"children":444},{"type":423},[],{"type":18,"value":446}," execute the operation to completion\nand return ",{"type":13,"tag":34,"props":448,"children":450},{"className":449},[],[451],{"type":18,"value":305},{"type":18,"value":264},{"type":13,"tag":248,"props":454,"children":455},{},[456,458,462,464,467,469,474],{"type":18,"value":457},"If multiple threads have concurrently invoked\n",{"type":13,"tag":323,"props":459,"children":460},{"href":351},[461],{"type":18,"value":4},{"type":18,"value":463}," on the same operation, then at least\none of them ",{"type":13,"tag":316,"props":465,"children":466},{"type":423},[],{"type":18,"value":468}," complete the operation and return ",{"type":13,"tag":34,"props":470,"children":472},{"className":471},[],[473],{"type":18,"value":305},{"type":18,"value":264},{"type":13,"tag":476,"props":477,"children":479},"validity-group",{"name":478},"Valid Usage (Implicit)",[480,507,531],{"type":13,"tag":481,"props":482,"children":484},"validity-field",{"name":483},"VUID-vkDeferredOperationJoinKHR-device-parameter",[485],{"type":13,"tag":14,"props":486,"children":487},{},[488,493,494,497,499,505],{"type":13,"tag":34,"props":489,"children":491},{"className":490},[],[492],{"type":18,"value":73},{"type":18,"value":404},{"type":13,"tag":316,"props":495,"children":496},{"type":423},[],{"type":18,"value":498}," be a valid ",{"type":13,"tag":323,"props":500,"children":502},{"href":501},"/man/VkDevice",[503],{"type":18,"value":504},"VkDevice",{"type":18,"value":506}," handle",{"type":13,"tag":481,"props":508,"children":510},{"name":509},"VUID-vkDeferredOperationJoinKHR-operation-parameter",[511],{"type":13,"tag":14,"props":512,"children":513},{},[514,519,520,523,524,530],{"type":13,"tag":34,"props":515,"children":517},{"className":516},[],[518],{"type":18,"value":92},{"type":18,"value":404},{"type":13,"tag":316,"props":521,"children":522},{"type":423},[],{"type":18,"value":498},{"type":13,"tag":323,"props":525,"children":527},{"href":526},"/man/VkDeferredOperationKHR",[528],{"type":18,"value":529},"VkDeferredOperationKHR",{"type":18,"value":506},{"type":13,"tag":481,"props":532,"children":534},{"name":533},"VUID-vkDeferredOperationJoinKHR-operation-parent",[535],{"type":13,"tag":14,"props":536,"children":537},{},[538,543,544,547,549],{"type":13,"tag":34,"props":539,"children":541},{"className":540},[],[542],{"type":18,"value":92},{"type":18,"value":404},{"type":13,"tag":316,"props":545,"children":546},{"type":423},[],{"type":18,"value":548}," have been created, allocated, or retrieved from ",{"type":13,"tag":34,"props":550,"children":552},{"className":551},[],[553],{"type":18,"value":73},{"type":13,"tag":555,"props":556,"children":557},"style",{},[558],{"type":18,"value":559},"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":31,"searchDepth":61,"depth":61,"links":561},[],"markdown",1729612510850]