mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
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:
parent
71a975c685
commit
1675a82efd
5 changed files with 106 additions and 136 deletions
|
@ -8,7 +8,7 @@ struct MipmapLevelInfo
|
|||
u16 width;
|
||||
u16 height;
|
||||
u16 depth;
|
||||
u16 rowPitch;
|
||||
u32 rowPitch;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,7 @@ size_t get_placed_texture_storage_size(const rsx::texture &texture, size_t rowPi
|
|||
* Data are not packed, they are stored per rows using rowPitchAlignement.
|
||||
* Similarly, offset for every mipmaplevel is aligned to rowPitchAlignement boundary.
|
||||
*/
|
||||
std::vector<MipmapLevelInfo> upload_placed_texture(const rsx::texture &texture, size_t rowPitchAlignement, void* textureData);
|
||||
std::vector<MipmapLevelInfo> upload_placed_texture(gsl::span<gsl::byte> mapped_buffer, const rsx::texture &texture, size_t rowPitchAlignement);
|
||||
|
||||
/**
|
||||
* Get number of bytes occupied by texture in RSX mem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue