Fix formatting to make lint happy.
This commit is contained in:
parent
1ffa4747db
commit
0a971462d7
|
@ -220,8 +220,8 @@ VkResult CachedTileView::Initialize(VkCommandBuffer command_buffer) {
|
||||||
|
|
||||||
device_->DbgSetObjectName(
|
device_->DbgSetObjectName(
|
||||||
reinterpret_cast<uint64_t>(image), VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
|
reinterpret_cast<uint64_t>(image), VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
|
||||||
xe::format_string("RT: 0x%.8X 0x%.8X(%d)", key.tile_offset, key.tile_width,
|
xe::format_string("RT: 0x%.8X 0x%.8X(%d)", key.tile_offset,
|
||||||
key.tile_width));
|
key.tile_width, key.tile_width));
|
||||||
|
|
||||||
VkMemoryRequirements memory_requirements;
|
VkMemoryRequirements memory_requirements;
|
||||||
vkGetImageMemoryRequirements(*device_, image, &memory_requirements);
|
vkGetImageMemoryRequirements(*device_, image, &memory_requirements);
|
||||||
|
|
|
@ -534,8 +534,8 @@ TextureCache::Texture* TextureCache::Demand(const TextureInfo& texture_info,
|
||||||
device_->DbgSetObjectName(
|
device_->DbgSetObjectName(
|
||||||
reinterpret_cast<uint64_t>(texture->image),
|
reinterpret_cast<uint64_t>(texture->image),
|
||||||
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
|
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT,
|
||||||
xe::format_string(
|
xe::format_string("T: 0x%.8X - 0x%.8X (%s, %s)",
|
||||||
"T: 0x%.8X - 0x%.8X (%s, %s)", texture_info.guest_address,
|
texture_info.guest_address,
|
||||||
texture_info.guest_address + texture_info.input_length,
|
texture_info.guest_address + texture_info.input_length,
|
||||||
texture_info.format_info()->name,
|
texture_info.format_info()->name,
|
||||||
get_dimension_name(texture_info.dimension)));
|
get_dimension_name(texture_info.dimension)));
|
||||||
|
@ -946,8 +946,8 @@ bool TextureCache::ConvertTexture2D(uint8_t* dest,
|
||||||
src.format_info()->block_height *
|
src.format_info()->block_height *
|
||||||
src.format_info()->bits_per_pixel / 8;
|
src.format_info()->bits_per_pixel / 8;
|
||||||
uint32_t src_pitch = xe::round_up(block_width * bytes_per_block, 256);
|
uint32_t src_pitch = xe::round_up(block_width * bytes_per_block, 256);
|
||||||
uint32_t dst_pitch = (input_width / src.format_info()->block_width) *
|
uint32_t dst_pitch =
|
||||||
bytes_per_block;
|
(input_width / src.format_info()->block_width) * bytes_per_block;
|
||||||
assert_true(dst_pitch <= src_pitch);
|
assert_true(dst_pitch <= src_pitch);
|
||||||
const uint8_t* src_mem = reinterpret_cast<const uint8_t*>(host_address);
|
const uint8_t* src_mem = reinterpret_cast<const uint8_t*>(host_address);
|
||||||
src_mem += offset_y * src_pitch;
|
src_mem += offset_y * src_pitch;
|
||||||
|
@ -990,7 +990,8 @@ bool TextureCache::ConvertTextureCube(uint8_t* dest,
|
||||||
} else {
|
} else {
|
||||||
block_width = xe::next_pow2(src.size.block_width) >> mip;
|
block_width = xe::next_pow2(src.size.block_width) >> mip;
|
||||||
block_width = xe::round_up(block_width, 32);
|
block_width = xe::round_up(block_width, 32);
|
||||||
input_block_height = block_height = xe::next_pow2(src.size.block_height) >> mip;
|
block_height = xe::next_pow2(src.size.block_height) >> mip;
|
||||||
|
input_block_height = block_height;
|
||||||
block_height = xe::round_up(block_height, 32);
|
block_height = xe::round_up(block_height, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1011,16 +1012,16 @@ bool TextureCache::ConvertTextureCube(uint8_t* dest,
|
||||||
src.format_info()->block_height *
|
src.format_info()->block_height *
|
||||||
src.format_info()->bits_per_pixel / 8;
|
src.format_info()->bits_per_pixel / 8;
|
||||||
uint32_t src_pitch = xe::round_up(block_width * bytes_per_block, 256);
|
uint32_t src_pitch = xe::round_up(block_width * bytes_per_block, 256);
|
||||||
uint32_t dst_pitch = (input_width / src.format_info()->block_width) *
|
uint32_t dst_pitch =
|
||||||
bytes_per_block;
|
(input_width / src.format_info()->block_width) * bytes_per_block;
|
||||||
assert_true(dst_pitch <= src_pitch);
|
assert_true(dst_pitch <= src_pitch);
|
||||||
const uint8_t* src_mem = reinterpret_cast<const uint8_t*>(host_address);
|
const uint8_t* src_mem = reinterpret_cast<const uint8_t*>(host_address);
|
||||||
for (int face = 0; face < 6; face++) {
|
for (int face = 0; face < 6; face++) {
|
||||||
src_mem += offset_y * src_pitch;
|
src_mem += offset_y * src_pitch;
|
||||||
src_mem += offset_x * bytes_per_block;
|
src_mem += offset_x * bytes_per_block;
|
||||||
for (uint32_t y = 0; y < block_height; y++) {
|
for (uint32_t y = 0; y < block_height; y++) {
|
||||||
TextureSwap(src.endianness, dest + y * dst_pitch, src_mem + y * src_pitch,
|
TextureSwap(src.endianness, dest + y * dst_pitch,
|
||||||
dst_pitch);
|
src_mem + y * src_pitch, dst_pitch);
|
||||||
}
|
}
|
||||||
src_mem += src_pitch * block_height;
|
src_mem += src_pitch * block_height;
|
||||||
dest += dst_pitch * input_block_height;
|
dest += dst_pitch * input_block_height;
|
||||||
|
@ -1031,8 +1032,8 @@ bool TextureCache::ConvertTextureCube(uint8_t* dest,
|
||||||
src.format_info()->block_height *
|
src.format_info()->block_height *
|
||||||
src.format_info()->bits_per_pixel / 8;
|
src.format_info()->bits_per_pixel / 8;
|
||||||
uint32_t src_pitch = block_width * bytes_per_block;
|
uint32_t src_pitch = block_width * bytes_per_block;
|
||||||
uint32_t dst_pitch = (input_width / src.format_info()->block_width) *
|
uint32_t dst_pitch =
|
||||||
bytes_per_block;
|
(input_width / src.format_info()->block_width) * bytes_per_block;
|
||||||
assert_true(dst_pitch <= src_pitch);
|
assert_true(dst_pitch <= src_pitch);
|
||||||
const uint8_t* src_mem = reinterpret_cast<const uint8_t*>(host_address);
|
const uint8_t* src_mem = reinterpret_cast<const uint8_t*>(host_address);
|
||||||
for (int face = 0; face < 6; face++) {
|
for (int face = 0; face < 6; face++) {
|
||||||
|
@ -1075,12 +1076,12 @@ bool TextureCache::UploadTexture(VkCommandBuffer command_buffer,
|
||||||
SCOPE_profile_cpu_f("gpu");
|
SCOPE_profile_cpu_f("gpu");
|
||||||
#endif // FINE_GRAINED_DRAW_SCOPES
|
#endif // FINE_GRAINED_DRAW_SCOPES
|
||||||
|
|
||||||
XELOGGPU("Uploading texture @ 0x%.8X (%dx%d, length: 0x%.8X, format: %s, dim: %s, levels: %d, tiled: %s)",
|
XELOGGPU(
|
||||||
|
"Uploading texture @ 0x%.8X (%dx%d, length: 0x%.8X, format: %s, dim: %s, "
|
||||||
|
"levels: %d, tiled: %s)",
|
||||||
src.guest_address, src.width + 1, src.height + 1, src.input_length,
|
src.guest_address, src.width + 1, src.height + 1, src.input_length,
|
||||||
src.format_info()->name,
|
src.format_info()->name, get_dimension_name(src.dimension),
|
||||||
get_dimension_name(src.dimension),
|
src.mip_levels, src.is_tiled ? "yes" : "no");
|
||||||
src.mip_levels,
|
|
||||||
src.is_tiled ? "yes" : "no");
|
|
||||||
size_t unpack_length;
|
size_t unpack_length;
|
||||||
if (!ComputeTextureStorage(&unpack_length, src)) {
|
if (!ComputeTextureStorage(&unpack_length, src)) {
|
||||||
XELOGW("Failed to compute texture storage");
|
XELOGW("Failed to compute texture storage");
|
||||||
|
|
Loading…
Reference in New Issue