diff options
author | Emil Velikov <[email protected]> | 2014-08-14 21:05:35 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-08-15 17:42:47 +0100 |
commit | 2b5f3956be2defaa3aad81371fc7cba16c338a45 (patch) | |
tree | 2a9a073ce50e982003ac4a7cd25e3b91f08b1964 /src/gallium/drivers/nouveau/nv30 | |
parent | 0b67d5d4ce0a1b4305733461c41a99189e1d1472 (diff) |
gallium/nouveau: handle query_renderer caps
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_screen.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c index 4766955b5ee..aad242a1add 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c @@ -23,6 +23,8 @@ * */ +#include <xf86drm.h> +#include <nouveau_drm.h> #include "util/u_format.h" #include "util/u_format_s3tc.h" @@ -49,6 +51,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) { struct nv30_screen *screen = nv30_screen(pscreen); struct nouveau_object *eng3d = screen->eng3d; + struct nouveau_device *dev = nouveau_screen(pscreen)->device; switch (param) { /* non-boolean capabilities */ @@ -150,6 +153,23 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_DRAW_INDIRECT: case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE: return 0; + + case PIPE_CAP_VENDOR_ID: + return 0x10de; + case PIPE_CAP_DEVICE_ID: { + uint64_t device_id; + if (nouveau_getparam(dev, NOUVEAU_GETPARAM_PCI_DEVICE, &device_id)) { + NOUVEAU_ERR("NOUVEAU_GETPARAM_PCI_DEVICE failed.\n"); + return -1; + } + return device_id; + } + case PIPE_CAP_ACCELERATED: + return 1; + case PIPE_CAP_VIDEO_MEMORY: + return dev->vram_size >> 20; + case PIPE_CAP_UMA: + return 0; } debug_printf("unknown param %d\n", param); |