Mesa (master): nouveau: nv50: Add missing ctor_immd_4u32 function

Patrice Mandin pmandin at kemper.freedesktop.org
Sun Dec 13 19:09:50 UTC 2009


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

Author: Patrice Mandin <patmandin at gmail.com>
Date:   Sun Dec 13 20:09:33 2009 +0100

nouveau: nv50: Add missing ctor_immd_4u32 function

---

 src/gallium/drivers/nv50/nv50_program.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 2e4279f..feb3d42 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -358,7 +358,7 @@ static void
 kill_temp_temp(struct nv50_pc *pc)
 {
 	int i;
-	
+
 	for (i = 0; i < pc->temp_temp_nr; i++)
 		free_temp(pc, pc->temp_temp[i]);
 	pc->temp_temp_nr = 0;
@@ -373,7 +373,20 @@ ctor_immd(struct nv50_pc *pc, float x, float y, float z, float w)
 	pc->immd_buf[(pc->immd_nr * 4) + 1] = y;
 	pc->immd_buf[(pc->immd_nr * 4) + 2] = z;
 	pc->immd_buf[(pc->immd_nr * 4) + 3] = w;
-	
+
+	return pc->immd_nr++;
+}
+
+static int
+ctor_immd_4u32(struct nv50_pc *pc, uint32_t x, uint32_t y, uint32_t z, uint32_t w)
+{
+	pc->immd_buf = REALLOC(pc->immd_buf, (pc->immd_nr * 4 * sizeof(uint32_t)),
+			       (pc->immd_nr + 1) * 4 * sizeof(uint32_t));
+	pc->immd_buf[(pc->immd_nr * 4) + 0] = x;
+	pc->immd_buf[(pc->immd_nr * 4) + 1] = y;
+	pc->immd_buf[(pc->immd_nr * 4) + 2] = z;
+	pc->immd_buf[(pc->immd_nr * 4) + 3] = w;
+
 	return pc->immd_nr++;
 }
 




More information about the mesa-commit mailing list