@@ -178,6 +178,7 @@ void ImageInfo::UpdateSize() {
178
178
case AmdGpu::TilingMode::Display_Linear: {
179
179
std::tie (mip_info.pitch , mip_info.size ) =
180
180
ImageSizeLinearAligned (mip_w, mip_h, bpp, num_samples);
181
+ mip_info.height = mip_h;
181
182
break ;
182
183
}
183
184
case AmdGpu::TilingMode::Texture_Volume:
@@ -187,7 +188,12 @@ void ImageInfo::UpdateSize() {
187
188
case AmdGpu::TilingMode::Display_MicroTiled:
188
189
case AmdGpu::TilingMode::Texture_MicroTiled: {
189
190
std::tie (mip_info.pitch , mip_info.size ) =
190
- ImageSizeMicroTiled (mip_w, mip_h, thickness, bpp, num_samples);
191
+ ImageSizeMicroTiled (mip_w, mip_h, bpp, thickness, num_samples);
192
+ mip_info.height = std::max (mip_h, 8u );
193
+ if (props.is_block ) {
194
+ mip_info.pitch = std::max (mip_info.pitch * 4 , 32u );
195
+ mip_info.height = std::max (mip_info.height * 4 , 32u );
196
+ }
191
197
break ;
192
198
}
193
199
case AmdGpu::TilingMode::Display_MacroTiled:
@@ -202,11 +208,6 @@ void ImageInfo::UpdateSize() {
202
208
UNREACHABLE ();
203
209
}
204
210
}
205
- mip_info.height = mip_h;
206
- if (props.is_block ) {
207
- mip_info.pitch = std::max (mip_info.pitch * 4 , 32u );
208
- mip_info.height = std::max (mip_info.height * 4 , 32u );
209
- }
210
211
mip_info.size *= mip_d;
211
212
mip_info.offset = guest_size;
212
213
mips_layout.emplace_back (mip_info);
0 commit comments