• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2022 NVIDIA Corporation
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[[memory-decompression]]
6= Memory Decompression
7
8[open,refpage='vkCmdDecompressMemoryNV',desc='Decompress data between memory regions',type='protos']
9--
10To decompress data between one or more memory regions call:
11
12include::{generated}/api/protos/vkCmdDecompressMemoryNV.adoc[]
13
14  * pname:commandBuffer is the command buffer into which the command will be
15    recorded.
16  * pname:decompressRegionCount is the number of memory regions to
17    decompress.
18  * pname:pDecompressMemoryRegions is a pointer to an array of
19    pname:decompressRegionCount slink:VkDecompressMemoryRegionNV structures
20    specifying decompression parameters.
21
22Each region specified in pname:pDecompressMemoryRegions is decompressed from
23the source to destination region based on the specified decompression
24method.
25
26.Valid Usage
27****
28  * [[VUID-vkCmdDecompressMemoryNV-None-07684]]
29    The <<features-memoryDecompression, pname:memoryDecompression>> feature
30    must: be enabled
31****
32
33include::{generated}/validity/protos/vkCmdDecompressMemoryNV.adoc[]
34--
35
36[open,refpage='VkDecompressMemoryRegionNV',desc='Structure specifying decompression parameters',type='structs']
37--
38The sname:VkDecompressMemoryRegionNV structure is defined as:
39
40include::{generated}/api/structs/VkDecompressMemoryRegionNV.adoc[]
41
42  * pname:srcAddress is the address where compressed data is stored.
43  * pname:dstAddress is the destination address where decompressed data will
44    be written.
45  * pname:compressedSize is the size of compressed data in bytes.
46  * pname:decompressedSize is the size of decompressed data in bytes.
47  * pname:decompressionMethod is a bitmask of
48    ename:VkMemoryDecompressionMethodFlagBitsNV with a single bit set
49    specifying the method used to decompress data.
50
51.Valid Usage
52****
53  * [[VUID-VkDecompressMemoryRegionNV-srcAddress-07685]]
54    The pname:srcAddress must: be 4 byte aligned
55  * [[VUID-VkDecompressMemoryRegionNV-srcAddress-07686]]
56    The memory in range pname:srcAddress and pname:srcAddress {plus}
57    pname:compressedSize must: be valid and bound to a sname:VkDeviceMemory
58    object
59  * [[VUID-VkDecompressMemoryRegionNV-dstAddress-07687]]
60    The pname:dstAddress must: be 4 byte aligned
61  * [[VUID-VkDecompressMemoryRegionNV-dstAddress-07688]]
62    The memory in range pname:dstAddress and pname:dstAddress {plus}
63    pname:decompressedSize must: be valid and bound to a
64    sname:VkDeviceMemory object
65  * [[VUID-VkDecompressMemoryRegionNV-decompressedSize-07689]]
66    The pname:decompressedSize must: be large enough to hold the
67    decompressed data based on the pname:decompressionMethod
68  * [[VUID-VkDecompressMemoryRegionNV-decompressionMethod-07690]]
69    The pname:decompressionMethod must: have a single bit set
70  * [[VUID-VkDecompressMemoryRegionNV-srcAddress-07691]]
71    The pname:srcAddress to pname:srcAddress {plus} pname:compressedSize
72    region must: not overlap with the pname:dstAddress and pname:dstAddress
73    {plus} pname:decompressedSize region
74****
75
76include::{generated}/validity/structs/VkDecompressMemoryRegionNV.adoc[]
77--
78
79[open,refpage='vkCmdDecompressMemoryIndirectCountNV',desc='Indirect decompress data between memory regions',type='protos']
80--
81To decompress data between one or more memory regions by specifying
82decompression parameters indirectly in a buffer, call:
83
84include::{generated}/api/protos/vkCmdDecompressMemoryIndirectCountNV.adoc[]
85
86  * pname:commandBuffer is the command buffer into which the command will be
87    recorded.
88  * pname:indirectCommandsAddress is the device address containing
89    decompression parameters laid out as an array of
90    slink:VkDecompressMemoryRegionNV structures.
91  * pname:indirectCommandsCountAddress is the device address containing the
92    decompression count.
93  * pname:stride is the byte stride between successive sets of decompression
94    parameters located starting from pname:indirectCommandsAddress.
95
96Each region specified in pname:indirectCommandsAddress is decompressed from
97the source to destination region based on the specified decompression
98method.
99
100.Valid Usage
101****
102  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-None-07692]]
103    The <<features-memoryDecompression, pname:memoryDecompression>> feature
104    must: be enabled
105  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-07693]]
106    If pname:indirectCommandsAddress comes from a non-sparse buffer then it
107    must: be bound completely and contiguously to a single
108    sname:VkDeviceMemory object
109  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsAddress-07694]]
110    The slink:VkBuffer that pname:indirectCommandsAddress comes from must:
111    have been created with the ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit
112    set
113  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-offset-07695]]
114    pname:offset must: be a multiple of `4`
115  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07696]]
116    If pname:indirectCommandsCountAddress comes from a non-sparse buffer
117    then it must: be bound completely and contiguously to a single
118    sname:VkDeviceMemory object
119  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07697]]
120    The slink:VkBuffer that pname:indirectCommandsCountAddress comes from
121    must: have been created with the
122    ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set
123  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07698]]
124    pname:indirectCommandsCountAddress must: be a multiple of `4`
125  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07699]]
126    The count stored in pname:indirectCommandsCountAddress must: be less
127    than or equal to
128    sname:VkPhysicalDeviceMemoryDecompressionPropertiesNV::pname:maxDecompressionIndirectCount
129  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-stride-07700]]
130    pname:stride must: be a multiple of `4` and must: be greater than or
131    equal to sizeof(sname:VkDecompressMemoryRegionNV)
132  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07701]]
133    If the count stored in pname:indirectCommandsCountAddress is equal to
134    `1`, [eq]#(pname:offset {plus}
135    sizeof(sname:VkDecompressMemoryRegionNV))# must: be less than or equal
136    to the size of the slink:VkBuffer that pname:indirectCommandsAddress
137    comes from
138  * [[VUID-vkCmdDecompressMemoryIndirectCountNV-indirectCommandsCountAddress-07702]]
139    If the count stored in pname:indirectCommandsCountAddress is greater
140    than `1`, pname:indirectCommandsAddress {plus}
141    sizeof(sname:VkDecompressMemoryRegionNV) {plus} [eq]#(pname:stride
142    {times} (count stored in pname:countBuffer - 1))# must: be less than or
143    equal to the last valid address in the slink:VkBuffer that
144    pname:indirectCommandsAddress was created from
145****
146
147include::{generated}/validity/protos/vkCmdDecompressMemoryIndirectCountNV.adoc[]
148--
149
150[open,refpage='VkMemoryDecompressionMethodFlagBitsNV',desc='List the supported memory decompression methods',type='enums']
151--
152Bits which can: be set in
153sname:VkDecompressMemoryRegionNV::pname:decompressionMethod specifying the
154decompression method to select, or returned in
155sname:VkPhysicalDeviceMemoryDecompressionPropertiesNV::pname:decompressionMethods
156specifying the available decompression methods are:
157
158include::{generated}/api/enums/VkMemoryDecompressionMethodFlagBitsNV.adoc[]
159
160  * ename:VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV specifies that
161    the GDeflate 1.0 algorithm is used to decompress data.
162--
163
164[open,refpage='VkMemoryDecompressionMethodFlagsNV',desc='Bitmask of VkMemoryDecompressionMethodFlagBitsNV',type='flags']
165--
166include::{generated}/api/flags/VkMemoryDecompressionMethodFlagsNV.adoc[]
167
168tname:VkMemoryDecompressionMethodFlagsNV is a bitmask type for specifying a
169mask of one or more ename:VkMemoryDecompressionMethodFlagBitsNV:
170--
171