diff options
author | Rob Clark <[email protected]> | 2020-01-27 08:26:04 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-01 02:40:22 +0000 |
commit | 8d0e7d9a4c1cfe28b3cd2356e94e287e82821e1a (patch) | |
tree | c4b56364c729032b1537439fe1c1ba28a6b8d698 /src | |
parent | fb09020ef23cc87c1c3024add572cf0a571e8ddc (diff) |
freedreno/ir3: create fragcoord instructions in input block
This was somehow working to create the instructions in a random block,
and use the value in other blocks, by dumb luck. But two-pass-RA's
better choice of register assignment causes a couple dEQPs to start
failing without this fix:
dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_1
dEQP-GLES3.functional.shaders.metamorphic.bubblesort_flag.variant_2
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
Diffstat (limited to 'src')
-rw-r--r-- | src/freedreno/ir3/ir3_compiler_nir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index a7536cfecd2..747b66ac58a 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -1306,12 +1306,12 @@ static struct ir3_instruction * get_frag_coord(struct ir3_context *ctx) { if (!ctx->frag_coord) { - struct ir3_block *b = ctx->block; + struct ir3_block *b = ctx->in_block; struct ir3_instruction *xyzw[4]; struct ir3_instruction *hw_frag_coord; hw_frag_coord = create_sysval_input(ctx, SYSTEM_VALUE_FRAG_COORD, 0xf); - ir3_split_dest(ctx->block, xyzw, hw_frag_coord, 0, 4); + ir3_split_dest(b, xyzw, hw_frag_coord, 0, 4); /* for frag_coord.xy, we get unsigned values.. we need * to subtract (integer) 8 and divide by 16 (right- |