radeon: add flag for drm OQ support
authorMaciej Cencora <m.cencora@gmail.com>
Sat, 15 Aug 2009 13:10:29 +0000 (15:10 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Sat, 15 Aug 2009 13:14:25 +0000 (15:14 +0200)
src/mesa/drivers/dri/radeon/radeon_screen.c
src/mesa/drivers/dri/radeon/radeon_screen.h

index 7b759661ca7535b95db2d053ae13609509d36b2a..c8d491621a850a7b00f255b8f21990baf8bf901b 100644 (file)
@@ -999,6 +999,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
       screen->drmSupportsPointSprites = (sPriv->drm_version.minor >= 13);
       screen->drmSupportsCubeMapsR100 = (sPriv->drm_version.minor >= 15);
       screen->drmSupportsVertexProgram = (sPriv->drm_version.minor >= 25);
+      screen->drmSupportsOcclusionQueries = (sPriv->drm_version.minor >= 30);
    }
 
    ret = radeon_set_screen_flags(screen, dri_priv->deviceID);
@@ -1094,7 +1095,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
    /* +r6/r7 */
    if(screen->chip_family >= CHIP_FAMILY_R600)
    {
-       if (ret) 
+       if (ret)
        {
             FREE( screen );
             fprintf(stderr, "Unable to get fb location need newer drm\n");
@@ -1107,18 +1108,18 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
    }
    else
    {
-        if (ret) 
+        if (ret)
         {
             if (screen->chip_family < CHIP_FAMILY_RS600 && !screen->kernel_mm)
                    screen->fbLocation      = ( INREG( RADEON_MC_FB_LOCATION ) & 0xffff) << 16;
-            else 
+            else
             {
                 FREE( screen );
                 fprintf(stderr, "Unable to get fb location need newer drm\n");
                 return NULL;
             }
-        } 
-        else 
+        }
+        else
         {
             screen->fbLocation = (temp & 0xffff) << 16;
         }
@@ -1298,6 +1299,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
    screen->drmSupportsPointSprites = 1;
    screen->drmSupportsCubeMapsR100 = 1;
    screen->drmSupportsVertexProgram = 1;
+   screen->drmSupportsOcclusionQueries = 1;
    screen->irq = 1;
 
    ret = radeonGetParam(sPriv, RADEON_PARAM_DEVICE_ID, &device_id);
index 2a2f6b1b0b8c53a1311f71c55dcf47941c308096..f0dd46b0b135ea26c1061f4c6fdb5e8b5ab22826 100644 (file)
@@ -99,6 +99,7 @@ typedef struct radeon_screen {
    GLboolean drmSupportsPointSprites;   /* need radeon kernel module >= 1.13 */
    GLboolean drmSupportsCubeMapsR100;   /* need radeon kernel module >= 1.15 */
    GLboolean drmSupportsVertexProgram;  /* need radeon kernel module >= 1.25 */
+   GLboolean drmSupportsOcclusionQueries; /* need radeon kernel module >= 1.30 */
    GLboolean depthHasSurface;
 
    /* Configuration cache with default values for all contexts */