diff options
author | Karol Herbst <karolherbst@gmail.com> | 2016-08-13 11:54:45 +0200 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2016-09-03 00:01:06 -0400 |
commit | d0cf7a6beb4470d945bccb4e753cc7eb6ca5dda8 (patch) | |
tree | 049f59432143c1017559f63d665525961bf2f1cd /src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp | |
parent | aad4f15506c2b5ff9f3304a467b51b45dd77554d (diff) | |
download | external_mesa3d-d0cf7a6beb4470d945bccb4e753cc7eb6ca5dda8.zip external_mesa3d-d0cf7a6beb4470d945bccb4e753cc7eb6ca5dda8.tar.gz external_mesa3d-d0cf7a6beb4470d945bccb4e753cc7eb6ca5dda8.tar.bz2 |
nvc0/ir: don't dual-issue ops that depend or interfere with each other
Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
[imirkin: rewrite to split up the helpers and move more logic to target]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp index 04ac288..0cb21e8 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp @@ -615,6 +615,12 @@ bool TargetNVC0::canDualIssue(const Instruction *a, const Instruction *b) const // not if the 2nd instruction isn't necessarily executed if (clA == OPCLASS_TEXTURE || clA == OPCLASS_FLOW) return false; + + // Check that a and b don't write to the same sources, nor that b reads + // anything that a writes. + if (!a->canCommuteDefDef(b) || !a->canCommuteDefSrc(b)) + return false; + // anything with MOV if (a->op == OP_MOV || b->op == OP_MOV) return true; |