Zero-Initialize GuestTexture Members

Members of `GuestTexture` were apparently not being initialized and this led to UB since they would be read as random values. Titles such as Super Mario Odyssey avoided setting `baseArrayLayer` which led to it being left at the default value which was completely random and this would lead to crashes. This commit fixes this by initializing said values correctly.
This commit is contained in:
PixelyIon 2021-10-27 22:48:39 +05:30
parent a0921f8261
commit afebf77544

View File

@ -255,13 +255,13 @@ namespace skyline::gpu {
using Mappings = boost::container::small_vector<span < u8>, 3>;
Mappings mappings; //!< Spans to CPU memory for the underlying data backing this texture
texture::Dimensions dimensions;
texture::Format format;
texture::TileConfig tileConfig;
texture::TextureType type;
u16 baseArrayLayer;
u16 layerCount;
u32 layerStride; //!< An optional hint regarding the size of a single layer, it will be set to 0 when not available
texture::Dimensions dimensions{};
texture::Format format{};
texture::TileConfig tileConfig{};
texture::TextureType type{};
u16 baseArrayLayer{};
u16 layerCount{};
u32 layerStride{}; //!< An optional hint regarding the size of a single layer, it will be set to 0 when not available
GuestTexture() {}