mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-30 19:10:01 +00:00
render/d3d11: adjust allowed frame 'latency' (frames-in-queue) based on number of active windows, to not unnecessarily block if we have two windows to build frames for; demon/linux: sketch out register writing path, ensure reg read/write paths have slots for other architectures
This commit is contained in:
@@ -548,6 +548,8 @@ r_window_equip(OS_Handle handle)
|
||||
r_d3d11_state->device->lpVtbl->CreateRenderTargetView(r_d3d11_state->device, (ID3D11Resource *)window->framebuffer, &framebuffer_rtv_desc, &window->framebuffer_rtv);
|
||||
|
||||
result = r_d3d11_handle_from_window(window);
|
||||
r_d3d11_state->window_count += 1;
|
||||
r_d3d11_state->dxgi_device->lpVtbl->SetMaximumFrameLatency(r_d3d11_state->dxgi_device, Clamp(1, r_d3d11_state->window_count, 16));
|
||||
}
|
||||
ProfEnd();
|
||||
return result;
|
||||
@@ -571,6 +573,8 @@ r_window_unequip(OS_Handle handle, R_Handle equip_handle)
|
||||
window->swapchain->lpVtbl->Release(window->swapchain);
|
||||
window->generation += 1;
|
||||
SLLStackPush(r_d3d11_state->first_free_window, window);
|
||||
r_d3d11_state->window_count -= 1;
|
||||
r_d3d11_state->dxgi_device->lpVtbl->SetMaximumFrameLatency(r_d3d11_state->dxgi_device, Clamp(1, r_d3d11_state->window_count, 16));
|
||||
}
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@ struct R_D3D11_State
|
||||
{
|
||||
// rjf: state
|
||||
Arena *arena;
|
||||
U64 window_count;
|
||||
R_D3D11_Window *first_free_window;
|
||||
R_D3D11_Tex2D *first_free_tex2d;
|
||||
R_D3D11_Buffer *first_free_buffer;
|
||||
|
||||
Reference in New Issue
Block a user