You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicates that the layout is unknown, and is likely adapter-dependent.
60
-
During creation, the driver chooses the most efficient layout based on other resource properties, especially resource size and flags.
61
-
Prefer this choice unless certain functionality is required from another texture layout.
62
-
59
+
During creation, the driver chooses the most efficient layout based on other resource properties, especially resource size and flags.
60
+
Prefer this choice unless certain functionality is required from another texture layout.
63
61
64
62
Zero-copy texture upload optimizations exist for UMA architectures; see <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12resource-writetosubresource">ID3D12Resource::WriteToSubresource</a>.
65
63
66
64
### -field D3D12_TEXTURE_LAYOUT_ROW_MAJOR
67
65
68
66
Indicates that data for the texture is stored in row-major order (sometimes called "pitch-linear order").
69
-
70
67
71
68
This texture layout locates consecutive texels of a row contiguously in memory, before the texels of the next row.
72
-
Similarly, consecutive texels of a particular depth or array slice are contiguous in memory before the texels of the next depth or array slice.
73
-
Padding may exist between rows and between depth or array slices to align collections of data.
74
-
A stride is the distance in memory between rows, depth, or array slices; and it includes any padding.
75
-
69
+
Similarly, consecutive texels of a particular depth or array slice are contiguous in memory before the texels of the next depth or array slice.
70
+
Padding may exist between rows and between depth or array slices to align collections of data.
71
+
A stride is the distance in memory between rows, depth, or array slices; and it includes any padding.
76
72
77
73
This texture layout enables sharing of the texture data between multiple adapters, when other layouts aren't available.
78
-
79
74
80
75
Many restrictions apply, because this layout is generally not efficient for extensive usage:
81
-
82
76
83
77
<ul>
84
-
<li>The locality of nearby texels is not rotationally invariant.
85
-
</li>
78
+
<li>The locality of nearby texels is not rotationally invariant.</li>
86
79
<li>Only the following texture properties are supported:
<li>The texture must be created on a heap with <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_heap_flags">D3D12_HEAP_FLAG</a>_SHARED_CROSS_ADAPTER.
106
-
</li>
90
+
<li>The texture must be created on a heap with <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_heap_flags">D3D12_HEAP_FLAG</a>_SHARED_CROSS_ADAPTER.</li>
107
91
</ul>
108
92
Buffers are created with <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_texture_layout">D3D12_TEXTURE_LAYOUT</a>_ROW_MAJOR, because row-major texture data can be located in them without creating a texture object.
109
-
This is commonly used for uploading or reading back texture data, especially for discrete/NUMA adapters.
110
-
However, <b>D3D12_TEXTURE_LAYOUT</b>_ROW_MAJOR can also be used when marshaling texture data between GPUs or adapters.
111
-
For examples of usage with <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copytextureregion">ID3D12GraphicsCommandList::CopyTextureRegion</a>, see some of the following topics:
112
-
93
+
This is commonly used for uploading or reading back texture data, especially for discrete/NUMA adapters.
94
+
However, <b>D3D12_TEXTURE_LAYOUT</b>_ROW_MAJOR can also be used when marshaling texture data between GPUs or adapters.
95
+
For examples of usage with <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-copytextureregion">ID3D12GraphicsCommandList::CopyTextureRegion</a>, see some of the following topics:
113
96
114
97
<ul>
115
-
<li>
116
-
<ahref="/windows/win32/direct3d12/default-texture-mapping">Default Texture Mapping and Standard Swizzle</a>
Indicates that the layout within 64KB tiles and tail mip packing is up to the driver.
132
-
No standard swizzle pattern.
133
-
107
+
No standard swizzle pattern.
134
108
135
109
This texture layout is arranged into contiguous 64KB regions, also known as tiles, containing near equilateral amount of consecutive number of texels along each dimension.
136
-
Tiles are arranged in row-major order.
137
-
While there is no padding between tiles, there are typically unused texels within the last tile in each dimension.
138
-
The layout of texels within the tile is undefined.
139
-
Each subresource immediately follows where the previous subresource end, and the subresource order follows the same sequence as subresource ordinals.
140
-
However, tail mip packing is adapter-specific.
141
-
For more details, see tiled resource tier and <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12device-getresourcetiling">ID3D12Device::GetResourceTiling</a>.
142
-
110
+
Tiles are arranged in row-major order.
111
+
While there is no padding between tiles, there are typically unused texels within the last tile in each dimension.
112
+
The layout of texels within the tile is undefined.
113
+
Each subresource immediately follows where the previous subresource end, and the subresource order follows the same sequence as subresource ordinals.
114
+
However, tail mip packing is adapter-specific.
115
+
For more details, see tiled resource tier and <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12device-getresourcetiling">ID3D12Device::GetResourceTiling</a>.
143
116
144
117
This texture layout enables partially resident or sparse texture scenarios when used together with virtual memory page mapping functionality.
145
-
This texture layout must be used together with <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12device-createreservedresource">ID3D12Device::CreateReservedResource</a> to enable the usage of <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12commandqueue-updatetilemappings">ID3D12CommandQueue::UpdateTileMappings</a>.
146
-
118
+
This texture layout must be used together with <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12device-createreservedresource">ID3D12Device::CreateReservedResource</a> to enable the usage of <ahref="/windows/win32/api/d3d12/nf-d3d12-id3d12commandqueue-updatetilemappings">ID3D12CommandQueue::UpdateTileMappings</a>.
147
119
148
120
Some restrictions apply to textures with this layout:
149
-
150
121
151
122
<ul>
152
-
<li>The adapter must support <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_tiled_resources_tier">D3D12_TILED_RESOURCES_TIER</a> 1 or greater.
153
-
</li>
154
-
<li>64KB alignment must be used.
155
-
</li>
156
-
<li>
157
-
<ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_resource_dimension">D3D12_RESOURCE_DIMENSION</a>_TEXTURE1D is not supported, nor are all formats.
158
-
</li>
159
-
<li>The tiled resource tier indicates whether textures with <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_resource_dimension">D3D12_RESOURCE_DIMENSION</a>_TEXTURE3D is supported.
160
-
</li>
123
+
<li>The adapter must support <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_tiled_resources_tier">D3D12_TILED_RESOURCES_TIER</a> 1 or greater.</li>
124
+
<li>64KB alignment must be used.</li>
125
+
<li><ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_resource_dimension">D3D12_RESOURCE_DIMENSION</a>_TEXTURE1D is not supported, nor are all formats.</li>
126
+
<li>The tiled resource tier indicates whether textures with <ahref="/windows/win32/api/d3d12/ne-d3d12-d3d12_resource_dimension">D3D12_RESOURCE_DIMENSION</a>_TEXTURE3D is supported.</li>
Indicates that a default texture uses the standardized swizzle pattern.
166
-
167
132
168
-
This texture layout is arranged the same way that D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE is, except that the layout of texels within the tile is defined.
169
-
Tail mip packing is adapter-specific.
170
-
133
+
This texture layout is arranged the same way that D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE is, except that the layout of texels within the tile is defined. Tail mip packing is adapter-specific.
171
134
172
135
This texture layout enables optimizations when marshaling data between multiple adapters or between the CPU and GPU.
173
-
The amount of copying can be reduced when multiple components understand the texture memory layout.
174
-
This layout is generally more efficient for extensive usage than row-major layout, due to the rotationally invariant locality of neighboring texels.
175
-
This layout can typically only be used with adapters that support standard swizzle, but exceptions exist for cross-adapter shared heaps.
176
-
136
+
The amount of copying can be reduced when multiple components understand the texture memory layout.
137
+
This layout is generally more efficient for extensive usage than row-major layout, due to the rotationally invariant locality of neighboring texels.
138
+
This layout can typically only be used with adapters that support standard swizzle, but exceptions exist for cross-adapter shared heaps.
177
139
178
140
The restrictions for this layout are that the following aren't supported:
<li>Formats within the <ahref="/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format">DXGI_FORMAT</a>_R32G32B32_TYPELESS group</li>
192
147
</ul>
193
148
194
149
## -remarks
195
150
196
151
This enum is used by the <ahref="/windows/win32/api/d3d12/ns-d3d12-d3d12_resource_desc">D3D12_RESOURCE_DESC</a> structure.
197
-
198
152
199
153
This enumeration controls the swizzle pattern of default textures and enable map support on default textures.
200
-
Callers must query <ahref="/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_d3d12_options">D3D12_FEATURE_DATA_D3D12_OPTIONS</a> to ensure that each option is supported.
201
-
154
+
Callers must query <ahref="/windows/win32/api/d3d12/ns-d3d12-d3d12_feature_data_d3d12_options">D3D12_FEATURE_DATA_D3D12_OPTIONS</a> to ensure that each option is supported.
202
155
203
156
The standard swizzle formats applies within each page-sized chunk, and pages are laid out in linear order with respect to one another.
204
-
A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location.
205
-
157
+
A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location.
0 commit comments