[Mesa-dev] [PATCH 3/5] mesa: Fix test for optimistic coloring being necessary.

Ian Romanick idr at freedesktop.org
Wed May 22 12:07:01 PDT 2013


On 05/21/2013 06:11 PM, Eric Anholt wrote:
> i965 and radeon use ra_set_node_reg() to force payload registers to
> specific registers while exposing those registers to the allocator still.
> We were treating those register nodes as unsuccessfully allocated in the
> ra_simplify() step, leading to walking the registers again to do
> optimistic coloring even if there was nothing left ot do.
                                                      ^^ to

How would this bug manifest?  How do we know this fixes it?  From the 
other commit messages, I suspect this only shows with patches 4 and 5. 
Yeah?

> ---
>   src/mesa/program/register_allocate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
> index b8472a2..16739fd 100644
> --- a/src/mesa/program/register_allocate.c
> +++ b/src/mesa/program/register_allocate.c
> @@ -437,7 +437,7 @@ ra_simplify(struct ra_graph *g)
>      }
>
>      for (i = 0; i < g->count; i++) {
> -      if (!g->nodes[i].in_stack)
> +      if (!g->nodes[i].in_stack && g->nodes[i].reg == -1)
>   	 return GL_FALSE;
>      }
>
>



More information about the mesa-dev mailing list