MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / play

Method play

framework/resource_replay.cpp:51–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void ResourceReplay::play(ResourceCache &resource_cache, ResourceRecord &recorder)
52{
53 std::istringstream stream{recorder.get_stream().str()};
54
55 while (true)
56 {
57 // Read command id
58 ResourceType resource_type;
59 read(stream, resource_type);
60
61 if (stream.eof())
62 {
63 break;
64 }
65
66 // Find command function for the given command id
67 auto cmd_it = stream_resources.find(resource_type);
68
69 // Check if command replayer supports the given command
70 if (cmd_it != stream_resources.end())
71 {
72 // Run command function
73 cmd_it->second(resource_cache, stream);
74 }
75 else
76 {
77 LOGE("Replay command not supported.");
78 }
79 }
80}
81
82void ResourceReplay::create_shader_module(ResourceCache &resource_cache, std::istringstream &stream)
83{

Callers 2

warmupMethod · 0.45
warmupMethod · 0.45

Calls 2

readFunction · 0.85
endMethod · 0.80

Tested by

no test coverage detected