vk_renderpass_cache: Flush on qcom as well

This commit is contained in:
GPUCode
2023-02-10 21:53:13 +02:00
parent 95e6428d33
commit 42a6f7a42e
2 changed files with 5 additions and 4 deletions

View File

@ -258,9 +258,10 @@ public:
return min_vertex_stride_alignment;
}
/// Returns true if the physical device is a Mali gpu
bool IsMaliGpu() const {
return driver_id == vk::DriverIdKHR::eArmProprietary;
/// Returns true if commands should be flushed at the end of each major renderpass
bool ShouldFlush() const {
return driver_id == vk::DriverIdKHR::eArmProprietary ||
driver_id == vk::DriverIdKHR::eQualcommProprietary;
}
private:

View File

@ -194,7 +194,7 @@ void RenderpassCache::ExitRenderpass() {
// The Mali guide recommends flushing at the end of each major renderpass
// Testing has shown this has a significant effect on rendering performance
if (cmd_count > 20 && instance.IsMaliGpu()) {
if (cmd_count > 20 && instance.ShouldFlush()) {
scheduler.Flush();
cmd_count = 0;
}