tearing: avoid permanent disable due to rejected commits (#2295)

Currently, the cursor plane does not allow async page flips which causes tearing page flips to be rejected if the cursor was moved.

However, in games where no cursor image is present, the async page flips can still work as expected.

Instead of permanently disabling tearing after too many failures, test the output state first before each frame to see if we can commit with tearing_page_flip set to true.
This commit is contained in:
Ricardo Steijn 2024-11-03 22:05:46 +01:00 committed by GitHub
parent c29d8a2174
commit 8f940358e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 38 deletions

View file

@ -406,8 +406,6 @@ struct output {
bool leased;
bool gamma_lut_changed;
uint32_t nr_tearing_failures;
};
#undef LAB_NR_LAYERS