mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 07:51:51 +01:00
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:
parent
a0921f8261
commit
afebf77544
@ -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() {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user