diff options
author | Emil Velikov <[email protected]> | 2014-08-14 20:46:29 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-08-15 17:42:47 +0100 |
commit | cc313b3ffeb1315dfa6a088da7f5f177aff9d192 (patch) | |
tree | ff9505628b9b0248cc667a046f7b7c778dfde071 /src/gallium/winsys/intel | |
parent | 5b9cb1329557cc17e1533aed7c63e1252658d74b (diff) |
gallium/ilo: handle query_renderer caps
Implementation based on the classic driver with the following
changes:
- Use auxiliarry function os_get_total_physical_memory to get the
total amount of memory.
- Move the libdrm_intel specific get_aperture_size to the winsys.
Cc: Chia-I Wu <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/winsys/intel')
-rw-r--r-- | src/gallium/winsys/intel/drm/intel_drm_winsys.c | 10 | ||||
-rw-r--r-- | src/gallium/winsys/intel/intel_winsys.h | 3 |
2 files changed, 13 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) { diff --git a/src/gallium/winsys/intel/intel_winsys.h b/src/gallium/winsys/intel/intel_winsys.h index 197eae8cd5c..4bf9a16ee93 100644 --- a/src/gallium/winsys/intel/intel_winsys.h +++ b/src/gallium/winsys/intel/intel_winsys.h @@ -91,6 +91,9 @@ intel_winsys_destroy(struct intel_winsys *winsys); const struct intel_winsys_info * intel_winsys_get_info(const struct intel_winsys *winsys); +int +intel_winsys_get_aperture_size(const struct intel_winsys *winsys); + /** * Create a logical context for use with the render ring. */ |