r300: Set floating-point params.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 20 Jan 2009 23:38:43 +0000 (15:38 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Mon, 2 Feb 2009 07:30:24 +0000 (23:30 -0800)
Note: I took those numbers from classic Mesa. I know that points are routinely
used to clear buffers, but line width is probably wrong.

src/gallium/drivers/r300/r300_screen.c

index 3cb61b4c4ea0c97c15ef4ab57e3af13187e77121..a241d606c0c56048f62dd26466e2763701c13385 100644 (file)
@@ -95,18 +95,21 @@ static float r300_get_paramf(struct pipe_screen* pscreen, int param)
     switch (param) {
         case PIPE_CAP_MAX_LINE_WIDTH:
         case PIPE_CAP_MAX_LINE_WIDTH_AA:
-            /* XXX look this up, lazy ass! */
-            return 0.0;
+            /* 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 see above */
-            return 255.0;
+            /* 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_TEXTURE_ANISOTROPY:
-            return 16.0;
+            return 16.0f;
         case PIPE_CAP_MAX_TEXTURE_LOD_BIAS:
-            return 16.0;
+            return 16.0f;
         default:
-            return 0.0;
+            /* XXX implementation error? */
+            return 0.0f;
     }
 }