From 0ea692e9ab1f9bdf793eb539773ee372e514fadb Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 7 Mar 2026 03:06:45 +0300 Subject: [PATCH] gl: Use named_object as the base class for images --- rpcs3/Emu/RSX/GL/glutils/image.cpp | 2 ++ rpcs3/Emu/RSX/GL/glutils/image.h | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/glutils/image.cpp b/rpcs3/Emu/RSX/GL/glutils/image.cpp index b70a61f367..4760bb1cc9 100644 --- a/rpcs3/Emu/RSX/GL/glutils/image.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/image.cpp @@ -410,6 +410,8 @@ namespace gl auto view = std::make_unique(this, swizzle, aspect_flags); auto result = view.get(); views.emplace(key, std::move(view)); + + result->set_name(fmt::format("%s_%x", name(), remap.encoded)); return result; } diff --git a/rpcs3/Emu/RSX/GL/glutils/image.h b/rpcs3/Emu/RSX/GL/glutils/image.h index 6af4d28fa1..bd974c226a 100644 --- a/rpcs3/Emu/RSX/GL/glutils/image.h +++ b/rpcs3/Emu/RSX/GL/glutils/image.h @@ -59,7 +59,7 @@ namespace gl GLuint num_layers; }; - class texture + class texture : public named_object { friend class texture_view; @@ -181,7 +181,6 @@ namespace gl }; protected: - GLuint m_id = GL_NONE; GLuint m_width = 0; GLuint m_height = 0; GLuint m_depth = 0; @@ -346,10 +345,9 @@ namespace gl } }; - class texture_view + class texture_view : public named_object { protected: - GLuint m_id = GL_NONE; GLenum m_target = 0; GLenum m_format = 0; GLenum m_view_format = 0; @@ -465,6 +463,7 @@ namespace gl class viewable_image : public texture { + protected: std::unordered_map> views; public: