summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-08-19 19:52:07 +0800
committerChia-I Wu <[email protected]>2014-08-19 19:56:07 +0800
commit58511b62c478bd0f2546e2cfbe2a4563803fdc77 (patch)
tree6d0dd9fa11baf8cb06b2c1cea01368fc11f0f2f9 /src
parent17401896ddb6bdb670da0171ff4ba3705066f908 (diff)
ilo: fix PIPE_CAP_VIDEO_MEMORY
I changed Emil's patch in f921131a5cebc233749a86cdd44b409c0cecc4ef to report raw values in the winsys, but forgot to convert the values to megabytes in the pipe driver.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_screen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
index 72d66acf131..2a22a550654 100644
--- a/src/gallium/drivers/ilo/ilo_screen.c
+++ b/src/gallium/drivers/ilo/ilo_screen.c
@@ -448,13 +448,13 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
* assume that there's some fragmentation, and we start doing extra
* flushing, etc. That's the big cliff apps will care about.
*/
- const uint64_t gpu_mappable_megabytes = is->dev.aperture_total * 3 / 4;
+ const uint64_t gpu_memory = is->dev.aperture_total * 3 / 4;
uint64_t system_memory;
if (!os_get_total_physical_memory(&system_memory))
return 0;
- return MIN2(gpu_mappable_megabytes, (int)(system_memory >> 20));
+ return (int) (MIN2(gpu_memory, system_memory) >> 20);
}
case PIPE_CAP_UMA:
return true;