[Mesa-dev] [PATCH] r600g: don't reserve more stack space than required
Vadim Girlin
vadimgirlin at gmail.com
Sun Feb 17 19:29:07 PST 2013
Overcautious stack reservation caused significant loss of performance.
Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
---
No regressions with quick-driver.tests on evergreen.
Adds more than 30% FPS for Unigine Heaven with default backend.
src/gallium/drivers/r600/r600_asm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 3632aa5..6ee9bc0 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -1525,7 +1525,7 @@ int r600_bytecode_build(struct r600_bytecode *bc)
int i, r;
if (bc->callstack[0].max > 0)
- bc->nstack = ((bc->callstack[0].max + 3) >> 2) + 2;
+ bc->nstack = ((bc->callstack[0].max + 3) >> 2);
if (bc->type == TGSI_PROCESSOR_VERTEX && !bc->nstack) {
bc->nstack = 1;
}
--
1.8.1.2
More information about the mesa-dev
mailing list