mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-10 23:45:16 +01: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
7917520633
commit
aa094ca948
|
|
@ -2,6 +2,7 @@
|
|||
#include "capabilities.h"
|
||||
|
||||
#include "Utilities/StrUtil.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
|
|
@ -43,6 +44,8 @@ namespace gl
|
|||
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)\
|
||||
do {\
|
||||
if (all_extensions.contains("GL_"#extension_short_name)) {\
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ namespace gl
|
|||
bool initialized = false;
|
||||
version_info glsl_version;
|
||||
|
||||
bool RENDERDOC_debug = false;
|
||||
bool EXT_direct_state_access_supported = false;
|
||||
bool EXT_depth_bounds_test_supported = false;
|
||||
bool AMD_pinned_memory_supported = false;
|
||||
|
|
|
|||
|
|
@ -246,6 +246,14 @@ namespace gl
|
|||
pixel_settings.apply();
|
||||
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 &&
|
||||
region.width == m_width && region.height == m_height && region.depth == m_depth)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue