diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-05 14:33:42 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-05 18:06:48 +0000 |
commit | 3d11b075f0af363f8c8c433508b379454d8db9a8 (patch) | |
tree | bb105953585228143d6f8280994143beb2fe61f2 /src/gallium | |
parent | 828e1b0b4c5eef96a7f9a64010532263430e1f13 (diff) |
panfrost/midgard: Fix cubemap regression
Fixes: 2d9802233 ("panfrost/midgard: Extend RA to non-vec4 sources")
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/panfrost/midgard/midgard_ra.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_ra.c b/src/gallium/drivers/panfrost/midgard/midgard_ra.c index c9a6c6e4710..7fd5e5b49e3 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard_ra.c +++ b/src/gallium/drivers/panfrost/midgard/midgard_ra.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2018-2019 Alyssa Rosenzweig <[email protected]> + * Copyright (C) 2019 Collabora * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -478,11 +479,17 @@ install_registers_instr( } case TAG_LOAD_STORE_4: { - if (OP_IS_STORE(ins->load_store.op)) { + if (OP_IS_STORE_VARY(ins->load_store.op)) { /* TODO: use ssa_args for st_vary */ ins->load_store.reg = 0; } else { - struct phys_reg src = index_to_reg(ctx, g, args.dest); + /* Which physical register we read off depends on + * whether we are loading or storing -- think about the + * logical dataflow */ + + unsigned r = OP_IS_STORE(ins->load_store.op) ? + args.src0 : args.dest; + struct phys_reg src = index_to_reg(ctx, g, r); ins->load_store.reg = src.reg; |