diff options
author | Jason Ekstrand <[email protected]> | 2016-03-10 18:35:00 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-11 11:31:13 -0800 |
commit | 41a147904a95ba699358e8209e91d535f853ba61 (patch) | |
tree | 7ebccaa3233a0ae2c615d74e4cc85c7b5ac5d9f6 /src/intel/vulkan/anv_wsi.h | |
parent | 132f079a8cbaeab442a7ea8b0f02b9f07dfdd310 (diff) |
anv/wsi: Throttle rendering to no more than 2 frames ahead
Right now, Vulkan apps can pretty easily DOS the GPU by simply submitting a
lot of batches. This commit makes us wait until the rendering for earlier
frames is comlete before continuing. By waiting 2 frames out, we can still
keep the pipe reasonably full but without taking the entire system down.
This is similar to what the GL driver does today.
Diffstat (limited to 'src/intel/vulkan/anv_wsi.h')
-rw-r--r-- | src/intel/vulkan/anv_wsi.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_wsi.h b/src/intel/vulkan/anv_wsi.h index 6e9ff9b8447..bf17f033173 100644 --- a/src/intel/vulkan/anv_wsi.h +++ b/src/intel/vulkan/anv_wsi.h @@ -53,6 +53,10 @@ struct anv_wsi_interface { struct anv_swapchain { struct anv_device *device; + VkAllocationCallbacks alloc; + + VkFence fences[3]; + VkResult (*destroy)(struct anv_swapchain *swapchain, const VkAllocationCallbacks *pAllocator); VkResult (*get_images)(struct anv_swapchain *swapchain, |