Summary: | [llvmpipe] PIPE_CAP_VIDEO_MEMORY reports negative value on 32 bits (with 16GB ram) | ||
---|---|---|---|
Product: | Mesa | Reporter: | Axel Davy <davyaxel0> |
Component: | Other | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Axel Davy
2016-03-15 22:12:16 UTC
Actually, my test was 32 bits, and I just checked 64 bits and the issue is not there. I'm going to adjust the name of the bug to indicate this information. At a very quick glance I would suspect it's os_get_total_physical_memory() which isn't working. This has phys_pages * page_size which are both just long which would overflow. If you use a int64_t for one of them (or long long) it might work (I think the haiku code in there is broken just the same). FWIW even if the number reported wouldn't overflow, reporting 16GB on 32bit probably isn't really the right answer. If you'd try to use that much memory, it would not quite succeed - maybe llvmpipe should clamp the amount reported on 32bit (I don't know to what though as it's of course all shared with the address space of the process - maybe 2 GB or so). Returning 2GB looks like a good idea. Should be fixed with 814ca96d0d8692c5260f595be53c4b9aed0989fa |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.