Mesa (master): r300-gallium: Calculate vert shader inputs for HW TCL.

Corbin Simpson csimpson at kemper.freedesktop.org
Sat Apr 4 09:44:04 UTC 2009


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

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sat Apr  4 02:38:13 2009 -0700

r300-gallium: Calculate vert shader inputs for HW TCL.

This is definitely not perfect.

---

 src/gallium/drivers/r300/r300_state_derived.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 0e7a2b6..2f34698 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -30,9 +30,9 @@
  * The vertex_info struct describes the post-TCL format of vertices. It is
  * required for Draw when doing SW TCL, and also for describing the
  * dreaded RS block on R300 chipsets. */
-/* XXX this function should be able to handle vert shaders as well as draw */
 static void r300_update_vertex_layout(struct r300_context* r300)
 {
+    struct r300_screen* r300screen = r300_screen(r300->context.screen);
     struct r300_vertex_format vformat;
     struct vertex_info vinfo;
     boolean pos = FALSE, psize = FALSE, fog = FALSE;
@@ -74,6 +74,13 @@ static void r300_update_vertex_layout(struct r300_context* r300)
         }
     }
 
+    if (r300screen->caps->has_tcl) {
+        for (i = 0; i < info->num_inputs; i++) {
+            /* XXX should probably do real lookup with vert shader */
+            tab[i] = i;
+        }
+    }
+
     /* Do the actual vertex_info setup.
      *
      * vertex_info has four uints of hardware-specific data in it.




More information about the mesa-commit mailing list