[Mesa-dev] [PATCH 1/4] nv50: add target->hasDualIssueing()

Karol Herbst karolherbst at gmail.com
Sat Aug 13 10:02:35 UTC 2016


Signed-off-by: Karol Herbst <karolherbst at gmail.com>
---
 src/gallium/drivers/nouveau/codegen/nv50_ir_target.h        | 1 +
 src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp | 7 ++++++-
 src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.h   | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.h
index 4a701f7..485ca16 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target.h
@@ -222,6 +222,7 @@ public:
                              const Value *) const = 0;
 
    // whether @insn can be issued together with @next (order matters)
+   virtual bool hasDualIssueing() const { return false; }
    virtual bool canDualIssue(const Instruction *insn,
                              const Instruction *next) const { return false; }
    virtual int getLatency(const Instruction *) const { return 1; }
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..faf2121 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
@@ -605,12 +605,17 @@ int TargetNVC0::getThroughput(const Instruction *i) const
    }
 }
 
+bool TargetNVC0::hasDualIssueing() const
+{
+   return getChipset() >= 0xe4;
+}
+
 bool TargetNVC0::canDualIssue(const Instruction *a, const Instruction *b) const
 {
    const OpClass clA = operationClass[a->op];
    const OpClass clB = operationClass[b->op];
 
-   if (getChipset() >= 0xe4) {
+   if (hasDualIssueing()) {
       // not texturing
       // not if the 2nd instruction isn't necessarily executed
       if (clA == OPCLASS_TEXTURE || clA == OPCLASS_FLOW)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.h
index 7d11cd9..3d55da7 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.h
@@ -57,6 +57,7 @@ public:
    virtual bool isPostMultiplySupported(operation, float, int& e) const;
    virtual bool mayPredicate(const Instruction *, const Value *) const;
 
+   virtual bool hasDualIssueing() const;
    virtual bool canDualIssue(const Instruction *, const Instruction *) const;
    virtual int getLatency(const Instruction *) const;
    virtual int getThroughput(const Instruction *) const;
-- 
2.9.2



More information about the mesa-dev mailing list