mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
fix(agc): a queued draw's writes include its color targets' CMASK
Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
bacd50a568
commit
5d5aeab1fb
1 file changed
+2
@@ -98,12 +98,14 @@ std::vector<std::pair<std::uint64_t, std::uint64_t>> DrawWriteRanges(const Graph
|
||||
const auto bytes = static_cast<std::uint64_t>(color.bytes) * slices;
|
||||
add(color.address, bytes);
|
||||
add(color.dccAddress, (bytes + 255) / 256);
|
||||
add(color.cmaskAddress, static_cast<std::uint64_t>(color.cmaskBytes) * slices);
|
||||
return;
|
||||
}
|
||||
const std::uint64_t bytes = color.bytes != 0 ? static_cast<std::uint64_t>(color.bytes) : UnknownBytes;
|
||||
const auto base = color.surfaceAddress != 0 ? std::min(color.surfaceAddress, color.address) : color.address;
|
||||
if (base != 0) ranges.emplace_back(base, color.address + 2 * bytes + Slack);
|
||||
add(color.dccAddress, bytes / 16 + Slack);
|
||||
add(color.cmaskAddress, static_cast<std::uint64_t>(color.cmaskBytes) * std::max<std::uint32_t>(color.depth, 1));
|
||||
};
|
||||
if (graphics.hasColorTarget) addColor(graphics.color);
|
||||
for (const auto& color : graphics.colors) addColor(color);
|
||||
|
||||
Reference in new issue
Block a user