[D3D12] Fix texture size calculation and add texture creation logging

This commit is contained in:
Triang3l
2018-08-05 18:45:57 +03:00
parent b50d6d844f
commit 265d6eb9df
3 changed files with 45 additions and 15 deletions

View File

@@ -58,9 +58,9 @@ uint32_t GetGuestMipStorageSize(uint32_t width_blocks, uint32_t height_blocks,
uint32_t depth_blocks, bool is_tiled,
TextureFormat format, uint32_t* row_pitch_out) {
const FormatInfo* format_info = FormatInfo::Get(format);
uint32_t row_pitch = width_blocks * format_info->block_width *
format_info->block_height * 8 /
format_info->bits_per_pixel;
uint32_t row_pitch =
width_blocks * format_info->block_width * format_info->block_height *
format_info->bits_per_pixel / 8;
if (!is_tiled) {
row_pitch = xe::align(row_pitch, 256u);
}