OSDN Git Service

r300g: don't force vertex position for HW TCL path
authorMaciej Cencora <m.cencora@gmail.com>
Sun, 27 Sep 2009 20:28:46 +0000 (22:28 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Sun, 27 Sep 2009 20:44:28 +0000 (22:44 +0200)
It could be generated by vertex shader.

src/gallium/drivers/r300/r300_state_derived.c

index 083861a..ed5dc1b 100644 (file)
@@ -128,7 +128,9 @@ static void r300_vs_tab_routes(struct r300_context* r300,
 
     vinfo->hwfmt[0] = 0x5555; /* XXX this is classic Mesa bonghits */
 
-    if (!pos) {
+    /* We need to add vertex position attribute only for SW TCL case,
+     * for HW TCL case it could be generated by vertex shader */
+    if (!pos && !r300screen->caps->has_tcl) {
         debug_printf("r300: Forcing vertex position attribute emit...\n");
         /* Make room for the position attribute
          * at the beginning of the tab. */