This commit is contained in:
scribam 2018-04-29 08:41:51 +02:00 committed by Ivan
parent fc23243d01
commit 04ad49de4d
48 changed files with 117 additions and 118 deletions

View file

@ -494,7 +494,7 @@ u8 get_format_block_size_in_bytes(rsx::surface_color_format format)
}
}
size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 format, u16 mipmap, bool cubemap, size_t row_pitch_alignement, size_t mipmap_alignment)
size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 format, u16 mipmap, bool cubemap, size_t row_pitch_alignment, size_t mipmap_alignment)
{
size_t w = width;
size_t h = std::max<u16>(height, 1);
@ -510,7 +510,7 @@ size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 form
size_t result = 0;
for (u16 i = 0; i < mipmap; ++i)
{
size_t rowPitch = align(block_size_in_byte * width_in_blocks, row_pitch_alignement);
size_t rowPitch = align(block_size_in_byte * width_in_blocks, row_pitch_alignment);
result += align(rowPitch * height_in_blocks * d, mipmap_alignment);
height_in_blocks = std::max<size_t>(height_in_blocks / 2, 1);
width_in_blocks = std::max<size_t>(width_in_blocks / 2, 1);
@ -519,16 +519,16 @@ size_t get_placed_texture_storage_size(u16 width, u16 height, u32 depth, u8 form
return result * (cubemap ? 6 : 1);
}
size_t get_placed_texture_storage_size(const rsx::fragment_texture &texture, size_t row_pitch_alignement, size_t mipmap_alignment)
size_t get_placed_texture_storage_size(const rsx::fragment_texture &texture, size_t row_pitch_alignment, size_t mipmap_alignment)
{
return get_placed_texture_storage_size(texture.width(), texture.height(), texture.depth(), texture.format(), texture.mipmap(), texture.cubemap(),
row_pitch_alignement, mipmap_alignment);
row_pitch_alignment, mipmap_alignment);
}
size_t get_placed_texture_storage_size(const rsx::vertex_texture &texture, size_t row_pitch_alignement, size_t mipmap_alignment)
size_t get_placed_texture_storage_size(const rsx::vertex_texture &texture, size_t row_pitch_alignment, size_t mipmap_alignment)
{
return get_placed_texture_storage_size(texture.width(), texture.height(), texture.depth(), texture.format(), texture.mipmap(), texture.cubemap(),
row_pitch_alignement, mipmap_alignment);
row_pitch_alignment, mipmap_alignment);
}