On Tue, 29 Nov 2011 16:08:38 +0800, Yuanhan Liu <yuanhan....@linux.intel.com> 
wrote:
> Let if_stack just store the instruction pointer(an index). This is
> somehow more flexible than store the instruction memory address.

I'd be more specific: This lets us realloc the instruction store.

> diff --git a/src/mesa/drivers/dri/i965/brw_eu.c 
> b/src/mesa/drivers/dri/i965/brw_eu.c
> index b5a858b..d6e5c09 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu.c
> @@ -191,8 +191,7 @@ brw_init_compile(struct brw_context *brw, struct 
> brw_compile *p, void *mem_ctx)
>     /* Set up control flow stack */
>     p->if_stack_depth = 0;
>     p->if_stack_array_size = 16;
> -   p->if_stack =
> -      rzalloc_array(mem_ctx, struct brw_instruction *, 
> p->if_stack_array_size);
> +   p->if_stack = rzalloc_array(mem_ctx, GLuint, p->if_stack_array_size);
>  }

Please use plain types instead of the awful GL-decorated types, unless
it's something directly exposed in the GL API.

(if you want sized types, the standard ones in inttypes.h are good)

Attachment: pgpbotDhI4ruN.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to