diff --git a/app/src/main/cpp/skyline/gpu/texture/format.h b/app/src/main/cpp/skyline/gpu/texture/format.h index c316865d..13639fbf 100644 --- a/app/src/main/cpp/skyline/gpu/texture/format.h +++ b/app/src/main/cpp/skyline/gpu/texture/format.h @@ -74,10 +74,10 @@ namespace skyline::gpu::format { FORMAT(B10G11R11Float, 32, eB10G11R11UfloatPack32); FORMAT_NORM_INT_SRGB(R8G8B8A8, 32, eR8G8B8A8); FORMAT_NORM_INT_SRGB(G8B8A8R8, 32, eB8G8R8A8, .swizzle = { - .blue = swc::Green, - .green = swc::Blue, - .red = swc::Alpha, - .alpha = swc::Red + .blue = swc::Alpha, + .green = swc::Red, + .red = swc::Green, + .alpha = swc::Blue }); FORMAT_NORM_INT_SRGB(B8G8R8A8, 32, eB8G8R8A8); FORMAT_SUFF_NORM_INT(A2B10G10R10, 32, eA2B10G10R10, Pack32); diff --git a/app/src/main/cpp/skyline/gpu/texture/texture.h b/app/src/main/cpp/skyline/gpu/texture/texture.h index be477757..1e568737 100644 --- a/app/src/main/cpp/skyline/gpu/texture/texture.h +++ b/app/src/main/cpp/skyline/gpu/texture/texture.h @@ -73,7 +73,7 @@ namespace skyline::gpu { SwizzleChannel blue{SwizzleChannel::Blue}; //!< Swizzle for the blue channel SwizzleChannel alpha{SwizzleChannel::Alpha}; //!< Swizzle for the alpha channel - constexpr operator vk::ComponentMapping() { + constexpr operator vk::ComponentMapping() const { auto swizzleConvert{[](SwizzleChannel channel) { switch (channel) { case SwizzleChannel::Zero: diff --git a/app/src/main/cpp/skyline/gpu/texture_manager.cpp b/app/src/main/cpp/skyline/gpu/texture_manager.cpp index 47653035..dca31bc2 100644 --- a/app/src/main/cpp/skyline/gpu/texture_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/texture_manager.cpp @@ -51,7 +51,7 @@ namespace skyline::gpu { .aspectMask = guestTexture.format->vkAspect, .levelCount = texture->mipLevels, .layerCount = texture->layerCount, - }, guestTexture.format); + }, guestTexture.format, guestTexture.format->swizzle); } } /* else if (mappingMatch) { // We've gotten a partial match with a certain subset of contiguous mappings matching, we need to check if this is a meaningful overlap @@ -82,6 +82,6 @@ namespace skyline::gpu { .aspectMask = guestTexture.format->vkAspect, .levelCount = texture->mipLevels, .layerCount = texture->layerCount, - }, guestTexture.format); + }, guestTexture.format, guestTexture.format->swizzle); } }