gallium/r300/r600/radeonsi: handle query_renderer caps
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 14 Aug 2014 19:57:29 +0000 (20:57 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 15 Aug 2014 16:42:47 +0000 (17:42 +0100)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/radeonsi/si_pipe.c

index ad599e973223cb3d323141332d32bb008e9981e5..3d489e14c41d0f9e744d979d65535b2cf9932f9f 100644 (file)
@@ -209,6 +209,17 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
         case PIPE_CAP_MAX_VIEWPORTS:
             return 1;
+
+        case PIPE_CAP_VENDOR_ID:
+                return 0x1002;
+        case PIPE_CAP_DEVICE_ID:
+                return r300screen->info.pci_id;
+        case PIPE_CAP_ACCELERATED:
+                return 1;
+        case PIPE_CAP_VIDEO_MEMORY:
+                return r300screen->info.vram_size >> 20;
+        case PIPE_CAP_UMA:
+                return 0;
     }
     return 0;
 }
index bf52a192c9c9ec85065eed7c2e7c2c67a42b8b2a..4543347555e0198722a57a5665557541831aa16c 100644 (file)
@@ -380,6 +380,17 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
                return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600;
        case PIPE_CAP_ENDIANNESS:
                return PIPE_ENDIAN_LITTLE;
+
+       case PIPE_CAP_VENDOR_ID:
+               return 0x1002;
+       case PIPE_CAP_DEVICE_ID:
+               return rscreen->b.info.pci_id;
+       case PIPE_CAP_ACCELERATED:
+               return 1;
+       case PIPE_CAP_VIDEO_MEMORY:
+               return rscreen->b.info.vram_size >> 20;
+       case PIPE_CAP_UMA:
+               return 0;
        }
        return 0;
 }
index 0f10f3b7fb8dd2dde48aae5d8cce5f06344262df..3c3d642b791194ad3f9f83ddb986a62f9c6e8538 100644 (file)
@@ -310,6 +310,17 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 
        case PIPE_CAP_ENDIANNESS:
                return PIPE_ENDIAN_LITTLE;
+
+       case PIPE_CAP_VENDOR_ID:
+               return 0x1002;
+       case PIPE_CAP_DEVICE_ID:
+               return sscreen->b.info.pci_id;
+       case PIPE_CAP_ACCELERATED:
+               return 1;
+       case PIPE_CAP_VIDEO_MEMORY:
+               return sscreen->b.info.vram_size >> 20;
+       case PIPE_CAP_UMA:
+               return 0;
        }
        return 0;
 }