return that;
}
+bool
+LValue::isUniform() const
+{
+ if (defs.size() > 1)
+ return false;
+ Instruction *insn = getInsn();
+ // let's not try too hard here for now ...
+ return !insn->srcExists(1) && insn->getSrc(0)->isUniform();
+}
+
Symbol::Symbol(Program *prog, DataFile f, ubyte fidx)
{
baseSym = NULL;
return that;
}
+bool
+Symbol::isUniform() const
+{
+ return
+ reg.file != FILE_SYSTEM_VALUE &&
+ reg.file != FILE_MEMORY_LOCAL &&
+ reg.file != FILE_SHADER_INPUT;
+}
+
ImmediateValue::ImmediateValue(Program *prog, uint32_t uval)
{
memset(®, 0, sizeof(reg));
virtual bool equals(const Value *, bool strict = false) const;
virtual bool interfers(const Value *) const;
+ virtual bool isUniform() const { return true; }
inline Value *rep() const { return join; }
LValue(Function *, LValue *);
~LValue() { }
+ virtual bool isUniform() const;
+
virtual LValue *clone(ClonePolicy<Function>&) const;
virtual int print(char *, size_t, DataType ty = TYPE_NONE) const;
virtual bool equals(const Value *that, bool strict) const;
+ virtual bool isUniform() const;
+
virtual int print(char *, size_t, DataType ty = TYPE_NONE) const;
// print with indirect values