From: Peter Lohrmann Date: Wed, 25 Mar 2015 00:19:24 +0000 (-0700) Subject: glvreplay_xgl: use the GlaveSnapshot layer to print tracked objects. X-Git-Tag: sdk-0.1.0~268^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=caf39d56fe694eef36d5c191b0ccfe2474825890;p=platform%2Fupstream%2FVulkan-LoaderAndValidationLayers.git glvreplay_xgl: use the GlaveSnapshot layer to print tracked objects. * Currently this is called as part of dump_validation_data(), which is called when the replayer is paused. --- diff --git a/glave-generate.py b/glave-generate.py index 3430342..0438b45 100755 --- a/glave-generate.py +++ b/glave-generate.py @@ -1817,6 +1817,7 @@ class Subcommand(object): rc_body.append(' struct xglFuncs m_xglFuncs;') rc_body.append(' DRAW_STATE_DUMP_DOT_FILE m_pDSDump;') rc_body.append(' DRAW_STATE_DUMP_COMMAND_BUFFER_DOT_FILE m_pCBDump;') + rc_body.append(' GLVSNAPSHOT_PRINT_OBJECTS m_pGlvSnapshotPrint;') rc_body.append(' xglDisplay *m_display;') rc_body.append(' struct shaderPair {') rc_body.append(' XGL_SHADER *addr;') @@ -2202,6 +2203,7 @@ class Subcommand(object): rs_body.append(' m_display = new xglDisplay();') rs_body.append(' m_pDSDump = NULL;') rs_body.append(' m_pCBDump = NULL;') + rs_body.append(' m_pGlvSnapshotPrint = NULL;') rs_body.append(' if (g_pReplaySettings && g_pReplaySettings->screenshotList) {') rs_body.append(' process_screenshot_list(g_pReplaySettings->screenshotList);') rs_body.append(' }') @@ -2293,12 +2295,12 @@ class Subcommand(object): rvf_body.append('}') rvf_body.append('int xglReplay::dump_validation_data()') rvf_body.append('{') - rvf_body.append(' if (!m_pDSDump || !m_pCBDump)') + rvf_body.append(' if (m_pDSDump && m_pCBDump)') rvf_body.append(' {') - rvf_body.append(' return -1;') + rvf_body.append(' m_pDSDump((char *) "pipeline_dump.dot");') + rvf_body.append(' m_pCBDump((char *) "cb_dump.dot");') rvf_body.append(' }') - rvf_body.append(' m_pDSDump((char *) "pipeline_dump.dot");') - rvf_body.append(' m_pCBDump((char *) "cb_dump.dot");') + rvf_body.append(' if (m_pGlvSnapshotPrint != NULL) { m_pGlvSnapshotPrint(); }') rvf_body.append(' return 0;') rvf_body.append('}') return "\n".join(rvf_body) @@ -2484,6 +2486,7 @@ class Subcommand(object): cd_body.append('#if !defined(_WIN32)') cd_body.append(' m_pDSDump = (DRAW_STATE_DUMP_DOT_FILE) m_xglFuncs.real_xglGetProcAddr(remap(pPacket->gpu), "drawStateDumpDotFile");') cd_body.append(' m_pCBDump = (DRAW_STATE_DUMP_COMMAND_BUFFER_DOT_FILE) m_xglFuncs.real_xglGetProcAddr(remap(pPacket->gpu), "drawStateDumpCommandBufferDotFile");') + cd_body.append(' m_pGlvSnapshotPrint = (GLVSNAPSHOT_PRINT_OBJECTS) m_xglFuncs.real_xglGetProcAddr(remap(pPacket->gpu), "glvSnapshotPrintObjects");') cd_body.append('#endif') cd_body.append(' }') cd_body.append(' else ') @@ -3280,6 +3283,7 @@ class Subcommand(object): rbody.append(' {') rbody.append(' m_pCBDump = NULL;') rbody.append(' m_pDSDump = NULL;') + rbody.append(' m_pGlvSnapshotPrint = NULL;') rbody.append(' rm_from_map(pPacket->device);') rbody.append(' m_display->m_initedXGL = false;') rbody.append(' }') @@ -3551,6 +3555,7 @@ class GlaveReplayHeader(Subcommand): header_txt.append('#include "xglWsiWinExt.h"') header_txt.append('#endif') header_txt.append('#include "draw_state.h"') + header_txt.append('#include "glave_snapshot.h"') return "\n".join(header_txt) def generate_body(self):