freedreno/ir3: shadow comes before array
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 1 Oct 2014 00:02:37 +0000 (20:02 -0400)
committerRob Clark <robclark@freedesktop.org>
Fri, 3 Oct 2014 03:30:47 +0000 (23:30 -0400)
Experimentally, this makes *ArrayShadow tex-miplevel-selection tests
pass.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/ir3/ir3_compiler.c

index ba6afa4a556d1f0bc688a4d73ab5411e56138db5..38ac22a00db3c36ad4fcd64c066bdcdf1b842bd5 100644 (file)
@@ -1170,10 +1170,10 @@ fill_tex_info(struct ir3_compile_context *ctx,
                info->order[arg] = pos++;
        if (tgt->dims == 1)
                info->order[pos++] = -1;
+       if (tgt->shadow)
+               info->order[pos++] = MAX2(arg + tgt->array, 2);
        if (tgt->array)
                info->order[pos++] = arg++;
-       if (tgt->shadow)
-               info->order[pos++] = MAX2(arg, 2);
        if (info->flags & IR3_INSTR_P)
                info->order[pos++] = 3;