mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 13:35:30 +03:00
Change Texture Pitch Unit to Bytes from Pixels
The pitch of the texture should always be supplied in terms of bytes as it denotes alignment on a byte boundary rather than a pixel one, it is also always utilized in terms of bytes rather than pixels so this avoids an unnecessary conversion. Note: GBP stride unit was assumed to be pixels earlier but is likely bytes which is why there are no changes to the supplied value there, if this is not the case it'll be fixed in the future
This commit is contained in:
parent
a9aa16798f
commit
a7b90e7825
@ -103,7 +103,7 @@ namespace skyline::gpu {
|
|||||||
*/
|
*/
|
||||||
void CopyPitchLinearToLinear(GuestTexture &guest, u8 *guestInput, u8 *linearOutput) {
|
void CopyPitchLinearToLinear(GuestTexture &guest, u8 *guestInput, u8 *linearOutput) {
|
||||||
auto sizeLine{guest.format->GetSize(guest.dimensions.width, 1)}; //!< The size of a single line of pixel data
|
auto sizeLine{guest.format->GetSize(guest.dimensions.width, 1)}; //!< The size of a single line of pixel data
|
||||||
auto sizeStride{guest.format->GetSize(guest.tileConfig.pitch, 1)}; //!< The size of a single stride of pixel data
|
auto sizeStride{guest.tileConfig.pitch}; //!< The size of a single stride of pixel data
|
||||||
|
|
||||||
auto inputLine{guestInput};
|
auto inputLine{guestInput};
|
||||||
auto outputLine{linearOutput};
|
auto outputLine{linearOutput};
|
||||||
@ -120,7 +120,7 @@ namespace skyline::gpu {
|
|||||||
*/
|
*/
|
||||||
void CopyLinearToPitchLinear(GuestTexture &guest, u8 *linearInput, u8 *guestOutput) {
|
void CopyLinearToPitchLinear(GuestTexture &guest, u8 *linearInput, u8 *guestOutput) {
|
||||||
auto sizeLine{guest.format->GetSize(guest.dimensions.width, 1)}; //!< The size of a single line of pixel data
|
auto sizeLine{guest.format->GetSize(guest.dimensions.width, 1)}; //!< The size of a single line of pixel data
|
||||||
auto sizeStride{guest.format->GetSize(guest.tileConfig.pitch, 1)}; //!< The size of a single stride of pixel data
|
auto sizeStride{guest.tileConfig.pitch}; //!< The size of a single stride of pixel data
|
||||||
|
|
||||||
auto inputLine{linearInput};
|
auto inputLine{linearInput};
|
||||||
auto outputLine{guestOutput};
|
auto outputLine{guestOutput};
|
||||||
|
@ -210,7 +210,7 @@ namespace skyline::gpu {
|
|||||||
u8 blockHeight; //!< The height of the blocks in GOBs
|
u8 blockHeight; //!< The height of the blocks in GOBs
|
||||||
u8 blockDepth; //!< The depth of the blocks in GOBs
|
u8 blockDepth; //!< The depth of the blocks in GOBs
|
||||||
};
|
};
|
||||||
u32 pitch; //!< The pitch of the texture if it's pitch linear
|
u32 pitch; //!< The pitch of the texture in bytes
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr bool operator==(const TileConfig &other) const {
|
constexpr bool operator==(const TileConfig &other) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user