update parallel rdp

This commit is contained in:
Logan McNaughton committed 2022-12-07 18:11:41 -07:00
1 parent 1f7414444d
commit dc27483cc9
35 files changed
+4001 -1071

No files matched your search

@@ -228,8 +228,10 @@ bool Device::enqueue_create_graphics_pipeline(Fossilize::Hash hash,
if (replayer_state.pipeline_group)
{
replayer_state.pipeline_group->enqueue_task([this, info = *create_info, hash, pipeline]() mutable {
*pipeline = fossilize_create_graphics_pipeline(hash, info);
replayer_state.pipeline_group->enqueue_task([this, create_info, hash, pipeline]() {
// The lifetime of create_info is tied to the replayer itself.
auto tmp_create_info = *create_info;
*pipeline = fossilize_create_graphics_pipeline(hash, tmp_create_info);
});
return true;
}
@@ -268,8 +270,10 @@ bool Device::enqueue_create_compute_pipeline(Fossilize::Hash hash,
if (replayer_state.pipeline_group)
{
replayer_state.pipeline_group->enqueue_task([this, info = *create_info, hash, pipeline]() mutable {
*pipeline = fossilize_create_compute_pipeline(hash, info);
replayer_state.pipeline_group->enqueue_task([this, create_info, hash, pipeline]() {
// The lifetime of create_info is tied to the replayer itself.
auto tmp_create_info = *create_info;
*pipeline = fossilize_create_compute_pipeline(hash, tmp_create_info);
});
return true;
}
@@ -341,14 +345,14 @@ void Device::init_pipeline_state(const Fossilize::FeatureFilter &filter)
if (!get_system_handles().filesystem)
return;
auto file = get_system_handles().filesystem->open("assets://pipelines.json", Granite::FileMode::ReadOnly);
auto file = get_system_handles().filesystem->open_readonly_mapping("assets://pipelines.json");
if (!file)
file = get_system_handles().filesystem->open("cache://pipelines.json", Granite::FileMode::ReadOnly);
file = get_system_handles().filesystem->open_readonly_mapping("cache://pipelines.json");
if (!file)
return;
void *mapped = file->map();
const void *mapped = file->data();
if (!mapped)
{
LOGE("Failed to map pipelines.json.\n");
@@ -389,12 +393,10 @@ void Device::flush_pipeline_state()
Granite::FileMode::WriteOnlyTransactional);
if (file)
{
auto *data = static_cast<uint8_t *>(file->map_write(serialized_size));
auto mapping = file->map_write(serialized_size);
auto *data = mapping ? mapping->mutable_data() : nullptr;
if (data)
{
memcpy(data, serialized, serialized_size);
file->unmap();
}
else
LOGE("Failed to serialize pipeline data.\n");