radeon: emit scissor when using cs path
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_screen.c
index 1d4f008cbc7acc63df419836b14ab526f677e3ff..e24be0c9bb7df921c9b4b5e129f13168f5e586a0 100644 (file)
@@ -241,19 +241,36 @@ static const struct dri_debug_control debug_control[] = {
 #endif /* RADEON_COMMON && defined(RADEON_COMMON_FOR_R300) */
 
 extern const struct dri_extension card_extensions[];
+extern const struct dri_extension mm_extensions[];
 
 static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );
 
 static int
-radeonGetParam(int fd, int param, void *value)
+radeonGetParam(__DRIscreenPrivate *sPriv, int param, void *value)
 {
   int ret;
   drm_radeon_getparam_t gp;
+  struct drm_radeon_info info;
+
+  if (sPriv->drm_version.major >= 2) {
+      info.value = (uint64_t)value;
+      switch (param) {
+      case RADEON_PARAM_DEVICE_ID:
+          info.request = RADEON_INFO_DEVICE_ID;
+          break;
+      case RADEON_PARAM_NUM_GB_PIPES:
+          info.request = RADEON_INFO_NUM_GB_PIPES;
+          break;
+      default:
+          return -EINVAL;
+      }
+      ret = drmCommandWriteRead(sPriv->fd, DRM_RADEON_INFO, &info, sizeof(info));
+  } else {
+      gp.param = param;
+      gp.value = value;
 
-  gp.param = param;
-  gp.value = value;
-
-  ret = drmCommandWriteRead( fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
+      ret = drmCommandWriteRead(sPriv->fd, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
+  }
   return ret;
 }
 
@@ -266,8 +283,6 @@ radeonFillInModes( __DRIscreenPrivate *psp,
     __GLcontextModes *m;
     unsigned depth_buffer_factor;
     unsigned back_buffer_factor;
-    GLenum fb_format;
-    GLenum fb_type;
     int i;
 
     /* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
@@ -298,20 +313,27 @@ radeonFillInModes( __DRIscreenPrivate *psp,
     depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
     back_buffer_factor  = (have_back_buffer) ? 2 : 1;
 
-    if ( pixel_bits == 16 ) {
-        fb_format = GL_RGB;
-        fb_type = GL_UNSIGNED_SHORT_5_6_5;
-    }
-    else {
-        fb_format = GL_BGRA;
-        fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
-    }
+    if (pixel_bits == 16) {
+       __DRIconfig **configs_a8r8g8b8;
+       __DRIconfig **configs_r5g6b5;
+
+       configs_r5g6b5 = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
+                                         depth_bits_array, stencil_bits_array,
+                                         depth_buffer_factor, back_buffer_modes,
+                                         back_buffer_factor, msaa_samples_array,
+                                         1);
+       configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
+                                           depth_bits_array, stencil_bits_array,
+                                           1, back_buffer_modes, 1,
+                                           msaa_samples_array, 1);
+       configs = driConcatConfigs(configs_r5g6b5, configs_a8r8g8b8);
+   } else
+       configs = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
+                                  depth_bits_array, stencil_bits_array,
+                                  depth_buffer_factor,
+                                  back_buffer_modes, back_buffer_factor,
+                                  msaa_samples_array, 1);
 
-    configs = driCreateConfigs(fb_format, fb_type,
-                              depth_bits_array, stencil_bits_array,
-                              depth_buffer_factor,
-                              back_buffer_modes, back_buffer_factor,
-                              msaa_samples_array, 1);
     if (configs == NULL) {
        fprintf( stderr, "[%s:%u] Error creating FBConfig!\n",
                 __func__, __LINE__ );
@@ -339,6 +361,7 @@ static const __DRItexOffsetExtension radeonTexOffsetExtension = {
 static const __DRItexBufferExtension radeonTexBufferExtension = {
     { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
    radeonSetTexBuffer,
+   radeonSetTexBuffer2,
 };
 #endif
 
@@ -358,6 +381,7 @@ static const __DRItexOffsetExtension r200texOffsetExtension = {
 static const __DRItexBufferExtension r200TexBufferExtension = {
     { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
    r200SetTexBuffer,
+   r200SetTexBuffer2,
 };
 #endif
 
@@ -370,6 +394,7 @@ static const __DRItexOffsetExtension r300texOffsetExtension = {
 static const __DRItexBufferExtension r300TexBufferExtension = {
     { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
    r300SetTexBuffer,
+   r300SetTexBuffer2,
 };
 #endif
 
@@ -763,8 +788,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
       int ret;
 
 #ifdef RADEON_PARAM_KERNEL_MM
-     ret = radeonGetParam( sPriv->fd, RADEON_PARAM_KERNEL_MM,
-                            &screen->kernel_mm);
+     ret = radeonGetParam(sPriv, RADEON_PARAM_KERNEL_MM, &screen->kernel_mm);
 
       if (ret && ret != -EINVAL) {
          FREE( screen );
@@ -776,7 +800,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
           screen->kernel_mm = 0;
 #endif
 
-      ret = radeonGetParam( sPriv->fd, RADEON_PARAM_GART_BUFFER_OFFSET,
+      ret = radeonGetParam(sPriv, RADEON_PARAM_GART_BUFFER_OFFSET,
                            &screen->gart_buffer_offset);
 
       if (ret) {
@@ -785,7 +809,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
         return NULL;
       }
 
-      ret = radeonGetParam( sPriv->fd, RADEON_PARAM_GART_BASE,
+      ret = radeonGetParam(sPriv, RADEON_PARAM_GART_BASE,
                            &screen->gart_base);
       if (ret) {
         FREE( screen );
@@ -793,7 +817,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
         return NULL;
       }
 
-      ret = radeonGetParam( sPriv->fd, RADEON_PARAM_IRQ_NR,
+      ret = radeonGetParam(sPriv, RADEON_PARAM_IRQ_NR,
                            &screen->irq);
       if (ret) {
         FREE( screen );
@@ -894,8 +918,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
    screen->cpp = dri_priv->bpp / 8;
    screen->AGPMode = dri_priv->AGPMode;
 
-   ret = radeonGetParam( sPriv->fd, RADEON_PARAM_FB_LOCATION,
-                         &temp);
+   ret = radeonGetParam(sPriv, RADEON_PARAM_FB_LOCATION, &temp);
    if (ret) {
        if (screen->chip_family < CHIP_FAMILY_RS600 && !screen->kernel_mm)
           screen->fbLocation      = ( INREG( RADEON_MC_FB_LOCATION ) & 0xffff) << 16;
@@ -909,8 +932,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
    }
 
    if (screen->chip_family >= CHIP_FAMILY_R300) {
-       ret = radeonGetParam( sPriv->fd, RADEON_PARAM_NUM_GB_PIPES,
-                            &temp);
+       ret = radeonGetParam(sPriv, RADEON_PARAM_NUM_GB_PIPES, &temp);
        if (ret) {
           fprintf(stderr, "Unable to get num_pipes, need newer drm\n");
           switch (screen->chip_family) {
@@ -1043,6 +1065,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
    int i;
    int ret;
    uint32_t device_id;
+   uint32_t temp = 0;
 
    /* Allocate the private area */
    screen = (radeonScreenPtr) CALLOC( sizeof(*screen) );
@@ -1064,11 +1087,9 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
    screen->kernel_mm = 1;
    screen->chip_flags = 0;
 
-   ret = radeonGetParam( sPriv->fd, RADEON_PARAM_IRQ_NR,
-                        &screen->irq);
+   ret = radeonGetParam(sPriv, RADEON_PARAM_IRQ_NR, &screen->irq);
 
-   ret = radeonGetParam( sPriv->fd, RADEON_PARAM_DEVICE_ID,
-                        &device_id);
+   ret = radeonGetParam(sPriv, RADEON_PARAM_DEVICE_ID, &device_id);
    if (ret) {
      FREE( screen );
      fprintf(stderr, "drm_radeon_getparam_t (RADEON_PARAM_DEVICE_ID): %d\n", ret);
@@ -1079,6 +1100,35 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
    if (ret == -1)
      return NULL;
 
+   if (screen->chip_family >= CHIP_FAMILY_R300) {
+       ret = radeonGetParam(sPriv, RADEON_PARAM_NUM_GB_PIPES, &temp);
+       if (ret) {
+          fprintf(stderr, "Unable to get num_pipes, need newer drm\n");
+          switch (screen->chip_family) {
+          case CHIP_FAMILY_R300:
+          case CHIP_FAMILY_R350:
+              screen->num_gb_pipes = 2;
+              break;
+          case CHIP_FAMILY_R420:
+          case CHIP_FAMILY_R520:
+          case CHIP_FAMILY_R580:
+          case CHIP_FAMILY_RV560:
+          case CHIP_FAMILY_RV570:
+              screen->num_gb_pipes = 4;
+              break;
+          case CHIP_FAMILY_RV350:
+          case CHIP_FAMILY_RV515:
+          case CHIP_FAMILY_RV530:
+          case CHIP_FAMILY_RV410:
+          default:
+              screen->num_gb_pipes = 1;
+              break;
+          }
+       } else {
+          screen->num_gb_pipes = temp;
+       }
+   }
+
    if (screen->chip_family <= CHIP_FAMILY_RS200)
       screen->chip_flags |= RADEON_CLASS_R100;
    else if (screen->chip_family <= CHIP_FAMILY_RV280)
@@ -1086,6 +1136,9 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
    else
       screen->chip_flags |= RADEON_CLASS_R300;
 
+   if (getenv("R300_NO_TCL"))
+     screen->chip_flags &= ~RADEON_CHIPSET_TCL;
+
    i = 0;
    screen->extensions[i++] = &driCopySubBufferExtension.base;
    screen->extensions[i++] = &driFrameTrackingExtension.base;
@@ -1175,90 +1228,7 @@ radeonInitDriver( __DRIscreenPrivate *sPriv )
     return GL_TRUE;
 }
 
-static GLboolean
-radeon_alloc_window_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
-                           GLenum intFormat, GLuint w, GLuint h)
-{
-    rb->Width = w;
-    rb->Height = h;
-    rb->_ActualFormat = intFormat;
-
-    return GL_TRUE;
-}
-
-
-static struct radeon_renderbuffer *
-radeon_create_renderbuffer(GLenum format, __DRIdrawablePrivate *driDrawPriv)
-{
-    struct radeon_renderbuffer *ret;
-
-    ret = CALLOC_STRUCT(radeon_renderbuffer);
-    if (!ret)
-       return NULL;
 
-    _mesa_init_renderbuffer(&ret->base, 0);
-    ret->base.ClassID = RADEON_RB_CLASS;
-
-    /* XXX format junk */
-    switch (format) {
-       case GL_RGB5:
-           ret->base._ActualFormat = GL_RGB5;
-           ret->base._BaseFormat = GL_RGBA;
-           ret->base.RedBits = 5;
-           ret->base.GreenBits = 6;
-           ret->base.BlueBits = 5;
-           ret->base.DataType = GL_UNSIGNED_BYTE;
-           break;
-       case GL_RGBA8:
-           ret->base._ActualFormat = GL_RGBA8;
-           ret->base._BaseFormat = GL_RGBA;
-           ret->base.RedBits = 8;
-           ret->base.GreenBits = 8;
-           ret->base.BlueBits = 8;
-           ret->base.AlphaBits = 8;
-           ret->base.DataType = GL_UNSIGNED_BYTE;
-           break;
-       case GL_STENCIL_INDEX8_EXT:
-           ret->base._ActualFormat = GL_STENCIL_INDEX8_EXT;
-           ret->base._BaseFormat = GL_STENCIL_INDEX;
-           ret->base.StencilBits = 8;
-           ret->base.DataType = GL_UNSIGNED_BYTE;
-           break;
-       case GL_DEPTH_COMPONENT16:
-           ret->base._ActualFormat = GL_DEPTH_COMPONENT16;
-           ret->base._BaseFormat = GL_DEPTH_COMPONENT;
-           ret->base.DepthBits = 16;
-           ret->base.DataType = GL_UNSIGNED_SHORT;
-           break;
-       case GL_DEPTH_COMPONENT24:
-           ret->base._ActualFormat = GL_DEPTH24_STENCIL8_EXT;
-           ret->base._BaseFormat = GL_DEPTH_COMPONENT;
-           ret->base.DepthBits = 24;
-           ret->base.DataType = GL_UNSIGNED_INT;
-           break;
-       case GL_DEPTH24_STENCIL8_EXT:
-           ret->base._ActualFormat = GL_DEPTH24_STENCIL8_EXT;
-           ret->base._BaseFormat = GL_DEPTH_STENCIL_EXT;
-           ret->base.DepthBits = 24;
-           ret->base.StencilBits = 8;
-           ret->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
-           break;
-       default:
-           fprintf(stderr, "%s: Unknown format 0x%04x\n", __FUNCTION__, format);
-           _mesa_delete_renderbuffer(&ret->base);
-           return NULL;
-    }
-
-    ret->dPriv = driDrawPriv;
-    ret->base.InternalFormat = format;
-
-    ret->base.AllocStorage = radeon_alloc_window_storage;
-
-    radeonSetSpanFunctions(ret);
-
-    ret->bo = NULL;
-    return ret;
-}
 
 /**
  * Create the Mesa framebuffer and renderbuffers for a given window/drawable.
@@ -1279,8 +1249,7 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
     const GLboolean swAccum = mesaVis->accumRedBits > 0;
     const GLboolean swStencil = mesaVis->stencilBits > 0 &&
        mesaVis->depthBits != 24;
-    GLenum rgbFormat = (mesaVis->redBits == 5 ? GL_RGB5 : GL_RGBA8);
-    GLenum depthFormat = GL_NONE;
+    GLenum rgbFormat;
     struct radeon_framebuffer *rfb;
 
     if (isPixmap)
@@ -1292,10 +1261,12 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
 
     _mesa_initialize_framebuffer(&rfb->base, mesaVis);
 
-    if (mesaVis->depthBits == 16)
-       depthFormat = GL_DEPTH_COMPONENT16;
-    else if (mesaVis->depthBits == 24)
-       depthFormat = GL_DEPTH_COMPONENT24;
+    if (mesaVis->redBits == 5)
+        rgbFormat = GL_RGB5;
+    else if (mesaVis->alphaBits == 0)
+        rgbFormat = GL_RGB8;
+    else
+        rgbFormat = GL_RGBA8;
 
     /* front color renderbuffer */
     rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
@@ -1304,25 +1275,28 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
 
     /* back color renderbuffer */
     if (mesaVis->doubleBufferMode) {
-       rfb->color_rb[1] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
+      rfb->color_rb[1] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
        _mesa_add_renderbuffer(&rfb->base, BUFFER_BACK_LEFT, &rfb->color_rb[1]->base);
        rfb->color_rb[1]->has_surface = 1;
     }
 
-    /* depth renderbuffer */
-    if (depthFormat != GL_NONE) {
-       struct radeon_renderbuffer *depth =
-           radeon_create_renderbuffer(depthFormat, driDrawPriv);
+    if (mesaVis->depthBits == 24) {
+      if (mesaVis->stencilBits == 8) {
+       struct radeon_renderbuffer *depthStencilRb = radeon_create_renderbuffer(GL_DEPTH24_STENCIL8_EXT, driDrawPriv);
+       _mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depthStencilRb->base);
+       _mesa_add_renderbuffer(&rfb->base, BUFFER_STENCIL, &depthStencilRb->base);
+       depthStencilRb->has_surface = screen->depthHasSurface;
+      } else {
+       /* depth renderbuffer */
+       struct radeon_renderbuffer *depth = radeon_create_renderbuffer(GL_DEPTH_COMPONENT24, driDrawPriv);
+       _mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depth->base);
+       depth->has_surface = screen->depthHasSurface;
+      }
+    } else if (mesaVis->depthBits == 16) {
+      /* just 16-bit depth buffer, no hw stencil */
+       struct radeon_renderbuffer *depth = radeon_create_renderbuffer(GL_DEPTH_COMPONENT16, driDrawPriv);
        _mesa_add_renderbuffer(&rfb->base, BUFFER_DEPTH, &depth->base);
        depth->has_surface = screen->depthHasSurface;
-    }
-
-    /* stencil renderbuffer */
-    if (mesaVis->stencilBits > 0 && !swStencil) {
-       struct radeon_renderbuffer *stencil =
-           radeon_create_renderbuffer(GL_STENCIL_INDEX8_EXT, driDrawPriv);
-       _mesa_add_renderbuffer(&rfb->base, BUFFER_STENCIL, &stencil->base);
-       stencil->has_surface = screen->depthHasSurface;
     }
 
     _mesa_add_soft_renderbuffers(&rfb->base,
@@ -1337,32 +1311,42 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
     return (driDrawPriv->driverPrivate != NULL);
 }
 
-static void
+
+static void radeon_cleanup_renderbuffers(struct radeon_framebuffer *rfb)
+{
+       struct radeon_renderbuffer *rb;
+
+       rb = rfb->color_rb[0];
+       if (rb && rb->bo) {
+               radeon_bo_unref(rb->bo);
+               rb->bo = NULL;
+       }
+       rb = rfb->color_rb[1];
+       if (rb && rb->bo) {
+               radeon_bo_unref(rb->bo);
+               rb->bo = NULL;
+       }
+       rb = radeon_get_renderbuffer(&rfb->base, BUFFER_DEPTH);
+       if (rb && rb->bo) {
+               radeon_bo_unref(rb->bo);
+               rb->bo = NULL;
+       }
+}
+
+void
 radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
 {
-    struct radeon_renderbuffer *rb;
     struct radeon_framebuffer *rfb;
-    
+    if (!driDrawPriv)
+       return;
+
     rfb = (void*)driDrawPriv->driverPrivate;
-    rb = (void *)rfb->base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
-    if (rb && rb->bo) {
-        radeon_bo_unref(rb->bo);
-        rb->bo = NULL;
-    }
-    rb = (void *)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
-    if (rb && rb->bo) {
-        radeon_bo_unref(rb->bo);
-        rb->bo = NULL;
-    }
-    rb = (void *)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
-    if (rb && rb->bo) {
-        radeon_bo_unref(rb->bo);
-        rb->bo = NULL;
-    }
+    if (!rfb)
+       return;
+    radeon_cleanup_renderbuffers(rfb);
     _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
 }
 
-#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
 /**
  * Choose the appropriate CreateContext function based on the chipset.
  * Eventually, all drivers will go through this process.
@@ -1373,25 +1357,21 @@ static GLboolean radeonCreateContext(const __GLcontextModes * glVisual,
 {
        __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
        radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
-
+#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
        if (IS_R300_CLASS(screen))
                return r300CreateContext(glVisual, driContextPriv, sharedContextPriv);
-        return GL_FALSE;
-}
-
-/**
- * Choose the appropriate DestroyContext function based on the chipset.
- */
-static void radeonDestroyContext(__DRIcontextPrivate * driContextPriv)
-{
-       radeonContextPtr radeon = (radeonContextPtr) driContextPriv->driverPrivate;
-
-       if (IS_R300_CLASS(radeon->radeonScreen))
-               return r300DestroyContext(driContextPriv);
-}
+#endif
 
+#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
+       if (IS_R200_CLASS(screen))
+               return r200CreateContext(glVisual, driContextPriv, sharedContextPriv);
+#endif
 
+#if !RADEON_COMMON
+       return r100CreateContext(glVisual, driContextPriv, sharedContextPriv);
 #endif
+       return GL_FALSE;
+}
 
 
 /**
@@ -1493,6 +1473,7 @@ __DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp)
     * Hello chicken.  Hello egg.  How are you two today?
     */
    driInitExtensions( NULL, card_extensions, GL_FALSE );
+   driInitExtensions( NULL, mm_extensions, GL_FALSE );
 #if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
    driInitExtensions( NULL, blend_extensions, GL_FALSE );
    driInitSingleExtension( NULL, ARB_vp_extension );
@@ -1576,7 +1557,6 @@ getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo )
    return 0;
 }
 
-#if !RADEON_COMMON || (RADEON_COMMON && defined(RADEON_COMMON_FOR_R300))
 const struct __DriverAPIRec driDriverAPI = {
    .InitScreen      = radeonInitScreen,
    .DestroyScreen   = radeonDestroyScreen,
@@ -1596,24 +1576,4 @@ const struct __DriverAPIRec driDriverAPI = {
     /* DRI2 */
    .InitScreen2     = radeonInitScreen2,
 };
-#else
-const struct __DriverAPIRec driDriverAPI = {
-   .InitScreen      = radeonInitScreen,
-   .DestroyScreen   = radeonDestroyScreen,
-   .CreateContext   = r200CreateContext,
-   .DestroyContext  = r200DestroyContext,
-   .CreateBuffer    = radeonCreateBuffer,
-   .DestroyBuffer   = radeonDestroyBuffer,
-   .SwapBuffers     = radeonSwapBuffers,
-   .MakeCurrent     = radeonMakeCurrent,
-   .UnbindContext   = radeonUnbindContext,
-   .GetSwapInfo     = getSwapInfo,
-   .GetDrawableMSC  = driDrawableGetMSC32,
-   .WaitForMSC      = driWaitForMSC32,
-   .WaitForSBC      = NULL,
-   .SwapBuffersMSC  = NULL,
-   .CopySubBuffer   = radeonCopySubBuffer,
-   .InitScreen2     = radeonInitScreen2,
-};
-#endif