aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-08-14 21:15:06 +0100
committerEmil Velikov <[email protected]>2014-08-15 17:42:47 +0100
commit89f80c2185de42191a1658dbdcbce9cbd9a98058 (patch)
treebb95e159651b0592d4525e85be61f4d4aeb0f96e /src/gallium/drivers/softpipe
parent3a6b68b1132675dbb0c63cc6d977e19e4f473bd1 (diff)
gallium/softpipe/llvmpipe: handle query_renderer caps
Both report 0xffffffff as both vendor and device id, and the maximum amount of system memory as video memory. v2: Use aux helper os_get_total_physical_memory(). Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 5e2640dcbb1..ade68a83cda 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -30,6 +30,7 @@
#include "util/u_format.h"
#include "util/u_format_s3tc.h"
#include "util/u_video.h"
+#include "os/os_misc.h"
#include "os/os_time.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
@@ -203,6 +204,24 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_DRAW_INDIRECT:
return 1;
+
+ case PIPE_CAP_VENDOR_ID:
+ return 0xFFFFFFFF;
+ case PIPE_CAP_DEVICE_ID:
+ return 0xFFFFFFFF;
+ case PIPE_CAP_ACCELERATED:
+ return 0;
+ case PIPE_CAP_VIDEO_MEMORY: {
+ /* XXX: Do we want to return the full amount fo system 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 0;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);