summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp7
-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
3 files changed, 10 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp
index 2ba87f30971..90f861590e1 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_emit_nv50.cpp
@@ -46,7 +46,7 @@ public:
private:
Program::Type progType;
- const TargetNV50 *targ;
+ const TargetNV50 *targNV50;
private:
inline void defId(const ValueDef&, const int pos);
@@ -1512,7 +1512,7 @@ CodeEmitterNV50::emitFlow(const Instruction *i, uint8_t flowOp)
if (f->op == OP_CALL) {
if (f->builtin) {
- pos = targ->getBuiltinOffset(f->target.builtin);
+ pos = targNV50->getBuiltinOffset(f->target.builtin);
} else {
pos = f->target.fn->binPos;
}
@@ -1884,7 +1884,8 @@ CodeEmitterNV50::prepareEmission(Function *func)
replaceExitWithModifier(func);
}
-CodeEmitterNV50::CodeEmitterNV50(const TargetNV50 *target) : CodeEmitter(target)
+CodeEmitterNV50::CodeEmitterNV50(const TargetNV50 *target) :
+ CodeEmitter(target), targNV50(target)
{
targ = target; // specialized
code = NULL;
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;