gl: Force alignment of DXT textures

This commit is contained in:
kd-11 2017-03-28 14:17:38 +03:00
parent 909f3e9b3e
commit ad12900397
1 changed files with 8 additions and 0 deletions

View File

@ -319,6 +319,14 @@ namespace rsx
std::vector<gsl::byte> staging_buffer)
{
int mip_level = 0;
if (is_compressed_format(format))
{
//Compressed formats have a 4-byte alignment
//TODO: Verify that samplers are not affected by the padding
width = align(width, 4);
height = align(height, 4);
}
if (dim == rsx::texture_dimension_extended::texture_dimension_1d)
{
__glcheck glTexStorage1D(GL_TEXTURE_1D, mipmap_count, ::gl::get_sized_internal_format(format), width);