diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-12-09 14:00:08 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-01-01 11:38:56 -0800 |
| commit | afd02b79a511f88ae8c7d0be0c49f529967cb243 (patch) | |
| tree | 1781e71210824a223404131a80f7acb674773166 /Source/Core/VideoCommon/FramebufferManager.cpp | |
| parent | 85d2ea0dd28444effed13a622360253f2d74bcba (diff) | |
VideoCommon: Add names for textures and shaders
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/FramebufferManager.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManager.cpp b/Source/Core/VideoCommon/FramebufferManager.cpp index 43c213f8ba..b805de77a8 100644 --- a/Source/Core/VideoCommon/FramebufferManager.cpp +++ b/Source/Core/VideoCommon/FramebufferManager.cpp @@ -3,6 +3,7 @@ #include "VideoCommon/FramebufferManager.h" +#include <fmt/format.h> #include <memory> #include "Common/ChunkFile.h" @@ -170,9 +171,10 @@ bool FramebufferManager::CreateEFBFramebuffer() const TextureConfig efb_depth_texture_config = GetEFBDepthTextureConfig(); // We need a second texture to swap with for changing pixel formats - m_efb_color_texture = g_renderer->CreateTexture(efb_color_texture_config); - m_efb_depth_texture = g_renderer->CreateTexture(efb_depth_texture_config); - m_efb_convert_color_texture = g_renderer->CreateTexture(efb_color_texture_config); + m_efb_color_texture = g_renderer->CreateTexture(efb_color_texture_config, "EFB color texture"); + m_efb_depth_texture = g_renderer->CreateTexture(efb_depth_texture_config, "EFB depth texture"); + m_efb_convert_color_texture = + g_renderer->CreateTexture(efb_color_texture_config, "EFB convert color texture"); if (!m_efb_color_texture || !m_efb_depth_texture || !m_efb_convert_color_texture) return false; @@ -188,7 +190,8 @@ bool FramebufferManager::CreateEFBFramebuffer() { m_efb_resolve_color_texture = g_renderer->CreateTexture( TextureConfig(efb_color_texture_config.width, efb_color_texture_config.height, 1, - efb_color_texture_config.layers, 1, efb_color_texture_config.format, 0)); + efb_color_texture_config.layers, 1, efb_color_texture_config.format, 0), + "EFB color resolve texture"); if (!m_efb_resolve_color_texture) return false; } @@ -199,7 +202,8 @@ bool FramebufferManager::CreateEFBFramebuffer() m_efb_depth_resolve_texture = g_renderer->CreateTexture( TextureConfig(efb_depth_texture_config.width, efb_depth_texture_config.height, 1, efb_depth_texture_config.layers, 1, GetEFBDepthCopyFormat(), - AbstractTextureFlag_RenderTarget)); + AbstractTextureFlag_RenderTarget), + "EFB depth resolve texture"); if (!m_efb_depth_resolve_texture) return false; @@ -311,9 +315,11 @@ bool FramebufferManager::CompileConversionPipelines() { for (u32 i = 0; i < NUM_EFB_REINTERPRET_TYPES; i++) { + EFBReinterpretType convtype = static_cast<EFBReinterpretType>(i); std::unique_ptr<AbstractShader> pixel_shader = g_renderer->CreateShaderFromSource( - ShaderStage::Pixel, FramebufferShaderGen::GenerateFormatConversionShader( - static_cast<EFBReinterpretType>(i), GetEFBSamples())); + ShaderStage::Pixel, + FramebufferShaderGen::GenerateFormatConversionShader(convtype, GetEFBSamples()), + fmt::format("Framebuffer conversion pixel shader {}", convtype)); if (!pixel_shader) return false; @@ -472,7 +478,8 @@ bool FramebufferManager::CompileReadbackPipelines() if (IsEFBMultisampled()) { auto depth_resolve_shader = g_renderer->CreateShaderFromSource( - ShaderStage::Pixel, FramebufferShaderGen::GenerateResolveDepthPixelShader(GetEFBSamples())); + ShaderStage::Pixel, FramebufferShaderGen::GenerateResolveDepthPixelShader(GetEFBSamples()), + "Depth resolve pixel shader"); if (!depth_resolve_shader) return false; @@ -484,7 +491,8 @@ bool FramebufferManager::CompileReadbackPipelines() // EFB restore pipeline auto restore_shader = g_renderer->CreateShaderFromSource( - ShaderStage::Pixel, FramebufferShaderGen::GenerateEFBRestorePixelShader()); + ShaderStage::Pixel, FramebufferShaderGen::GenerateEFBRestorePixelShader(), + "EFB restore pixel shader"); if (!restore_shader) return false; @@ -514,7 +522,7 @@ bool FramebufferManager::CreateReadbackFramebuffer() const TextureConfig color_config(IsUsingTiledEFBCache() ? m_efb_cache_tile_size : EFB_WIDTH, IsUsingTiledEFBCache() ? m_efb_cache_tile_size : EFB_HEIGHT, 1, 1, 1, GetEFBColorFormat(), AbstractTextureFlag_RenderTarget); - m_efb_color_cache.texture = g_renderer->CreateTexture(color_config); + m_efb_color_cache.texture = g_renderer->CreateTexture(color_config, "EFB color cache"); if (!m_efb_color_cache.texture) return false; @@ -536,7 +544,7 @@ bool FramebufferManager::CreateReadbackFramebuffer() IsUsingTiledEFBCache() ? m_efb_cache_tile_size : EFB_HEIGHT, 1, 1, 1, GetEFBDepthCopyFormat(), AbstractTextureFlag_RenderTarget); - m_efb_depth_cache.texture = g_renderer->CreateTexture(depth_config); + m_efb_depth_cache.texture = g_renderer->CreateTexture(depth_config, "EFB depth cache"); if (!m_efb_depth_cache.texture) return false; @@ -684,7 +692,8 @@ void FramebufferManager::ClearEFB(const MathUtil::Rectangle<int>& rc, bool clear bool FramebufferManager::CompileClearPipelines() { auto vertex_shader = g_renderer->CreateShaderFromSource( - ShaderStage::Vertex, FramebufferShaderGen::GenerateClearVertexShader()); + ShaderStage::Vertex, FramebufferShaderGen::GenerateClearVertexShader(), + "Clear vertex shader"); if (!vertex_shader) return false; @@ -853,7 +862,8 @@ bool FramebufferManager::CompilePokePipelines() return false; auto poke_vertex_shader = g_renderer->CreateShaderFromSource( - ShaderStage::Vertex, FramebufferShaderGen::GenerateEFBPokeVertexShader()); + ShaderStage::Vertex, FramebufferShaderGen::GenerateEFBPokeVertexShader(), + "EFB poke vertex shader"); if (!poke_vertex_shader) return false; |
