radv: small fix for sam check

for exact PCIe 3.0 x8 case there will be
pcie_bandwidth_mbps >= bandwidth_mbps_threshold => (8069 >= 8069,12) == false

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36109>
This commit is contained in:
Pavel Gribov 2025-07-14 13:31:38 +03:00 committed by Marge Bot
parent 763ff92ad9
commit 24cb745460

View file

@ -240,7 +240,8 @@ radv_amdgpu_cs_domain(const struct radeon_winsys *_ws)
/* Bandwidth should be equivalent to at least PCIe 3.0 x8.
* If there is no PCIe info, assume there is enough bandwidth.
*/
bool enough_bandwidth = !ws->info.has_pcie_bandwidth_info || ws->info.pcie_bandwidth_mbps >= 8 * 0.985 * 1024;
const uint32_t bandwidth_mbps_threshold = 8 * 0.985 * 1024;
bool enough_bandwidth = !ws->info.has_pcie_bandwidth_info || ws->info.pcie_bandwidth_mbps >= bandwidth_mbps_threshold;
bool use_sam =
(enough_vram && enough_bandwidth && ws->info.has_dedicated_vram && !(ws->perftest & RADV_PERFTEST_NO_SAM)) ||