From ebaa7e391c9631e92ff290318ffd58d808b76f87 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 3 Jul 2021 14:01:54 +0200 Subject: TextureCache: Fix 1D to 2D overlapps. --- src/video_core/texture_cache/texture_cache.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index c7cfd02b6..d8dbd3824 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1057,9 +1057,6 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA std::vector right_aliased_ids; std::vector bad_overlap_ids; ForEachImageInRegion(cpu_addr, size_bytes, [&](ImageId overlap_id, ImageBase& overlap) { - if (info.type != overlap.info.type) { - return; - } if (info.type == ImageType::Linear) { if (info.pitch == overlap.info.pitch && gpu_addr == overlap.gpu_addr) { // Alias linear images with the same pitch -- cgit v1.2.3 From 0aab55d26a66dd86f181e09c20efa44a86f45812 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 3 Jul 2021 14:40:29 +0200 Subject: TextureCacheOGL: Implement Image Copies for 1D and 1D Array. --- .../renderer_opengl/gl_texture_cache.cpp | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 23948feed..a2c1599f7 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -341,6 +341,20 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array(subresource.base_level), + .x = static_cast(offset.x), + .y = static_cast(0), + .z = static_cast(0), + }; + case GL_TEXTURE_1D_ARRAY: + return CopyOrigin{ + .level = static_cast(subresource.base_level), + .x = static_cast(offset.x), + .y = static_cast(0), + .z = static_cast(subresource.base_layer), + }; case GL_TEXTURE_2D_ARRAY: case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: return CopyOrigin{ @@ -366,6 +380,18 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array(extent.width), + .height = static_cast(1), + .depth = static_cast(1), + }; + case GL_TEXTURE_1D_ARRAY: + return CopyRegion{ + .width = static_cast(extent.width), + .height = static_cast(1), + .depth = static_cast(dst_subresource.num_layers), + }; case GL_TEXTURE_2D_ARRAY: case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: return CopyRegion{ -- cgit v1.2.3