Skip to content

Commit 80cce82

Browse files
qwmnerbvqwmnZorro666
authored andcommitted
Fix a hang when debugging HLSL compute shaders with enum types
1 parent 67a6f20 commit 80cce82

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

renderdoc/driver/shaders/dxil/dxil_debug.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8214,6 +8214,23 @@ const TypeData &Debugger::AddDebugType(const DXIL::Metadata *typeMD)
82148214
typeData.baseType = compositeType->base;
82158215
break;
82168216
}
8217+
case DW_TAG_enumeration_type:
8218+
{
8219+
typeData.type = VarType::Enum;
8220+
typeData.sizeInBytes = (uint32_t)(compositeType->sizeInBits / 8);
8221+
typeData.alignInBytes = (uint32_t)(compositeType->alignInBits / 8);
8222+
if(compositeType->name)
8223+
typeData.name = *compositeType->name;
8224+
else
8225+
typeData.name = StringFormat::Fmt("__anon_enum%u", compositeType->line);
8226+
8227+
if(compositeType->base)
8228+
{
8229+
AddDebugType(compositeType->base);
8230+
typeData.baseType = compositeType->base;
8231+
}
8232+
break;
8233+
}
82178234
default:
82188235
RDCERR("Unhandled DICompositeType tag %s", ToStr(compositeType->tag).c_str());
82198236
break;

0 commit comments

Comments
 (0)