Combine 'special' with 'specialFormat' as single resource format type

* There was no good reason to have a flag indicating if the special
  format was valid or not. Now it's a single enum, with a value
  'Regular' indicating that the compCount/compWidth/compType fully
  describe the format itself.
* This makes code patterns easier as you no longer need to check for
  special then check for specialFormat, you can just test the type
  directly.
This commit is contained in:
baldurk
2017-08-24 10:37:16 +01:00
parent b55ff14242
commit e85c8d19bf
30 changed files with 641 additions and 733 deletions
+6 -9
View File
@@ -60,16 +60,13 @@ public:
if(compType == CompType::Depth)
m_IsDepth = true;
if(m_Tex->format.special)
switch(m_Tex->format.type)
{
switch(m_Tex->format.specialFormat)
{
case SpecialFormat::D16S8:
case SpecialFormat::D24S8:
case SpecialFormat::D32S8:
case SpecialFormat::S8: m_IsDepth = true; break;
default: break;
}
case ResourceFormatType::D16S8:
case ResourceFormatType::D24S8:
case ResourceFormatType::D32S8:
case ResourceFormatType::S8: m_IsDepth = true; break;
default: break;
}
}