r300g: set max vertex samplers to 0 on swtcl chipsets
authorMarek Olšák <maraeo@gmail.com>
Fri, 14 Oct 2011 12:59:15 +0000 (14:59 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 14 Oct 2011 13:06:01 +0000 (15:06 +0200)
This should fix a bug added by f5bfe54a.

Might also fix:
https://bugs.freedesktop.org/show_bug.cgi?id=41715

src/gallium/drivers/r300/r300_screen.c

index 19489bdab24f779a53463af513e7050b393c7f07..c574a504924589f6222d8d1288d94231aa3b6db5 100644 (file)
@@ -225,6 +225,13 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
         }
         break;
     case PIPE_SHADER_VERTEX:
+        switch (param)
+        {
+        case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
+            return 0;
+        default:;
+        }
+
         if (!r300screen->caps.has_tcl) {
             return draw_get_shader_param(shader, param);
         }
@@ -259,12 +266,10 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, unsigned shader, e
         case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
         case PIPE_SHADER_CAP_SUBROUTINES:
         case PIPE_SHADER_CAP_INTEGERS:
-        case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
             return 0;
+        default:;
         }
         break;
-    default:
-        break;
     }
     return 0;
 }