r300-gallium: Update floating-point params too.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 16 May 2009 17:56:17 +0000 (10:56 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 16 May 2009 17:56:17 +0000 (10:56 -0700)
Even though we *can* render 10,000-pixel-wide lines, let's not advertise it.

src/gallium/drivers/r300/r300_screen.c

index 78ed2ad92212e6b5c0e8db92ea7cf44640cfad3e..ab095028fbc11b1d18aa19b68f9e8c1f080fc8ab 100644 (file)
@@ -151,17 +151,20 @@ static int r300_get_param(struct pipe_screen* pscreen, int param)
 
 static float r300_get_paramf(struct pipe_screen* pscreen, int param)
 {
+    struct r300_screen* r300screen = r300_screen(pscreen);
+
     switch (param) {
         case PIPE_CAP_MAX_LINE_WIDTH:
         case PIPE_CAP_MAX_LINE_WIDTH_AA:
-            /* XXX this is the biggest thing that will fit in that register.
-            * Perhaps the actual rendering limits are less? */
-            return 10922.0f;
         case PIPE_CAP_MAX_POINT_WIDTH:
         case PIPE_CAP_MAX_POINT_WIDTH_AA:
-            /* XXX this is the biggest thing that will fit in that register.
-             * Perhaps the actual rendering limits are less? */
-            return 10922.0f;
+            /* The maximum dimensions of the colorbuffer are our practical
+             * rendering limits. 2048 pixels should be enough for anybody. */
+            if (r300screen->caps->is_r500) {
+                return 4096.0f;
+            } else {
+                return 2048.0f;
+            }
         case PIPE_CAP_MAX_TEXTURE_ANISOTROPY:
             return 16.0f;
         case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: