[Mesa-dev] [PATCH 2/2] r600g: Fix instruction group merge when there are predicated insts.
Tom Stellard
tstellar at gmail.com
Thu Aug 2 12:53:48 PDT 2012
On Wed, Aug 1, 2012 at 4:52 PM, Vincent Lejeune <vljn at ovi.com> wrote:
> ---
> src/gallium/drivers/r600/r600_asm.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
> index 0f28824..b0194bf 100644
> --- a/src/gallium/drivers/r600/r600_asm.c
> +++ b/src/gallium/drivers/r600/r600_asm.c
> @@ -1048,7 +1048,25 @@ static int merge_inst_groups(struct r600_bytecode *bc, struct r600_bytecode_alu
> return r;
>
> for (i = 0; i < max_slots; ++i) {
> + if (prev[i]) {
> + if (prev[i]->pred_sel)
> + return 0;
> + if (is_alu_once_inst(bc, prev[i]))
> + return 0;
> + }
> + if (slots[i]) {
> + if (slots[i]->pred_sel)
> + return 0;
> + if (is_alu_once_inst(bc, slots[i]))
> + return 0;
> + }
> + }
> +
Why is this code in a separate loop? Can we merge it into the loop below?
> + for (i = 0; i < max_slots; ++i) {
> struct r600_bytecode_alu *alu;
> +
> + if (num_once_inst > 0)
> + return 0;
>
At the end of this loop, there is code that checks if (num_once_inst
> 1), why are we checking num_once_inst > 0 here?
> /* check number of literals */
> if (prev[i]) {
> --
> 1.7.11.2
>
> _______________________________________________
> 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