svga: fill out CAPs for indirect addressing
authorMarek Olšák <maraeo@gmail.com>
Fri, 12 Nov 2010 02:08:47 +0000 (03:08 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 12 Nov 2010 02:13:23 +0000 (03:13 +0100)
As per the ps_3_0 and vs_3_0 documentation.
The aL register in D3D9 is quite tricky to use, though.

src/gallium/drivers/svga/svga_screen.c

index b5fae94f783194a66f3bedd53a6be9d805faee68..af99c41901058ec6b926ec22707385e5e2d0dc4f 100644 (file)
@@ -231,6 +231,12 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en
          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:
+         return 0;
       }
       break;
    case PIPE_SHADER_VERTEX:
@@ -263,6 +269,13 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en
          return svgascreen->use_vs30 ? 1 : 0;
       case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
          return 1;
+      case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
+      case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
+         return svgascreen->use_vs30 ? 1 : 0;
+      case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
+         return 0;
+      case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+         return 1;
       default:
          break;
       }