Add nointerpolation on floats where they are packed with ints

* This makes shader debugging interfaces match better to pick up
  interpolators correctly.
This commit is contained in:
baldurk
2018-04-03 17:10:23 +01:00
parent ada2222d8f
commit 2fb9429f5b
+19 -2
View File
@@ -1135,11 +1135,28 @@ ShaderDebugTrace D3D11Replay::DebugPixel(uint32_t eventId, uint32_t x, uint32_t
nextreg = dxbc->m_InputSig[i].regIndex + 1;
if(dxbc->m_InputSig[i].compType == CompType::Float)
{
// if we're packed with ints on either side, we must be nointerpolation
bool nointerp = false;
for(size_t j = 0; j < dxbc->m_InputSig.size(); j++)
{
if(dxbc->m_InputSig[i].regIndex == dxbc->m_InputSig[j].regIndex &&
dxbc->m_InputSig[j].compType != CompType::Float)
{
nointerp = true;
break;
}
}
if(nointerp)
extractHlsl += "nointerpolation ";
extractHlsl += "float";
}
else if(dxbc->m_InputSig[i].compType == CompType::SInt)
extractHlsl += "int";
extractHlsl += "nointerpolation int";
else if(dxbc->m_InputSig[i].compType == CompType::UInt)
extractHlsl += "uint";
extractHlsl += "nointerpolation uint";
else
RDCERR("Unexpected input signature type: %d", dxbc->m_InputSig[i].compType);