early-access version 1426

This commit is contained in:
pineappleEA 2021-02-08 07:30:40 +01:00
parent 7855a9fa01
commit b6a01ae65d
2 changed files with 3 additions and 4 deletions

View file

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 1425. This is the source code for early-access 1426.
## Legal Notice ## Legal Notice

View file

@ -396,10 +396,9 @@ void AttachTexture(GLuint fbo, GLenum attachment, const ImageView* image_view) {
} }
} }
[[nodiscard]] bool IsPixelFormatBGRA(PixelFormat format) { [[nodiscard]] bool IsPixelFormatBGR(PixelFormat format) {
switch (format) { switch (format) {
case PixelFormat::B5G6R5_UNORM: case PixelFormat::B5G6R5_UNORM:
case PixelFormat::B10G11R11_FLOAT:
case PixelFormat::B8G8R8A8_UNORM: case PixelFormat::B8G8R8A8_UNORM:
case PixelFormat::B8G8R8A8_SRGB: case PixelFormat::B8G8R8A8_SRGB:
return true; return true;
@ -957,7 +956,7 @@ void ImageView::SetupView(const Device& device, Image& image, ImageViewType view
view_range.extent.levels, view_range.base.layer, view_range.extent.layers); view_range.extent.levels, view_range.base.layer, view_range.extent.layers);
if (!info.IsRenderTarget()) { if (!info.IsRenderTarget()) {
auto swizzle = info.Swizzle(); auto swizzle = info.Swizzle();
if (IsPixelFormatBGRA(image.info.format)) { if (IsPixelFormatBGR(image.info.format)) {
// Swap the R and B channels of the swizzle. // Swap the R and B channels of the swizzle.
std::swap(swizzle[0], swizzle[2]); std::swap(swizzle[0], swizzle[2]);
} }