Mesa (master): r300/compiler: allow 32 temporaries in vertex shaders

Marek Olšák mareko at kemper.freedesktop.org
Wed Jun 23 02:05:56 UTC 2010


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Wed Jun 23 03:57:27 2010 +0200

r300/compiler: allow 32 temporaries in vertex shaders

---

 src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c |    6 +++---
 src/mesa/drivers/dri/r300/compiler/radeon_code.h   |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
index 6a1e3e7..5f66ad8 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c
@@ -405,7 +405,7 @@ static void allocate_temporary_registers(struct r300_vertex_program_compiler * c
 {
 	struct rc_instruction *inst;
 	unsigned int num_orig_temps = 0;
-	char hwtemps[VSF_MAX_FRAGMENT_TEMPS];
+	char hwtemps[R300_VS_MAX_TEMPS];
 	struct temporary_allocation * ta;
 	unsigned int i, j;
 
@@ -464,11 +464,11 @@ static void allocate_temporary_registers(struct r300_vertex_program_compiler * c
 				unsigned int orig = inst->U.I.DstReg.Index;
 
 				if (!ta[orig].Allocated) {
-					for(j = 0; j < VSF_MAX_FRAGMENT_TEMPS; ++j) {
+					for(j = 0; j < R300_VS_MAX_TEMPS; ++j) {
 						if (!hwtemps[j])
 							break;
 					}
-					if (j >= VSF_MAX_FRAGMENT_TEMPS) {
+					if (j >= R300_VS_MAX_TEMPS) {
 						fprintf(stderr, "Out of hw temporaries\n");
 					} else {
 						ta[orig].Allocated = 1;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.h b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
index 1979e7e..7550fca 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -236,7 +236,7 @@ struct rX00_fragment_program_code {
 
 
 #define VSF_MAX_FRAGMENT_LENGTH (255*4)
-#define VSF_MAX_FRAGMENT_TEMPS (14)
+#define R300_VS_MAX_TEMPS	32
 
 #define VSF_MAX_INPUTS 32
 #define VSF_MAX_OUTPUTS 32




More information about the mesa-commit mailing list