[Mesa-dev] [PATCH 17/19] gallium/svga: handle query_rendered caps

Emil Velikov emil.l.velikov at gmail.com
Thu Aug 14 15:18:26 PDT 2014


All the values are are currently hardcoded. One could use
some heuristics to determine the amount of video memory if
a callback to the host is not available.

Do we what to advertise the driver as hardwar accelerated ?

Cc: Brian Paul <brianp at vmware.com>
Cc: José Fonseca <jose.r.fonseca at gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/drivers/svga/svga_screen.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 2fcc75c..c90d3b9 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -287,6 +287,18 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
       return 1;
    case PIPE_CAP_ENDIANNESS:
       return PIPE_ENDIAN_LITTLE;
+
+   case PIPE_CAP_VENDOR_ID:
+      return 0x15ad; /* VMware Inc. */
+   case PIPE_CAP_DEVICE_ID:
+      return 0x0405; /* assume SVGA II */
+   case PIPE_CAP_ACCELERATED:
+      return 0; /* XXX: */
+   case PIPE_CAP_VIDEO_MEMORY:
+      /* XXX: Query the host ? */
+      return 1;
+   case PIPE_CAP_UMA:
+      return 0;
    }
 
    debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
-- 
2.0.2



More information about the mesa-dev mailing list