aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/intel/drm/intel_drm_winsys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/intel/drm/intel_drm_winsys.c')
-rw-r--r--src/gallium/winsys/intel/drm/intel_drm_winsys.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index b7a2c4ee79b..b394e5fe756 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -223,6 +223,16 @@ intel_winsys_get_info(const struct intel_winsys *winsys)
return &winsys->info;
}
+int
+intel_winsys_get_aperture_size(const struct intel_winsys *winsys)
+{
+ size_t aper_size, mappable_size;
+
+ drm_intel_get_aperture_sizes(winsys->fd, &mappable_size, &aper_size);
+
+ return aper_size >> 20;
+}
+
struct intel_context *
intel_winsys_create_context(struct intel_winsys *winsys)
{