mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-20 22:05:06 +00:00
gl: Trace memory readback operations to debug tracking when renderdoc compat is enabled
- Renderdoc does not show these calls so we need to insert the debug message
This commit is contained in:
parent
f6b7ecea74
commit
512eeb7dd2
3 changed files with 12 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#include "capabilities.h"
|
#include "capabilities.h"
|
||||||
|
|
||||||
#include "Utilities/StrUtil.h"
|
#include "Utilities/StrUtil.h"
|
||||||
|
#include "Emu/system_config.h"
|
||||||
|
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
|
|
@ -43,6 +44,8 @@ namespace gl
|
||||||
all_extensions.emplace(reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)));
|
all_extensions.emplace(reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RENDERDOC_debug = !!g_cfg.video.renderdoc_compatiblity;
|
||||||
|
|
||||||
#define CHECK_EXTENSION_SUPPORT(extension_short_name)\
|
#define CHECK_EXTENSION_SUPPORT(extension_short_name)\
|
||||||
do {\
|
do {\
|
||||||
if (all_extensions.contains("GL_"#extension_short_name)) {\
|
if (all_extensions.contains("GL_"#extension_short_name)) {\
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ namespace gl
|
||||||
bool initialized = false;
|
bool initialized = false;
|
||||||
version_info glsl_version;
|
version_info glsl_version;
|
||||||
|
|
||||||
|
bool RENDERDOC_debug = false;
|
||||||
bool EXT_direct_state_access_supported = false;
|
bool EXT_direct_state_access_supported = false;
|
||||||
bool EXT_depth_bounds_test_supported = false;
|
bool EXT_depth_bounds_test_supported = false;
|
||||||
bool AMD_pinned_memory_supported = false;
|
bool AMD_pinned_memory_supported = false;
|
||||||
|
|
|
||||||
|
|
@ -246,6 +246,14 @@ namespace gl
|
||||||
pixel_settings.apply();
|
pixel_settings.apply();
|
||||||
const auto& caps = get_driver_caps();
|
const auto& caps = get_driver_caps();
|
||||||
|
|
||||||
|
if (caps.RENDERDOC_debug)
|
||||||
|
{
|
||||||
|
const auto msg = fmt::format("glGetTextureSubImage('[%u] %s', %u, %u, %u, %u, %u, %u, %u, %u, %u, %d, %p)",
|
||||||
|
m_id, m_name.c_str(), level, region.x, region.y, region.z, region.width, region.height, region.depth,
|
||||||
|
static_cast<GLenum>(format), static_cast<GLenum>(type), s32{ smax }, dst.data());
|
||||||
|
push_debug_label(msg);
|
||||||
|
}
|
||||||
|
|
||||||
if (!region.x && !region.y && !region.z &&
|
if (!region.x && !region.y && !region.z &&
|
||||||
region.width == m_width && region.height == m_height && region.depth == m_depth)
|
region.width == m_width && region.height == m_height && region.depth == m_depth)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue