mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
gallium/vc4: PIPE_CAP_VIDEO_MEMORY return the amount of system ram
Suggested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
7c65b714ed
commit
1e1d285701
1 changed files with 9 additions and 3 deletions
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "os/os_misc.h"
|
||||
#include "pipe/p_defines.h"
|
||||
#include "pipe/p_screen.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
|
@ -207,9 +208,14 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
return 0xFFFFFFFF;
|
||||
case PIPE_CAP_ACCELERATED:
|
||||
return 1;
|
||||
case PIPE_CAP_VIDEO_MEMORY:
|
||||
fprintf(stderr, "FINISHME: The value returned is incorrect\n");
|
||||
return 10;
|
||||
case PIPE_CAP_VIDEO_MEMORY: {
|
||||
uint64_t system_memory;
|
||||
|
||||
if (!os_get_total_physical_memory(&system_memory))
|
||||
return 0;
|
||||
|
||||
return (int)(system_memory >> 20);
|
||||
}
|
||||
case PIPE_CAP_UMA:
|
||||
return 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue