[{"data":1,"prerenderedAt":725},["ShallowReactive",2],{"d0WMDwTqDN":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":724,"_id":4},"VkHostImageCopyDevicePerformanceQueryEXT","Struct containing information about optimality of device access","VK_EXT_host_image_copy","structs",[],{"type":10,"children":11,"toc":722},"root",[12,84,337,469,538,578,627,643,651,686,716],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,27,29,34,36,43,45,51,53,58,60,66,68,74,76,82],{"type":18,"value":19},"text","To query if using ",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":26},"VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT",{"type":18,"value":28}," has a negative\nimpact on device performance when accessing an image, add\n",{"type":13,"tag":21,"props":30,"children":32},{"className":31},[],[33],{"type":18,"value":26},{"type":18,"value":35}," to\n",{"type":13,"tag":37,"props":38,"children":40},"a",{"href":39},"/man/VkPhysicalDeviceImageFormatInfo2",[41],{"type":18,"value":42},"VkPhysicalDeviceImageFormatInfo2",{"type":18,"value":44},"::",{"type":13,"tag":21,"props":46,"children":48},{"className":47},[],[49],{"type":18,"value":50},"usage",{"type":18,"value":52},", and add a\n",{"type":13,"tag":21,"props":54,"children":56},{"className":55},[],[57],{"type":18,"value":4},{"type":18,"value":59}," structure to the ",{"type":13,"tag":21,"props":61,"children":63},{"className":62},[],[64],{"type":18,"value":65},"pNext",{"type":18,"value":67},"\nchain of a ",{"type":13,"tag":37,"props":69,"children":71},{"href":70},"/man/VkImageFormatProperties2",[72],{"type":18,"value":73},"VkImageFormatProperties2",{"type":18,"value":75}," structure passed to\n",{"type":13,"tag":37,"props":77,"children":79},{"href":78},"/man/vkGetPhysicalDeviceImageFormatProperties2",[80],{"type":18,"value":81},"vkGetPhysicalDeviceImageFormatProperties2",{"type":18,"value":83},".\nThis structure is defined as:",{"type":13,"tag":85,"props":86,"children":87},"code-group",{},[88,173],{"type":13,"tag":89,"props":90,"children":96},"pre",{"className":91,"code":92,"filename":93,"language":94,"meta":95,"style":95},"language-c shiki shiki-themes github-light-default github-dark-default","typedef struct VkHostImageCopyDevicePerformanceQueryEXT {\n VkStructureType sType;\n void* pNext;\n VkBool32 optimalDeviceAccess;\n VkBool32 identicalMemoryLayout;\n} VkHostImageCopyDevicePerformanceQueryEXT;\n","C","c","",[97],{"type":13,"tag":21,"props":98,"children":99},{"__ignoreMap":95},[100,123,132,146,155,164],{"type":13,"tag":101,"props":102,"children":105},"span",{"class":103,"line":104},"line",1,[106,112,117],{"type":13,"tag":101,"props":107,"children":109},{"style":108},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[110],{"type":18,"value":111},"typedef",{"type":13,"tag":101,"props":113,"children":114},{"style":108},[115],{"type":18,"value":116}," struct",{"type":13,"tag":101,"props":118,"children":120},{"style":119},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[121],{"type":18,"value":122}," VkHostImageCopyDevicePerformanceQueryEXT {\n",{"type":13,"tag":101,"props":124,"children":126},{"class":103,"line":125},2,[127],{"type":13,"tag":101,"props":128,"children":129},{"style":119},[130],{"type":18,"value":131}," VkStructureType sType;\n",{"type":13,"tag":101,"props":133,"children":135},{"class":103,"line":134},3,[136,141],{"type":13,"tag":101,"props":137,"children":138},{"style":108},[139],{"type":18,"value":140}," void*",{"type":13,"tag":101,"props":142,"children":143},{"style":119},[144],{"type":18,"value":145}," pNext;\n",{"type":13,"tag":101,"props":147,"children":149},{"class":103,"line":148},4,[150],{"type":13,"tag":101,"props":151,"children":152},{"style":119},[153],{"type":18,"value":154}," VkBool32 optimalDeviceAccess;\n",{"type":13,"tag":101,"props":156,"children":158},{"class":103,"line":157},5,[159],{"type":13,"tag":101,"props":160,"children":161},{"style":119},[162],{"type":18,"value":163}," VkBool32 identicalMemoryLayout;\n",{"type":13,"tag":101,"props":165,"children":167},{"class":103,"line":166},6,[168],{"type":13,"tag":101,"props":169,"children":170},{"style":119},[171],{"type":18,"value":172},"} VkHostImageCopyDevicePerformanceQueryEXT;\n",{"type":13,"tag":89,"props":174,"children":179},{"className":175,"code":176,"filename":177,"language":178,"meta":95,"style":95},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct HostImageCopyDevicePerformanceQueryEXT {\n s_type: vk::StructureType,\n p_next: *mut c_void,\n optimal_device_access: vk::Bool32, // Specifies if device access is optimal\n identical_memory_layout: vk::Bool32, // Specifies if memory layout is identical\n}\n","Rust","rs",[180],{"type":13,"tag":21,"props":181,"children":182},{"__ignoreMap":95},[183,206,238,260,296,329],{"type":13,"tag":101,"props":184,"children":185},{"class":103,"line":104},[186,191,195,201],{"type":13,"tag":101,"props":187,"children":188},{"style":108},[189],{"type":18,"value":190},"pub",{"type":13,"tag":101,"props":192,"children":193},{"style":108},[194],{"type":18,"value":116},{"type":13,"tag":101,"props":196,"children":198},{"style":197},"--shiki-default:#953800;--shiki-dark:#FFA657",[199],{"type":18,"value":200}," HostImageCopyDevicePerformanceQueryEXT",{"type":13,"tag":101,"props":202,"children":203},{"style":119},[204],{"type":18,"value":205}," {\n",{"type":13,"tag":101,"props":207,"children":208},{"class":103,"line":125},[209,214,219,224,228,233],{"type":13,"tag":101,"props":210,"children":211},{"style":119},[212],{"type":18,"value":213}," s_type",{"type":13,"tag":101,"props":215,"children":216},{"style":108},[217],{"type":18,"value":218},":",{"type":13,"tag":101,"props":220,"children":221},{"style":197},[222],{"type":18,"value":223}," vk",{"type":13,"tag":101,"props":225,"children":226},{"style":108},[227],{"type":18,"value":44},{"type":13,"tag":101,"props":229,"children":230},{"style":197},[231],{"type":18,"value":232},"StructureType",{"type":13,"tag":101,"props":234,"children":235},{"style":119},[236],{"type":18,"value":237},",\n",{"type":13,"tag":101,"props":239,"children":240},{"class":103,"line":134},[241,246,250,255],{"type":13,"tag":101,"props":242,"children":243},{"style":119},[244],{"type":18,"value":245}," p_next",{"type":13,"tag":101,"props":247,"children":248},{"style":108},[249],{"type":18,"value":218},{"type":13,"tag":101,"props":251,"children":252},{"style":108},[253],{"type":18,"value":254}," *mut",{"type":13,"tag":101,"props":256,"children":257},{"style":119},[258],{"type":18,"value":259}," c_void,\n",{"type":13,"tag":101,"props":261,"children":262},{"class":103,"line":148},[263,268,272,276,280,285,290],{"type":13,"tag":101,"props":264,"children":265},{"style":119},[266],{"type":18,"value":267}," optimal_device_access",{"type":13,"tag":101,"props":269,"children":270},{"style":108},[271],{"type":18,"value":218},{"type":13,"tag":101,"props":273,"children":274},{"style":197},[275],{"type":18,"value":223},{"type":13,"tag":101,"props":277,"children":278},{"style":108},[279],{"type":18,"value":44},{"type":13,"tag":101,"props":281,"children":282},{"style":197},[283],{"type":18,"value":284},"Bool32",{"type":13,"tag":101,"props":286,"children":287},{"style":119},[288],{"type":18,"value":289},", ",{"type":13,"tag":101,"props":291,"children":293},{"style":292},"--shiki-default:#6E7781;--shiki-dark:#8B949E",[294],{"type":18,"value":295},"// Specifies if device access is optimal\n",{"type":13,"tag":101,"props":297,"children":298},{"class":103,"line":157},[299,304,308,312,316,320,324],{"type":13,"tag":101,"props":300,"children":301},{"style":119},[302],{"type":18,"value":303}," identical_memory_layout",{"type":13,"tag":101,"props":305,"children":306},{"style":108},[307],{"type":18,"value":218},{"type":13,"tag":101,"props":309,"children":310},{"style":197},[311],{"type":18,"value":223},{"type":13,"tag":101,"props":313,"children":314},{"style":108},[315],{"type":18,"value":44},{"type":13,"tag":101,"props":317,"children":318},{"style":197},[319],{"type":18,"value":284},{"type":13,"tag":101,"props":321,"children":322},{"style":119},[323],{"type":18,"value":289},{"type":13,"tag":101,"props":325,"children":326},{"style":292},[327],{"type":18,"value":328},"// Specifies if memory layout is identical\n",{"type":13,"tag":101,"props":330,"children":331},{"class":103,"line":166},[332],{"type":13,"tag":101,"props":333,"children":334},{"style":119},[335],{"type":18,"value":336},"}\n",{"type":13,"tag":338,"props":339,"children":340},"ul",{},[341,361,379,429],{"type":13,"tag":342,"props":343,"children":344},"li",{},[345,351,353,359],{"type":13,"tag":21,"props":346,"children":348},{"className":347},[],[349],{"type":18,"value":350},"sType",{"type":18,"value":352}," is a ",{"type":13,"tag":37,"props":354,"children":356},{"href":355},"/man/VkStructureType",[357],{"type":18,"value":358},"VkStructureType",{"type":18,"value":360}," value identifying this structure.",{"type":13,"tag":342,"props":362,"children":363},{},[364,369,371,377],{"type":13,"tag":21,"props":365,"children":367},{"className":366},[],[368],{"type":18,"value":65},{"type":18,"value":370}," is ",{"type":13,"tag":21,"props":372,"children":374},{"className":373},[],[375],{"type":18,"value":376},"NULL",{"type":18,"value":378}," or a pointer to a structure extending this\nstructure.",{"type":13,"tag":342,"props":380,"children":381},{},[382,388,390,396,398,404,406,411,413,419,421,427],{"type":13,"tag":21,"props":383,"children":385},{"className":384},[],[386],{"type":18,"value":387},"optimalDeviceAccess",{"type":18,"value":389}," returns ",{"type":13,"tag":21,"props":391,"children":393},{"className":392},[],[394],{"type":18,"value":395},"VK_TRUE",{"type":18,"value":397}," if use of host image\ncopy has no adverse effect on device access performance, compared to an\nimage that is created with exact same creation parameters, and bound to\nthe same ",{"type":13,"tag":37,"props":399,"children":401},{"href":400},"/man/VkDeviceMemory",[402],{"type":18,"value":403},"VkDeviceMemory",{"type":18,"value":405},", except that\n",{"type":13,"tag":21,"props":407,"children":409},{"className":408},[],[410],{"type":18,"value":26},{"type":18,"value":412}," is replaced with\n",{"type":13,"tag":21,"props":414,"children":416},{"className":415},[],[417],{"type":18,"value":418},"VK_IMAGE_USAGE_TRANSFER_SRC_BIT",{"type":18,"value":420}," and\n",{"type":13,"tag":21,"props":422,"children":424},{"className":423},[],[425],{"type":18,"value":426},"VK_IMAGE_USAGE_TRANSFER_DST_BIT",{"type":18,"value":428},".",{"type":13,"tag":342,"props":430,"children":431},{},[432,438,439,444,446,450,451,456,457,462,463,468],{"type":13,"tag":21,"props":433,"children":435},{"className":434},[],[436],{"type":18,"value":437},"identicalMemoryLayout",{"type":18,"value":389},{"type":13,"tag":21,"props":440,"children":442},{"className":441},[],[443],{"type":18,"value":395},{"type":18,"value":445}," if use of host image\ncopy has no impact on memory layout compared to an image that is created\nwith exact same creation parameters, and bound to the same\n",{"type":13,"tag":37,"props":447,"children":448},{"href":400},[449],{"type":18,"value":403},{"type":18,"value":405},{"type":13,"tag":21,"props":452,"children":454},{"className":453},[],[455],{"type":18,"value":26},{"type":18,"value":412},{"type":13,"tag":21,"props":458,"children":460},{"className":459},[],[461],{"type":18,"value":418},{"type":18,"value":420},{"type":13,"tag":21,"props":464,"children":466},{"className":465},[],[467],{"type":18,"value":426},{"type":18,"value":428},{"type":13,"tag":14,"props":470,"children":471},{},[472,474,479,481,487,489,494,496,501,502,507,509,514,515,520,521,526,530,532,537],{"type":18,"value":473},"The implementation ",{"type":13,"tag":475,"props":476,"children":478},"normative",{"type":477},"may",[],{"type":18,"value":480}," return ",{"type":13,"tag":21,"props":482,"children":484},{"className":483},[],[485],{"type":18,"value":486},"VK_FALSE",{"type":18,"value":488}," in ",{"type":13,"tag":21,"props":490,"children":492},{"className":491},[],[493],{"type":18,"value":387},{"type":18,"value":495},"\nif ",{"type":13,"tag":21,"props":497,"children":499},{"className":498},[],[500],{"type":18,"value":437},{"type":18,"value":370},{"type":13,"tag":21,"props":503,"children":505},{"className":504},[],[506],{"type":18,"value":486},{"type":18,"value":508},".\nIf ",{"type":13,"tag":21,"props":510,"children":512},{"className":511},[],[513],{"type":18,"value":437},{"type":18,"value":370},{"type":13,"tag":21,"props":516,"children":518},{"className":517},[],[519],{"type":18,"value":395},{"type":18,"value":289},{"type":13,"tag":21,"props":522,"children":524},{"className":523},[],[525],{"type":18,"value":387},{"type":13,"tag":475,"props":527,"children":529},{"type":528},"must",[],{"type":18,"value":531}," be ",{"type":13,"tag":21,"props":533,"children":535},{"className":534},[],[536],{"type":18,"value":395},{"type":18,"value":428},{"type":13,"tag":14,"props":539,"children":540},{},[541,542,545,546,551,552,557,559,564,565,570,572,576],{"type":18,"value":473},{"type":13,"tag":475,"props":543,"children":544},{"type":477},[],{"type":18,"value":480},{"type":13,"tag":21,"props":547,"children":549},{"className":548},[],[550],{"type":18,"value":395},{"type":18,"value":488},{"type":13,"tag":21,"props":553,"children":555},{"className":554},[],[556],{"type":18,"value":387},{"type":18,"value":558},"\nwhile ",{"type":13,"tag":21,"props":560,"children":562},{"className":561},[],[563],{"type":18,"value":437},{"type":18,"value":370},{"type":13,"tag":21,"props":566,"children":568},{"className":567},[],[569],{"type":18,"value":486},{"type":18,"value":571},".\nIn this situation, any device performance impact ",{"type":13,"tag":475,"props":573,"children":575},{"type":574},"should",[],{"type":18,"value":577}," not be measurable.",{"type":13,"tag":14,"props":579,"children":580},{},[581,583,587,588,594,596,600,602,608,610,613,614,619,621,626],{"type":18,"value":582},"If ",{"type":13,"tag":37,"props":584,"children":585},{"href":39},[586],{"type":18,"value":42},{"type":18,"value":44},{"type":13,"tag":21,"props":589,"children":591},{"className":590},[],[592],{"type":18,"value":593},"format",{"type":18,"value":595}," is a\nblock-compressed format and ",{"type":13,"tag":37,"props":597,"children":598},{"href":78},[599],{"type":18,"value":81},{"type":18,"value":601},"\nreturns ",{"type":13,"tag":21,"props":603,"children":605},{"className":604},[],[606],{"type":18,"value":607},"VK_SUCCESS",{"type":18,"value":609},", the implementation ",{"type":13,"tag":475,"props":611,"children":612},{"type":528},[],{"type":18,"value":480},{"type":13,"tag":21,"props":615,"children":617},{"className":616},[],[618],{"type":18,"value":395},{"type":18,"value":620}," in\n",{"type":13,"tag":21,"props":622,"children":624},{"className":623},[],[625],{"type":18,"value":387},{"type":18,"value":428},{"type":13,"tag":628,"props":629,"children":630},"note",{},[631],{"type":13,"tag":14,"props":632,"children":633},{},[634,636,641],{"type":18,"value":635},"Applications can make use of ",{"type":13,"tag":21,"props":637,"children":639},{"className":638},[],[640],{"type":18,"value":387},{"type":18,"value":642}," to determine their\nresource copying strategy.\nIf a resource is expected to be accessed more on device than on the host,\nand the implementation considers the resource sub-optimally accessed, it is\nlikely better to use device copies instead.",{"type":13,"tag":628,"props":644,"children":645},{},[646],{"type":13,"tag":14,"props":647,"children":648},{},[649],{"type":18,"value":650},"Layout not being identical yet still considered optimal for device access\ncould happen if the implementation has different memory layout patterns,\nsome of which are easier to access on the host.",{"type":13,"tag":628,"props":652,"children":653},{},[654],{"type":13,"tag":14,"props":655,"children":656},{},[657,659,664,666,671,673,678,679,684],{"type":18,"value":658},"The most practical reason for ",{"type":13,"tag":21,"props":660,"children":662},{"className":661},[],[663],{"type":18,"value":387},{"type":18,"value":665}," to be ",{"type":13,"tag":21,"props":667,"children":669},{"className":668},[],[670],{"type":18,"value":486},{"type":18,"value":672},"\nis that host image access may disable framebuffer compression where it would\notherwise have been enabled.\nThis represents far more efficient host image access since no compression\nalgorithm is required to read or write to the image, but it would impact\ndevice access performance.\nSome implementations may only set ",{"type":13,"tag":21,"props":674,"children":676},{"className":675},[],[677],{"type":18,"value":387},{"type":18,"value":35},{"type":13,"tag":21,"props":680,"children":682},{"className":681},[],[683],{"type":18,"value":486},{"type":18,"value":685}," if certain conditions are met, such as specific image usage\nflags or creation flags.",{"type":13,"tag":687,"props":688,"children":690},"validity-group",{"name":689},"Valid Usage (Implicit)",[691],{"type":13,"tag":692,"props":693,"children":695},"validity-field",{"name":694},"VUID-VkHostImageCopyDevicePerformanceQueryEXT-sType-sType",[696],{"type":13,"tag":14,"props":697,"children":698},{},[699,704,706,709,710],{"type":13,"tag":21,"props":700,"children":702},{"className":701},[],[703],{"type":18,"value":350},{"type":18,"value":705}," ",{"type":13,"tag":475,"props":707,"children":708},{"type":528},[],{"type":18,"value":531},{"type":13,"tag":21,"props":711,"children":713},{"className":712},[],[714],{"type":18,"value":715},"VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT",{"type":13,"tag":717,"props":718,"children":719},"style",{},[720],{"type":18,"value":721},"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":95,"searchDepth":125,"depth":125,"links":723},[],"markdown",1725732555824]