[Mesa-dev] [PATCH] r600g: don't reserve more stack space than required

Vadim Girlin vadimgirlin at gmail.com
Sun Feb 17 22:18:28 PST 2013


Please ignore this, there are some issues with this patch undetected by 
piglit.

I suspect it's something similar to the hw bug discussed here recently:

http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg33361.html


On 02/18/2013 07:29 AM, Vadim Girlin wrote:
> 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;
>   	}
>



More information about the mesa-dev mailing list