summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-02-25 12:52:43 +0100
committerChristoph Bumiller <[email protected]>2013-03-12 12:55:34 +0100
commit3741b7d844f7357fac984e8c565dedb248947487 (patch)
tree0f8bb2594a44df90190bd914c1de64f67c038148 /src/gallium/drivers/nvc0
parentb0fc2f13eceb525056597c6a9191d2ad81773a4c (diff)
nv50/ir: initialize CodeEmitters' specialized target fields
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/codegen/nv50_ir_emit_gk110.cpp5
-rw-r--r--src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_gk110.cpp
index c771459d514..0f73254cac9 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_gk110.cpp
@@ -38,7 +38,7 @@ public:
inline void setProgramType(Program::Type pType) { progType = pType; }
private:
- const TargetNVC0 *targ;
+ const TargetNVC0 *targNVC0;
Program::Type progType;
@@ -1116,7 +1116,7 @@ CodeEmitterGK110::emitFlow(const Instruction *i)
if (f->op == OP_CALL) {
if (f->builtin) {
assert(f->absolute);
- uint32_t pcAbs = targ->getBuiltinOffset(f->target.builtin);
+ uint32_t pcAbs = targNVC0->getBuiltinOffset(f->target.builtin);
addReloc(RelocEntry::TYPE_BUILTIN, 0, pcAbs, 0xff800000, 23);
addReloc(RelocEntry::TYPE_BUILTIN, 1, pcAbs, 0x007fffff, -9);
} else {
@@ -1609,6 +1609,7 @@ CodeEmitterGK110::prepareEmission(Function *func)
CodeEmitterGK110::CodeEmitterGK110(const TargetNVC0 *target)
: CodeEmitter(target),
+ targNVC0(target),
writeIssueDelays(target->hasSWSched)
{
code = NULL;
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp
index ab4fb9498d9..3eef383608c 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp
@@ -38,7 +38,7 @@ public:
inline void setProgramType(Program::Type pType) { progType = pType; }
private:
- const TargetNVC0 *targ;
+ const TargetNVC0 *targNVC0;
Program::Type progType;
@@ -1174,7 +1174,7 @@ CodeEmitterNVC0::emitFlow(const Instruction *i)
if (f->op == OP_CALL) {
if (f->builtin) {
assert(f->absolute);
- uint32_t pcAbs = targ->getBuiltinOffset(f->target.builtin);
+ uint32_t pcAbs = targNVC0->getBuiltinOffset(f->target.builtin);
addReloc(RelocEntry::TYPE_BUILTIN, 0, pcAbs, 0xfc000000, 26);
addReloc(RelocEntry::TYPE_BUILTIN, 1, pcAbs, 0x03ffffff, -6);
} else {
@@ -2307,8 +2307,6 @@ calculateSchedDataNVC0(const Target *targ, Function *func)
void
CodeEmitterNVC0::prepareEmission(Function *func)
{
- const Target *targ = func->getProgram()->getTarget();
-
CodeEmitter::prepareEmission(func);
if (targ->hasSWSched)
@@ -2317,6 +2315,7 @@ CodeEmitterNVC0::prepareEmission(Function *func)
CodeEmitterNVC0::CodeEmitterNVC0(const TargetNVC0 *target)
: CodeEmitter(target),
+ targNVC0(target),
writeIssueDelays(target->hasSWSched)
{
code = NULL;