aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-09-12 12:19:47 +0200
committerNicolai Hähnle <[email protected]>2016-09-27 16:45:37 +0200
commitfb827c055cb1bdd2b18d0687c06c56b537d805f3 (patch)
treec863814a1cb94876760fb51e6bdf3e5c2f0e4bcd /src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
parenta1e391e39df2b1d8169e773a30153167ab8e13e8 (diff)
winsys/radeon: enable buffer allocation from slabs
Only enable for chips with GPUVM, because older driver paths do not take the required offset into account. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_drm_winsys.h')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
index b30055cf976..934cd584f86 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h
@@ -32,6 +32,7 @@
#include "gallium/drivers/radeon/radeon_winsys.h"
#include "pipebuffer/pb_cache.h"
+#include "pipebuffer/pb_slab.h"
#include "util/u_queue.h"
#include "util/list.h"
#include <radeon_drm.h>
@@ -62,10 +63,14 @@ enum radeon_generation {
DRV_SI
};
+#define RADEON_SLAB_MIN_SIZE_LOG2 9
+#define RADEON_SLAB_MAX_SIZE_LOG2 14
+
struct radeon_drm_winsys {
struct radeon_winsys base;
struct pipe_reference reference;
struct pb_cache bo_cache;
+ struct pb_slabs bo_slabs;
int fd; /* DRM file descriptor */
int num_cs; /* The number of command streams created. */