rsx/common/d3d12/gl: Use gsl::span in TextureUtils.cpp

* get_placed_texture_storage_size returns more accurate result (fix crash in Outrun)
* Factors lot of code and use integer type more carrefully
* Treat warning as error in TextureUtils.cpp
This commit is contained in:
Vincent Lejeune 2016-02-14 18:55:26 +01:00
parent 71a975c685
commit 1675a82efd
5 changed files with 106 additions and 136 deletions

View file

@ -185,7 +185,7 @@ namespace rsx
if (is_swizzled || mandates_expansion(format))
{
aligned_pitch = align(aligned_pitch, 256);
upload_placed_texture(tex, 256, texture_data);
upload_placed_texture({ reinterpret_cast<gsl::byte*>(texture_data), gsl::narrow<int>(texture_data_sz) }, tex, 256);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
}
else