mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 11:26:56 +02:00
gpu: clamp resolved buffer ranges to storage buffer limits
This commit is contained in:
@@ -763,13 +763,14 @@ void RenderExecutor::FindBuffers(std::span<PreparedBindings* const> stages) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
// PPSA15246
|
||||||
const auto& graphics = m_context.GetGraphics();
|
const auto& graphics = m_context.GetGraphics();
|
||||||
const auto limit = uint64_t {graphics.GetPhysicalDeviceProperties().limits.maxStorageBufferRange} -
|
const auto limit =
|
||||||
|
uint64_t {graphics.GetPhysicalDeviceProperties().limits.maxStorageBufferRange} -
|
||||||
(graphics.StorageMinAlignment() - 1);
|
(graphics.StorageMinAlignment() - 1);
|
||||||
size = std::min({size, uint64_t {256} * 1024 * 1024, limit});
|
size = std::min({size, uint64_t {256} * 1024 * 1024, limit});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Finite GPU descriptors can span sparse PRT holes; clamp only oversized/sentinel ranges.
|
// Finite GPU descriptors can span sparse PRT holes; clamp only oversized/sentinel ranges.
|
||||||
if (size >= (uint64_t {1} << 30u) || descriptor.NumRecords() == UINT32_MAX) {
|
if (size >= (uint64_t {1} << 30u) || descriptor.NumRecords() == UINT32_MAX) {
|
||||||
size = Libs::LibKernel::Memory::ClampRangeSize(address, size);
|
size = Libs::LibKernel::Memory::ClampRangeSize(address, size);
|
||||||
|
|||||||
Reference in New Issue
Block a user