Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/d3d12/d3d12_command_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2704,6 +2704,7 @@ class MTLD3D12CommandQueueImpl : public MTLD3D12Pageable<MTLD3D12CommandQueue, I
device_->first_present.compare_exchange_strong(unset, std::chrono::steady_clock::now());
}
auto state = presenter->synchronizeLayerProperties();
state.layer_props.display_sync_enabled = after > 0;
if (Holding() &&
Hold([this, swapchain = Com(swapchain), presenter, backbuffer = Com(backbuffer), view, hLantecyWaitable, after,
id, number, state, previous = Com(previous), copies, scaler = Rc(scaler),
Expand Down
1 change: 1 addition & 0 deletions src/mullion/mullion_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,7 @@ ArgumentEncodingContext::flushCommands(WMT::CommandBuffer cmdbuf, uint64_t seqId
}
case EncoderType::Present: {
auto data = static_cast<PresentData *>(current);
data->state.layer_props.display_sync_enabled = data->after > 0;
auto t0 = clock::now();
auto drawable = data->presenter->encodeCommands(
cmdbuf, data->backbuffer, data->state,
Expand Down
2 changes: 1 addition & 1 deletion src/mullion/mullion_presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Presenter::Presenter(WMT::Device device, WMT::MetalLayer layer, InternalCommandL
layer_props_.device = device;
layer_props_.opaque = true;
layer_props_.display_sync_enabled = false;
layer_props_.framebuffer_only = false; // how strangely setting it true results in worse performance
layer_props_.framebuffer_only = true;
layer_props_.contents_scale = layer_props_.contents_scale * scale_factor;
}

Expand Down
Loading