- assert(snapshotPrefix || comparePrefix);
-
- image::Image *ref = NULL;
-
- if (comparePrefix) {
- os::String filename = os::String::format("%s%010u.png", comparePrefix, call_no);
- ref = image::readPNG(filename);
- if (!ref) {
- return;
- }
- if (retrace::verbosity >= 0) {
- std::cout << "Read " << filename << "\n";
- }
- }
+ assert(snapshotPrefix);
retraceCall(trace::Call *call) {
bool swapRenderTarget = call->flags &
trace::CALL_FLAG_SWAP_RENDERTARGET;
retraceCall(trace::Call *call) {
bool swapRenderTarget = call->flags &
trace::CALL_FLAG_SWAP_RENDERTARGET;
// For calls which cause rendertargets to be swaped, we take the
// snapshot _before_ swapping the rendertargets.
// For calls which cause rendertargets to be swaped, we take the
// snapshot _before_ swapping the rendertargets.
" --pgpu gpu profiling (gpu times per draw call)\n"
" --ppd pixels drawn profiling (pixels drawn per draw call)\n"
" --pmem memory usage profiling (vsize rss per call)\n"
" --pgpu gpu profiling (gpu times per draw call)\n"
" --ppd pixels drawn profiling (pixels drawn per draw call)\n"
" --pmem memory usage profiling (vsize rss per call)\n"
" --call-nos[=BOOL] use call numbers in snapshot filenames\n"
" --core use core profile\n"
" --db use a double buffer visual (default)\n"
" --call-nos[=BOOL] use call numbers in snapshot filenames\n"
" --core use core profile\n"
" --db use a double buffer visual (default)\n"
const static struct option
longOptions[] = {
{"benchmark", no_argument, 0, 'b'},
{"call-nos", optional_argument, 0, CALL_NOS_OPT },
const static struct option
longOptions[] = {
{"benchmark", no_argument, 0, 'b'},
{"call-nos", optional_argument, 0, CALL_NOS_OPT },
- {"calls", required_argument, 0, 'C'},
- {"compare", required_argument, 0, 'c'},
{"core", no_argument, 0, CORE_OPT},
{"db", no_argument, 0, DB_OPT},
{"driver", required_argument, 0, DRIVER_OPT},
{"core", no_argument, 0, CORE_OPT},
{"db", no_argument, 0, DB_OPT},
{"driver", required_argument, 0, DRIVER_OPT},
- case 'c':
- comparePrefix = optarg;
- if (compareFrequency.empty()) {
- compareFrequency = trace::CallSet(trace::FREQUENCY_FRAME);
- }
- break;
- case 'C':
- compareFrequency = trace::CallSet(optarg);
- if (comparePrefix == NULL) {
- comparePrefix = "";
- }
- break;
retrace::setUp();
if (retrace::profiling) {
retrace::profiler.setup(retrace::profilingCpuTimes, retrace::profilingGpuTimes, retrace::profilingPixelsDrawn, retrace::profilingMemoryUsage);
retrace::setUp();
if (retrace::profiling) {
retrace::profiler.setup(retrace::profilingCpuTimes, retrace::profilingGpuTimes, retrace::profilingPixelsDrawn, retrace::profilingMemoryUsage);