[Mesa-dev] [PATCH] r600g: fix calculation for gpr allocation

Alex Deucher alexdeucher at gmail.com
Mon Aug 31 20:26:49 PDT 2015


On Mon, Aug 31, 2015 at 10:34 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> I've been chasing a geom shader hang on rv635 since I wrote
> r600 geom code, and finally I hacked some values from fglrx
> in and I could run texelfetch without failures.
>
> This is totally my fault as well, maths fail 101.
>
> This makes geom shaders on r600 not fail heavily.
>
> Cc: "10.6" "11.0" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Dave Airlie <airlied at redhat.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/gallium/drivers/r600/r600_state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
> index dcbddf3..680051f 100644
> --- a/src/gallium/drivers/r600/r600_state.c
> +++ b/src/gallium/drivers/r600/r600_state.c
> @@ -2051,7 +2051,7 @@ bool r600_adjust_gprs(struct r600_context *rctx)
>                         /* always privilege vs stage so that at worst we have the
>                          * pixel stage producing wrong output (not the vertex
>                          * stage) */
> -                       new_num_ps_gprs = max_gprs - ((new_num_vs_gprs - new_num_es_gprs - new_num_gs_gprs) + def_num_clause_temp_gprs * 2);
> +                       new_num_ps_gprs = max_gprs - ((new_num_vs_gprs + new_num_es_gprs + new_num_gs_gprs) + def_num_clause_temp_gprs * 2);
>                         new_num_vs_gprs = num_vs_gprs;
>                         new_num_gs_gprs = num_gs_gprs;
>                         new_num_es_gprs = num_es_gprs;
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list