Don't flush register values used for indirect access

This commit is contained in:
baldurk
2019-09-16 17:30:09 +01:00
parent bbb7270ccd
commit 109803781c
2 changed files with 6 additions and 5 deletions
+4 -4
View File
@@ -1178,7 +1178,7 @@ void State::SetDst(const ASMOperand &dstoper, const ASMOperation &op, const Shad
if(dstoper.indices[i].relative)
{
ShaderVariable idx = GetSrc(dstoper.indices[i].operand, op);
ShaderVariable idx = GetSrc(dstoper.indices[i].operand, op, false);
indices[i] += idx.value.i.x;
}
@@ -1427,7 +1427,7 @@ ShaderVariable State::DDY(bool fine, State quad[4], const DXBC::ASMOperand &oper
return ret;
}
ShaderVariable State::GetSrc(const ASMOperand &oper, const ASMOperation &op) const
ShaderVariable State::GetSrc(const ASMOperand &oper, const ASMOperation &op, bool allowFlushing) const
{
ShaderVariable v, s;
@@ -1444,14 +1444,14 @@ ShaderVariable State::GetSrc(const ASMOperand &oper, const ASMOperation &op) con
if(oper.indices[i].relative)
{
ShaderVariable idx = GetSrc(oper.indices[i].operand, op);
ShaderVariable idx = GetSrc(oper.indices[i].operand, op, false);
indices[i] += idx.value.i.x;
}
}
// is this type a flushable input (for float operations)
bool flushable = true;
bool flushable = allowFlushing;
switch(oper.type)
{
+2 -1
View File
@@ -257,7 +257,8 @@ private:
// retrieves the value of the operand, by looking up
// in the register file and performing any swizzling and
// negation/abs functions
ShaderVariable GetSrc(const DXBC::ASMOperand &oper, const DXBC::ASMOperation &op) const;
ShaderVariable GetSrc(const DXBC::ASMOperand &oper, const DXBC::ASMOperation &op,
bool allowFlushing = true) const;
ShaderVariable DDX(bool fine, State quad[4], const DXBC::ASMOperand &oper,
const DXBC::ASMOperation &op) const;