mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 14:55:28 +03: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>;
|
using Mappings = boost::container::small_vector<span < u8>, 3>;
|
||||||
|
|
||||||
Mappings mappings; //!< Spans to CPU memory for the underlying data backing this texture
|
Mappings mappings; //!< Spans to CPU memory for the underlying data backing this texture
|
||||||
texture::Dimensions dimensions;
|
texture::Dimensions dimensions{};
|
||||||
texture::Format format;
|
texture::Format format{};
|
||||||
texture::TileConfig tileConfig;
|
texture::TileConfig tileConfig{};
|
||||||
texture::TextureType type;
|
texture::TextureType type{};
|
||||||
u16 baseArrayLayer;
|
u16 baseArrayLayer{};
|
||||||
u16 layerCount;
|
u16 layerCount{};
|
||||||
u32 layerStride; //!< An optional hint regarding the size of a single layer, it will be set to 0 when not available
|
u32 layerStride{}; //!< An optional hint regarding the size of a single layer, it will be set to 0 when not available
|
||||||
|
|
||||||
GuestTexture() {}
|
GuestTexture() {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user