From: Marek Olšák Date: Mon, 17 Aug 2015 17:55:57 +0000 (+0200) Subject: winsys/amdgpu: fix the type of memory usage counters X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5fb0180592b124857e2e0369e2cdee74bd552bb9;p=mesa.git winsys/amdgpu: fix the type of memory usage counters If the 32-bit types overflowed, the driver could submit an IB that uses much more memory than is available. Reviewed-by: Alex Deucher Reviewed-by: Edward O'Callaghan Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h index 0842259044b..12c6b624b03 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.h @@ -77,8 +77,8 @@ struct amdgpu_cs { int buffer_indices_hashlist[512]; - unsigned used_vram; - unsigned used_gart; + uint64_t used_vram; + uint64_t used_gart; unsigned max_dependencies; };