[{"data":1,"prerenderedAt":806},["ShallowReactive",2],{"vSWXjgR1c4":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":805,"_id":4},"vkGetShaderBinaryDataEXT","Get the binary shader code from a shader object","VK_EXT_shader_object","protos",[],{"type":10,"children":11,"toc":803},"root",[12,27,333,396,479,509,557,577,644,797],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,25],{"type":18,"value":19},"text","Binary shader code ",{"type":13,"tag":21,"props":22,"children":24},"normative",{"type":23},"can",[],{"type":18,"value":26}," be retrieved from a shader object using the command:",{"type":13,"tag":28,"props":29,"children":30},"code-group",{},[31,142],{"type":13,"tag":32,"props":33,"children":39},"pre",{"className":34,"code":35,"filename":36,"language":37,"meta":38,"style":38},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkGetShaderBinaryDataEXT(\n VkDevice device,\n VkShaderEXT shader,\n size_t* pDataSize,\n void* pData);\n","C","c","",[40],{"type":13,"tag":41,"props":42,"children":43},"code",{"__ignoreMap":38},[44,66,86,104,123],{"type":13,"tag":45,"props":46,"children":49},"span",{"class":47,"line":48},"line",1,[50,56,61],{"type":13,"tag":45,"props":51,"children":53},{"style":52},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[54],{"type":18,"value":55},"VkResult ",{"type":13,"tag":45,"props":57,"children":59},{"style":58},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[60],{"type":18,"value":4},{"type":13,"tag":45,"props":62,"children":63},{"style":52},[64],{"type":18,"value":65},"(\n",{"type":13,"tag":45,"props":67,"children":69},{"class":47,"line":68},2,[70,75,81],{"type":13,"tag":45,"props":71,"children":72},{"style":52},[73],{"type":18,"value":74}," VkDevice ",{"type":13,"tag":45,"props":76,"children":78},{"style":77},"--shiki-default:#953800;--shiki-dark:#FFA657",[79],{"type":18,"value":80},"device",{"type":13,"tag":45,"props":82,"children":83},{"style":52},[84],{"type":18,"value":85},",\n",{"type":13,"tag":45,"props":87,"children":89},{"class":47,"line":88},3,[90,95,100],{"type":13,"tag":45,"props":91,"children":92},{"style":52},[93],{"type":18,"value":94}," VkShaderEXT ",{"type":13,"tag":45,"props":96,"children":97},{"style":77},[98],{"type":18,"value":99},"shader",{"type":13,"tag":45,"props":101,"children":102},{"style":52},[103],{"type":18,"value":85},{"type":13,"tag":45,"props":105,"children":107},{"class":47,"line":106},4,[108,114,119],{"type":13,"tag":45,"props":109,"children":111},{"style":110},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[112],{"type":18,"value":113}," size_t*",{"type":13,"tag":45,"props":115,"children":116},{"style":77},[117],{"type":18,"value":118}," pDataSize",{"type":13,"tag":45,"props":120,"children":121},{"style":52},[122],{"type":18,"value":85},{"type":13,"tag":45,"props":124,"children":126},{"class":47,"line":125},5,[127,132,137],{"type":13,"tag":45,"props":128,"children":129},{"style":110},[130],{"type":18,"value":131}," void*",{"type":13,"tag":45,"props":133,"children":134},{"style":77},[135],{"type":18,"value":136}," pData",{"type":13,"tag":45,"props":138,"children":139},{"style":52},[140],{"type":18,"value":141},");\n",{"type":13,"tag":32,"props":143,"children":148},{"className":144,"code":145,"filename":146,"language":147,"meta":38,"style":38},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn get_shader_binary_data_ext(\n device: crate :: vk :: vk::Device,\n shader: vk::ShaderEXT,\n p_data_size: *mut usize,\n p_data: *mut c_void,\n) -> vk::Result;\n","Rust","rs",[149],{"type":13,"tag":41,"props":150,"children":151},{"__ignoreMap":38},[152,174,225,254,280,301],{"type":13,"tag":45,"props":153,"children":154},{"class":47,"line":48},[155,160,165,170],{"type":13,"tag":45,"props":156,"children":157},{"style":110},[158],{"type":18,"value":159},"pub",{"type":13,"tag":45,"props":161,"children":162},{"style":110},[163],{"type":18,"value":164}," fn",{"type":13,"tag":45,"props":166,"children":167},{"style":58},[168],{"type":18,"value":169}," get_shader_binary_data_ext",{"type":13,"tag":45,"props":171,"children":172},{"style":52},[173],{"type":18,"value":65},{"type":13,"tag":45,"props":175,"children":176},{"class":47,"line":68},[177,182,187,192,197,202,207,212,216,221],{"type":13,"tag":45,"props":178,"children":179},{"style":52},[180],{"type":18,"value":181}," device",{"type":13,"tag":45,"props":183,"children":184},{"style":110},[185],{"type":18,"value":186},":",{"type":13,"tag":45,"props":188,"children":189},{"style":110},[190],{"type":18,"value":191}," crate",{"type":13,"tag":45,"props":193,"children":194},{"style":110},[195],{"type":18,"value":196}," ::",{"type":13,"tag":45,"props":198,"children":199},{"style":52},[200],{"type":18,"value":201}," vk ",{"type":13,"tag":45,"props":203,"children":204},{"style":110},[205],{"type":18,"value":206},"::",{"type":13,"tag":45,"props":208,"children":209},{"style":77},[210],{"type":18,"value":211}," vk",{"type":13,"tag":45,"props":213,"children":214},{"style":110},[215],{"type":18,"value":206},{"type":13,"tag":45,"props":217,"children":218},{"style":77},[219],{"type":18,"value":220},"Device",{"type":13,"tag":45,"props":222,"children":223},{"style":52},[224],{"type":18,"value":85},{"type":13,"tag":45,"props":226,"children":227},{"class":47,"line":88},[228,233,237,241,245,250],{"type":13,"tag":45,"props":229,"children":230},{"style":52},[231],{"type":18,"value":232}," shader",{"type":13,"tag":45,"props":234,"children":235},{"style":110},[236],{"type":18,"value":186},{"type":13,"tag":45,"props":238,"children":239},{"style":77},[240],{"type":18,"value":211},{"type":13,"tag":45,"props":242,"children":243},{"style":110},[244],{"type":18,"value":206},{"type":13,"tag":45,"props":246,"children":247},{"style":77},[248],{"type":18,"value":249},"ShaderEXT",{"type":13,"tag":45,"props":251,"children":252},{"style":52},[253],{"type":18,"value":85},{"type":13,"tag":45,"props":255,"children":256},{"class":47,"line":106},[257,262,266,271,276],{"type":13,"tag":45,"props":258,"children":259},{"style":52},[260],{"type":18,"value":261}," p_data_size",{"type":13,"tag":45,"props":263,"children":264},{"style":110},[265],{"type":18,"value":186},{"type":13,"tag":45,"props":267,"children":268},{"style":110},[269],{"type":18,"value":270}," *mut",{"type":13,"tag":45,"props":272,"children":273},{"style":77},[274],{"type":18,"value":275}," usize",{"type":13,"tag":45,"props":277,"children":278},{"style":52},[279],{"type":18,"value":85},{"type":13,"tag":45,"props":281,"children":282},{"class":47,"line":125},[283,288,292,296],{"type":13,"tag":45,"props":284,"children":285},{"style":52},[286],{"type":18,"value":287}," p_data",{"type":13,"tag":45,"props":289,"children":290},{"style":110},[291],{"type":18,"value":186},{"type":13,"tag":45,"props":293,"children":294},{"style":110},[295],{"type":18,"value":270},{"type":13,"tag":45,"props":297,"children":298},{"style":52},[299],{"type":18,"value":300}," c_void,\n",{"type":13,"tag":45,"props":302,"children":304},{"class":47,"line":303},6,[305,310,315,319,323,328],{"type":13,"tag":45,"props":306,"children":307},{"style":52},[308],{"type":18,"value":309},") ",{"type":13,"tag":45,"props":311,"children":312},{"style":110},[313],{"type":18,"value":314},"->",{"type":13,"tag":45,"props":316,"children":317},{"style":77},[318],{"type":18,"value":211},{"type":13,"tag":45,"props":320,"children":321},{"style":110},[322],{"type":18,"value":206},{"type":13,"tag":45,"props":324,"children":325},{"style":77},[326],{"type":18,"value":327},"Result",{"type":13,"tag":45,"props":329,"children":330},{"style":52},[331],{"type":18,"value":332},";\n",{"type":13,"tag":334,"props":335,"children":336},"ul",{},[337,348,358,377],{"type":13,"tag":338,"props":339,"children":340},"li",{},[341,346],{"type":13,"tag":41,"props":342,"children":344},{"className":343},[],[345],{"type":18,"value":80},{"type":18,"value":347}," is the logical device that shader object was created from.",{"type":13,"tag":338,"props":349,"children":350},{},[351,356],{"type":13,"tag":41,"props":352,"children":354},{"className":353},[],[355],{"type":18,"value":99},{"type":18,"value":357}," is the shader object to retrieve binary shader code from.",{"type":13,"tag":338,"props":359,"children":360},{},[361,367,369,375],{"type":13,"tag":41,"props":362,"children":364},{"className":363},[],[365],{"type":18,"value":366},"pDataSize",{"type":18,"value":368}," is a pointer to a ",{"type":13,"tag":41,"props":370,"children":372},{"className":371},[],[373],{"type":18,"value":374},"size_t",{"type":18,"value":376}," value related to the size\nof the binary shader code, as described below.",{"type":13,"tag":338,"props":378,"children":379},{},[380,386,388,394],{"type":13,"tag":41,"props":381,"children":383},{"className":382},[],[384],{"type":18,"value":385},"pData",{"type":18,"value":387}," is either ",{"type":13,"tag":41,"props":389,"children":391},{"className":390},[],[392],{"type":18,"value":393},"NULL",{"type":18,"value":395}," or a pointer to a buffer.",{"type":13,"tag":14,"props":397,"children":398},{},[399,401,406,408,413,415,420,422,427,429,433,435,440,442,447,449,454,456,461,463,469,471,477],{"type":18,"value":400},"If ",{"type":13,"tag":41,"props":402,"children":404},{"className":403},[],[405],{"type":18,"value":385},{"type":18,"value":407}," is ",{"type":13,"tag":41,"props":409,"children":411},{"className":410},[],[412],{"type":18,"value":393},{"type":18,"value":414},", then the size of the binary shader code of the\nshader object, in bytes, is returned in ",{"type":13,"tag":41,"props":416,"children":418},{"className":417},[],[419],{"type":18,"value":366},{"type":18,"value":421},".\nOtherwise, ",{"type":13,"tag":41,"props":423,"children":425},{"className":424},[],[426],{"type":18,"value":366},{"type":18,"value":428}," ",{"type":13,"tag":21,"props":430,"children":432},{"type":431},"must",[],{"type":18,"value":434}," point to a variable set by the application\nto the size of the buffer, in bytes, pointed to by ",{"type":13,"tag":41,"props":436,"children":438},{"className":437},[],[439],{"type":18,"value":385},{"type":18,"value":441},", and on\nreturn the variable is overwritten with the amount of data actually written\nto ",{"type":13,"tag":41,"props":443,"children":445},{"className":444},[],[446],{"type":18,"value":385},{"type":18,"value":448},".\nIf ",{"type":13,"tag":41,"props":450,"children":452},{"className":451},[],[453],{"type":18,"value":366},{"type":18,"value":455}," is less than the size of the binary shader code, nothing\nis written to ",{"type":13,"tag":41,"props":457,"children":459},{"className":458},[],[460],{"type":18,"value":385},{"type":18,"value":462},", and ",{"type":13,"tag":41,"props":464,"children":466},{"className":465},[],[467],{"type":18,"value":468},"VK_INCOMPLETE",{"type":18,"value":470}," will be returned instead\nof ",{"type":13,"tag":41,"props":472,"children":474},{"className":473},[],[475],{"type":18,"value":476},"VK_SUCCESS",{"type":18,"value":478},".",{"type":13,"tag":480,"props":481,"children":482},"note",{},[483],{"type":13,"tag":14,"props":484,"children":485},{},[486,488,493,495,500,502,507],{"type":18,"value":487},"The behavior of this command when ",{"type":13,"tag":41,"props":489,"children":491},{"className":490},[],[492],{"type":18,"value":366},{"type":18,"value":494}," is too small differs from\nhow some other getter-type commands work in Vulkan.\nBecause shader binary data is only usable in its entirety, it would never be\nuseful for the implementation to return partial data.\nBecause of this, nothing is written to ",{"type":13,"tag":41,"props":496,"children":498},{"className":497},[],[499],{"type":18,"value":385},{"type":18,"value":501}," unless ",{"type":13,"tag":41,"props":503,"children":505},{"className":504},[],[506],{"type":18,"value":366},{"type":18,"value":508}," is\nlarge enough to fit the data in its entirety.",{"type":13,"tag":14,"props":510,"children":511},{},[512,514,519,520,523,525,532,534,540,542,548,550,556],{"type":18,"value":513},"Binary shader code retrieved using ",{"type":13,"tag":41,"props":515,"children":517},{"className":516},[],[518],{"type":18,"value":4},{"type":18,"value":428},{"type":13,"tag":21,"props":521,"children":522},{"type":23},[],{"type":18,"value":524}," be\npassed to a subsequent call to ",{"type":13,"tag":526,"props":527,"children":529},"a",{"href":528},"/man/vkCreateShadersEXT",[530],{"type":18,"value":531},"vkCreateShadersEXT",{"type":18,"value":533}," on a compatible\nphysical device by specifying ",{"type":13,"tag":41,"props":535,"children":537},{"className":536},[],[538],{"type":18,"value":539},"VK_SHADER_CODE_TYPE_BINARY_EXT",{"type":18,"value":541}," in the\n",{"type":13,"tag":41,"props":543,"children":545},{"className":544},[],[546],{"type":18,"value":547},"codeType",{"type":18,"value":549}," member of ",{"type":13,"tag":41,"props":551,"children":553},{"className":552},[],[554],{"type":18,"value":555},"VkShaderCreateInfoEXT",{"type":18,"value":478},{"type":13,"tag":14,"props":558,"children":559},{},[560,562,568,570,575],{"type":18,"value":561},"The shader code returned by repeated calls to this function with the same\n",{"type":13,"tag":41,"props":563,"children":565},{"className":564},[],[566],{"type":18,"value":567},"VkShaderEXT",{"type":18,"value":569}," is guaranteed to be invariant for the lifetime of the\n",{"type":13,"tag":41,"props":571,"children":573},{"className":572},[],[574],{"type":18,"value":567},{"type":18,"value":576}," object.",{"type":13,"tag":578,"props":579,"children":581},"validity-group",{"name":580},"Valid Usage",[582,609],{"type":13,"tag":583,"props":584,"children":586},"validity-field",{"name":585},"VUID-vkGetShaderBinaryDataEXT-None-08461",[587],{"type":13,"tag":14,"props":588,"children":589},{},[590,592,602,604,607],{"type":18,"value":591},"The ",{"type":13,"tag":526,"props":593,"children":595},{"href":594},"/man/VkPhysicalDeviceShaderObjectFeaturesEXT#features-shaderObject",[596],{"type":13,"tag":41,"props":597,"children":599},{"className":598},[],[600],{"type":18,"value":601},"shaderObject",{"type":18,"value":603}," feature ",{"type":13,"tag":21,"props":605,"children":606},{"type":431},[],{"type":18,"value":608}," be\nenabled",{"type":13,"tag":583,"props":610,"children":612},{"name":611},"VUID-vkGetShaderBinaryDataEXT-None-08499",[613],{"type":13,"tag":14,"props":614,"children":615},{},[616,617,622,624,629,631,634,636,642],{"type":18,"value":400},{"type":13,"tag":41,"props":618,"children":620},{"className":619},[],[621],{"type":18,"value":385},{"type":18,"value":623}," is not ",{"type":13,"tag":41,"props":625,"children":627},{"className":626},[],[628],{"type":18,"value":393},{"type":18,"value":630},", it ",{"type":13,"tag":21,"props":632,"children":633},{"type":431},[],{"type":18,"value":635}," be aligned to ",{"type":13,"tag":41,"props":637,"children":639},{"className":638},[],[640],{"type":18,"value":641},"16",{"type":18,"value":643}," bytes",{"type":13,"tag":578,"props":645,"children":647},{"name":646},"Valid Usage (Implicit)",[648,674,697,722,774],{"type":13,"tag":583,"props":649,"children":651},{"name":650},"VUID-vkGetShaderBinaryDataEXT-device-parameter",[652],{"type":13,"tag":14,"props":653,"children":654},{},[655,660,661,664,666,672],{"type":13,"tag":41,"props":656,"children":658},{"className":657},[],[659],{"type":18,"value":80},{"type":18,"value":428},{"type":13,"tag":21,"props":662,"children":663},{"type":431},[],{"type":18,"value":665}," be a valid ",{"type":13,"tag":526,"props":667,"children":669},{"href":668},"/man/VkDevice",[670],{"type":18,"value":671},"VkDevice",{"type":18,"value":673}," handle",{"type":13,"tag":583,"props":675,"children":677},{"name":676},"VUID-vkGetShaderBinaryDataEXT-shader-parameter",[678],{"type":13,"tag":14,"props":679,"children":680},{},[681,686,687,690,691,696],{"type":13,"tag":41,"props":682,"children":684},{"className":683},[],[685],{"type":18,"value":99},{"type":18,"value":428},{"type":13,"tag":21,"props":688,"children":689},{"type":431},[],{"type":18,"value":665},{"type":13,"tag":526,"props":692,"children":694},{"href":693},"/man/VkShaderEXT",[695],{"type":18,"value":567},{"type":18,"value":673},{"type":13,"tag":583,"props":698,"children":700},{"name":699},"VUID-vkGetShaderBinaryDataEXT-pDataSize-parameter",[701],{"type":13,"tag":14,"props":702,"children":703},{},[704,709,710,713,715,720],{"type":13,"tag":41,"props":705,"children":707},{"className":706},[],[708],{"type":18,"value":366},{"type":18,"value":428},{"type":13,"tag":21,"props":711,"children":712},{"type":431},[],{"type":18,"value":714}," be a valid pointer to a ",{"type":13,"tag":41,"props":716,"children":718},{"className":717},[],[719],{"type":18,"value":374},{"type":18,"value":721}," value",{"type":13,"tag":583,"props":723,"children":725},{"name":724},"VUID-vkGetShaderBinaryDataEXT-pData-parameter",[726],{"type":13,"tag":14,"props":727,"children":728},{},[729,731,736,737,743,744,749,750,755,757,762,763,766,768,773],{"type":18,"value":730},"If the value referenced by ",{"type":13,"tag":41,"props":732,"children":734},{"className":733},[],[735],{"type":18,"value":366},{"type":18,"value":623},{"type":13,"tag":41,"props":738,"children":740},{"className":739},[],[741],{"type":18,"value":742},"0",{"type":18,"value":462},{"type":13,"tag":41,"props":745,"children":747},{"className":746},[],[748],{"type":18,"value":385},{"type":18,"value":623},{"type":13,"tag":41,"props":751,"children":753},{"className":752},[],[754],{"type":18,"value":393},{"type":18,"value":756},", ",{"type":13,"tag":41,"props":758,"children":760},{"className":759},[],[761],{"type":18,"value":385},{"type":18,"value":428},{"type":13,"tag":21,"props":764,"children":765},{"type":431},[],{"type":18,"value":767}," be a valid pointer to an array of ",{"type":13,"tag":41,"props":769,"children":771},{"className":770},[],[772],{"type":18,"value":366},{"type":18,"value":643},{"type":13,"tag":583,"props":775,"children":777},{"name":776},"VUID-vkGetShaderBinaryDataEXT-shader-parent",[778],{"type":13,"tag":14,"props":779,"children":780},{},[781,786,787,790,792],{"type":13,"tag":41,"props":782,"children":784},{"className":783},[],[785],{"type":18,"value":99},{"type":18,"value":428},{"type":13,"tag":21,"props":788,"children":789},{"type":431},[],{"type":18,"value":791}," have been created, allocated, or retrieved from ",{"type":13,"tag":41,"props":793,"children":795},{"className":794},[],[796],{"type":18,"value":80},{"type":13,"tag":798,"props":799,"children":800},"style",{},[801],{"type":18,"value":802},"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":38,"searchDepth":68,"depth":68,"links":804},[],"markdown",1729612518912]