Mesa (master): r300g: set max vertex samplers to 0 on swtcl chipsets

Marek Olšák mareko at kemper.freedesktop.org
Fri Oct 14 06:07:10 PDT 2011


Module: Mesa
Branch: master
Commit: ae272a92a17510493392d7d7dd4937786af415ec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae272a92a17510493392d7d7dd4937786af415ec

Author: Marek Olšák <maraeo at gmail.com>
Date:   Fri Oct 14 14:59:15 2011 +0200

r300g: set max vertex samplers to 0 on swtcl chipsets

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 |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 19489bd..c574a50 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -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;
 }



More information about the mesa-commit mailing list