aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/image_base.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-03-04 14:12:25 -0500
committerameerj <52414509+ameerj@users.noreply.github.com>2021-03-04 14:14:49 -0500
commit5213f702307e43520ad5f264e613acdfec597077 (patch)
tree038455c37e70b4bfeb2bc2085fe131df0cd06dac /src/video_core/texture_cache/image_base.cpp
parent0639244d856f403cc9bdec5ca927df7a61edd1d8 (diff)
texture_cache: Blacklist BGRA8 copies and views on OpenGL
In order to force the BGRA8 conversion on Nvidia using OpenGL, we need to forbid texture copies and views with other formats. This commit also adds a boolean relating to this, as this needs to be done only for the OpenGL api, Vulkan must remain unchanged.
Diffstat (limited to 'src/video_core/texture_cache/image_base.cpp')
-rw-r--r--src/video_core/texture_cache/image_base.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/image_base.cpp b/src/video_core/texture_cache/image_base.cpp
index 959b3f115..9914926b3 100644
--- a/src/video_core/texture_cache/image_base.cpp
+++ b/src/video_core/texture_cache/image_base.cpp
@@ -120,9 +120,10 @@ void AddImageAlias(ImageBase& lhs, ImageBase& rhs, ImageId lhs_id, ImageId rhs_i
if (lhs.info.type == ImageType::Linear) {
base = SubresourceBase{.level = 0, .layer = 0};
} else {
- // We are passing relaxed formats as an option, having broken views or not won't matter
+ // We are passing relaxed formats as an option, having broken views/bgr or not won't matter
static constexpr bool broken_views = false;
- base = FindSubresource(rhs.info, lhs, rhs.gpu_addr, OPTIONS, broken_views);
+ static constexpr bool native_bgr = true;
+ base = FindSubresource(rhs.info, lhs, rhs.gpu_addr, OPTIONS, broken_views, native_bgr);
}
if (!base) {
LOG_ERROR(HW_GPU, "Image alias should have been flipped");