[Mesa-dev] [PATCH] svga: return better values for PIPE_CAP_ACCELERATED/VIDEO_MEMORY queries
Brian Paul
brianp at vmware.com
Mon Aug 22 16:36:42 UTC 2016
A subsequent change may set Mesa's MaxTextureMbytes value based on the
PIPE_CAP_VIDEO_MEMORY. Though, we should be using st_TestProxyTexImage()
and pipe_screen::can_create_resource() so that value shouldn't matter to
us.
But let's be safe and return more reasonable values for these queries.
---
src/gallium/drivers/svga/svga_screen.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 7c4e305..5107d9b 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -384,10 +384,9 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_DEVICE_ID:
return 0x0405; /* assume SVGA II */
case PIPE_CAP_ACCELERATED:
- return 0; /* XXX: */
+ return 1; /* Assuming a host GPU is present */
case PIPE_CAP_VIDEO_MEMORY:
- /* XXX: Query the host ? */
- return 1;
+ return 512; /* 512 MB for now (XXX revisit this) */
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
return sws->have_vgpu10;
case PIPE_CAP_UMA:
--
1.9.1
More information about the mesa-dev
mailing list