GPU recording (--trace_gpu=file) and playback (gpu-trace-viewer file).

This commit is contained in:
Ben Vanik
2015-02-20 07:47:06 -08:00
parent c4aeedd0a3
commit 130c11a2ca
23 changed files with 667 additions and 285 deletions

View File

@@ -15,7 +15,8 @@
DEFINE_string(gpu, "any", "Graphics system. Use: [any, gl4]");
DEFINE_bool(trace_ring_buffer, false, "Trace GPU ring buffer packets.");
DEFINE_string(trace_gpu, "", "Trace GPU data to the given root path.");
DEFINE_string(dump_shaders, "",
"Path to write GPU shaders to as they are compiled.");
@@ -24,14 +25,14 @@ DEFINE_bool(vsync, true, "Enable VSYNC.");
namespace xe {
namespace gpu {
std::unique_ptr<GraphicsSystem> Create(Emulator* emulator) {
std::unique_ptr<GraphicsSystem> Create() {
if (FLAGS_gpu.compare("gl4") == 0) {
return xe::gpu::gl4::Create(emulator);
return xe::gpu::gl4::Create();
} else {
// Create best available.
std::unique_ptr<GraphicsSystem> best;
best = xe::gpu::gl4::Create(emulator);
best = xe::gpu::gl4::Create();
if (best) {
return best;
}