mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Add an SDBasic type for ResourceId.
* This type is core enum and used globally (not API specific) that it merits becoming a specific structured data type
This commit is contained in:
@@ -682,8 +682,7 @@ void addStructuredObjects(RDTreeWidgetItem *parent, const StructuredObjectList &
|
||||
// that for the best raw structured data representation instead of flattening those out to just
|
||||
// "ResourceId", and we also don't want to store two types ('fake' and 'real'), so instead we
|
||||
// check the custom string.
|
||||
if((obj->type.flags & SDTypeFlags::HasCustomString) &&
|
||||
!strncmp(obj->data.str.c_str(), "ResourceId", 10))
|
||||
if(obj->type.basetype == SDBasic::ResourceId)
|
||||
{
|
||||
ResourceId id;
|
||||
static_assert(sizeof(id) == sizeof(obj->data.basic.u), "ResourceId is no longer uint64_t!");
|
||||
@@ -715,6 +714,7 @@ void addStructuredObjects(RDTreeWidgetItem *parent, const StructuredObjectList &
|
||||
case SDBasic::Null: param = lit("NULL"); break;
|
||||
case SDBasic::Buffer: param = lit("(%1 bytes)").arg(obj->type.byteSize); break;
|
||||
case SDBasic::String: param = obj->data.str; break;
|
||||
case SDBasic::ResourceId:
|
||||
case SDBasic::Enum:
|
||||
case SDBasic::UnsignedInteger: param = Formatter::Format(obj->data.basic.u); break;
|
||||
case SDBasic::SignedInteger: param = Formatter::Format(obj->data.basic.i); break;
|
||||
|
||||
Reference in New Issue
Block a user