mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
fix(agc): honor top bound for single-ended buffers
This commit is contained in:
+3
-2
@@ -257,11 +257,12 @@ struct CommandBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] KYTY_SYSV_ABI uint32_t GetAvailableSizeDW() const {
|
[[nodiscard]] KYTY_SYSV_ABI uint32_t GetAvailableSizeDW() const {
|
||||||
if (cursor_up == nullptr || cursor_down == nullptr || cursor_down <= cursor_up) {
|
auto* end = cursor_down != nullptr ? cursor_down : top;
|
||||||
|
if (cursor_up == nullptr || end == nullptr || end <= cursor_up) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto available = static_cast<uint64_t>(cursor_down - cursor_up);
|
auto available = static_cast<uint64_t>(end - cursor_up);
|
||||||
if (available <= reserved_dw) {
|
if (available <= reserved_dw) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user