mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
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:
@@ -1818,19 +1818,16 @@ void D3D12PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
|
||||
else
|
||||
{
|
||||
const ResourceFormat &fmt = view.res.Format;
|
||||
if(fmt.special)
|
||||
if(fmt.type == ResourceFormatType::R10G10B10A2)
|
||||
{
|
||||
if(fmt.specialFormat == SpecialFormat::R10G10B10A2)
|
||||
{
|
||||
if(fmt.compType == CompType::UInt)
|
||||
format = lit("uintten");
|
||||
if(fmt.compType == CompType::UNorm)
|
||||
format = lit("unormten");
|
||||
}
|
||||
else if(fmt.specialFormat == SpecialFormat::R11G11B10)
|
||||
{
|
||||
format = lit("floateleven");
|
||||
}
|
||||
if(fmt.compType == CompType::UInt)
|
||||
format = lit("uintten");
|
||||
if(fmt.compType == CompType::UNorm)
|
||||
format = lit("unormten");
|
||||
}
|
||||
else if(fmt.type == ResourceFormatType::R11G11B10)
|
||||
{
|
||||
format = lit("floateleven");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user