summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_texture_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl/gl_texture_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h
index 1bb762568..37d5e6a6b 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.h
+++ b/src/video_core/renderer_opengl/gl_texture_cache.h
@@ -52,17 +52,17 @@ struct FormatProperties {
bool is_compressed;
};
-class BGRCopyPass {
+class FormatConversionPass {
public:
- BGRCopyPass() = default;
- ~BGRCopyPass() = default;
+ FormatConversionPass() = default;
+ ~FormatConversionPass() = default;
- void CopyBGR(Image& dst_image, Image& src_image,
- std::span<const VideoCommon::ImageCopy> copies);
+ void ConvertImage(Image& dst_image, Image& src_image,
+ std::span<const VideoCommon::ImageCopy> copies);
private:
- OGLBuffer bgr_pbo;
- size_t bgr_pbo_size{};
+ OGLBuffer intermediate_pbo;
+ size_t pbo_size{};
};
class TextureCacheRuntime {
@@ -84,8 +84,14 @@ public:
u64 GetDeviceLocalMemory() const;
+ bool ShouldReinterpret([[maybe_unused]] Image& dst, [[maybe_unused]] Image& src) {
+ return true;
+ }
+
void CopyImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies);
+ void ReinterpretImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies);
+
void ConvertImage(Framebuffer* dst, ImageView& dst_view, ImageView& src_view, bool rescaled) {
UNIMPLEMENTED();
}
@@ -144,7 +150,7 @@ private:
const Device& device;
StateTracker& state_tracker;
UtilShaders util_shaders;
- BGRCopyPass bgr_copy_pass;
+ FormatConversionPass format_conversion_pass;
std::array<std::unordered_map<GLenum, FormatProperties>, 3> format_properties;
bool has_broken_texture_view_formats = false;
@@ -162,8 +168,8 @@ private:
std::array<GLuint, Shader::NUM_TEXTURE_TYPES> null_image_views{};
- std::array<OGLFramebuffer, 3> rescale_draw_fbos;
- std::array<OGLFramebuffer, 3> rescale_read_fbos;
+ std::array<OGLFramebuffer, 4> rescale_draw_fbos;
+ std::array<OGLFramebuffer, 4> rescale_read_fbos;
const Settings::ResolutionScalingInfo& resolution;
};
@@ -219,6 +225,7 @@ private:
GLenum gl_internal_format = GL_NONE;
GLenum gl_format = GL_NONE;
GLenum gl_type = GL_NONE;
+ GLsizei gl_num_levels{};
TextureCacheRuntime* runtime{};
GLuint current_texture{};
};