winsys/amdgpu: fix the type of memory usage counters
authorMarek Olšák <marek.olsak@amd.com>
Mon, 17 Aug 2015 17:55:57 +0000 (19:55 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 19 Aug 2015 10:03:01 +0000 (12:03 +0200)
If the 32-bit types overflowed, the driver could submit an IB that uses much
more memory than is available.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.h

index 0842259044beebb638548e828a1224405cee47c5..12c6b624b03b1ca9f305ad5acb28683deccc8ce1 100644 (file)
@@ -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;
 };