svga: Don't advertise pixel shader addr register support.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 1 Dec 2010 15:41:12 +0000 (15:41 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 9 Feb 2011 18:31:21 +0000 (18:31 +0000)
It's not fully supported.

src/gallium/drivers/svga/svga_screen.c

index d0f42c614c9e677728b8660b8010a4f8302dbd50..9b699eadcc196efb0edf84c5a986ce55f218951e 100644 (file)
@@ -225,13 +225,18 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en
             return svgascreen->use_ps30 ? 32 : 12;
          return result.u;
       case PIPE_SHADER_CAP_MAX_ADDRS:
-         return svgascreen->use_ps30 ? 1 : 0;
+      case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+        /* 
+         * Although PS 3.0 has some addressing abilities it can only represent
+         * loops that can be statically determined and unrolled. Given we can
+         * only handle a subset of the cases that the state tracker already
+         * does it is better to defer loop unrolling to the state tracker.
+         */
+         return 0;
       case PIPE_SHADER_CAP_MAX_PREDS:
          return svgascreen->use_ps30 ? 1 : 0;
       case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
          return 1;
-      case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
-         return svgascreen->use_ps30 ? 1 : 0;
       case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
       case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
       case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR: