mirror of https://github.com/PCSX2/pcsx2.git
gsdx-debug: add some PERF info in trace
The idea is to detect easily effect that are known to be slow on opengl
This commit is contained in:
parent
818412ba26
commit
6ced837360
|
@ -553,6 +553,7 @@ EXPORT_C GSwriteCSR(uint32 csr)
|
|||
|
||||
EXPORT_C GSinitReadFIFO(uint8* mem)
|
||||
{
|
||||
GL_PERF("Init Read FIFO1");
|
||||
try
|
||||
{
|
||||
s_gs->InitReadFIFO(mem, 1);
|
||||
|
@ -564,6 +565,7 @@ EXPORT_C GSinitReadFIFO(uint8* mem)
|
|||
|
||||
EXPORT_C GSreadFIFO(uint8* mem)
|
||||
{
|
||||
GL_PERF("Read FIFO1");
|
||||
try
|
||||
{
|
||||
s_gs->ReadFIFO(mem, 1);
|
||||
|
@ -575,6 +577,7 @@ EXPORT_C GSreadFIFO(uint8* mem)
|
|||
|
||||
EXPORT_C GSinitReadFIFO2(uint8* mem, uint32 size)
|
||||
{
|
||||
GL_PERF("Init Read FIFO2");
|
||||
try
|
||||
{
|
||||
s_gs->InitReadFIFO(mem, size);
|
||||
|
@ -586,6 +589,7 @@ EXPORT_C GSinitReadFIFO2(uint8* mem, uint32 size)
|
|||
|
||||
EXPORT_C GSreadFIFO2(uint8* mem, uint32 size)
|
||||
{
|
||||
GL_PERF("Read FIFO2");
|
||||
try
|
||||
{
|
||||
s_gs->ReadFIFO(mem, size);
|
||||
|
|
|
@ -197,11 +197,11 @@ void GSRendererOGL::SendDraw(bool require_barrier)
|
|||
ASSERT(m_vt.m_primclass != GS_LINE_CLASS);
|
||||
ASSERT(GLLoader::found_geometry_shader);
|
||||
|
||||
GL_INS("Special Draw");
|
||||
|
||||
// FIXME: Investigate: do a dynamic check to pack as many primitives as possibles
|
||||
size_t nb_vertex = (m_vt.m_primclass == GS_TRIANGLE_CLASS) ? 3 : 2;
|
||||
|
||||
GL_PERF("Split single draw in %d draw", m_index.tail/nb_vertex);
|
||||
|
||||
for (size_t p = 0; p < m_index.tail; p += nb_vertex) {
|
||||
gl_TextureBarrier();
|
||||
dev->DrawIndexedPrimitive(p, nb_vertex);
|
||||
|
|
|
@ -57,6 +57,8 @@ void GSTextureCacheOGL::Read(Target* t, const GSVector4i& r)
|
|||
GL_CACHE("TC: Read Back Target: %d (0x%x formatted as 0x%x)",
|
||||
t->m_texture->GetID(), TEX0.TBP0, TEX0.PSM);
|
||||
|
||||
GL_PERF("Read texture from GPU");
|
||||
|
||||
GL_PUSH("Texture Cache Read");
|
||||
|
||||
// printf("GSRenderTarget::Read %d,%d - %d,%d (%08x)\n", r.left, r.top, r.right, r.bottom, TEX0.TBP0);
|
||||
|
|
|
@ -504,11 +504,12 @@ extern void vmfree(void* ptr, size_t size);
|
|||
#define GL_PUSH(...) gl_PushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0xBAD, -1, format(__VA_ARGS__).c_str());
|
||||
#define GL_POP() gl_PopDebugGroup();
|
||||
#define GL_INS(...) gl_DebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0xDEAD, GL_DEBUG_SEVERITY_MEDIUM, -1, format(__VA_ARGS__).c_str());
|
||||
|
||||
#define GL_PERF(...) gl_DebugMessageInsert(GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PERFORMANCE, 0xFEE1, GL_DEBUG_SEVERITY_MEDIUM, -1, format(__VA_ARGS__).c_str());
|
||||
#else
|
||||
#define GL_PUSH(...) (0);
|
||||
#define GL_POP() (0);
|
||||
#define GL_INS(...) (0);
|
||||
#define GL_PERF(...) (0);
|
||||
#endif
|
||||
|
||||
// Helper path to dump texture
|
||||
|
|
Loading…
Reference in New Issue