mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 23:46:41 +00:00
Rename 'name' member of ActionDescription to 'customName'
* This is a deliberate break of compatibility since the field is now often empty, for non-markers. This means code will get a more explicit error when the name is being referenced, so it can be updated to fetch the name it needs as needed.
This commit is contained in:
@@ -514,13 +514,22 @@ struct EventItemModel : public QAbstractItemModel
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rdcstr GetEventName(uint32_t eid)
|
||||
{
|
||||
if(eid < m_Actions.size())
|
||||
return RichResourceTextFormat(m_Ctx, GetCachedEIDName(eid));
|
||||
|
||||
return rdcstr();
|
||||
}
|
||||
|
||||
rdcarray<rdcstr> GetMarkerList() const
|
||||
{
|
||||
rdcarray<rdcstr> ret;
|
||||
|
||||
for(auto it = m_Nodes.begin(); it != m_Nodes.end(); ++it)
|
||||
if(it.value().action && (it.value().action->flags & ActionFlags::PushMarker))
|
||||
ret.push_back(it.value().action->name);
|
||||
if(it.value().action && (it.value().action->flags & ActionFlags::PushMarker) &&
|
||||
!it.value().action->customName.isEmpty())
|
||||
ret.push_back(it.value().action->customName);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1080,14 +1089,14 @@ private:
|
||||
{
|
||||
if(m_UseCustomActionNames)
|
||||
{
|
||||
name = action->name;
|
||||
name = action->customName;
|
||||
}
|
||||
else
|
||||
{
|
||||
if((action->flags & (ActionFlags::SetMarker | ActionFlags::PushMarker)) &&
|
||||
!(action->flags & (ActionFlags::CommandBufferBoundary | ActionFlags::PassBoundary |
|
||||
ActionFlags::CmdList | ActionFlags::MultiAction)))
|
||||
name = action->name;
|
||||
name = action->customName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2564,7 +2573,7 @@ nesting level.
|
||||
const SDChunk *, const ActionDescription *action, const rdcstr &) {
|
||||
while(action->parent)
|
||||
{
|
||||
if(QString(action->parent->name).contains(markerName, Qt::CaseInsensitive))
|
||||
if(QString(action->parent->customName).contains(markerName, Qt::CaseInsensitive))
|
||||
return true;
|
||||
|
||||
action = action->parent;
|
||||
@@ -5234,6 +5243,11 @@ const ActionDescription *EventBrowser::GetActionForEID(uint32_t eid)
|
||||
return m_Model->GetActionForEID(eid);
|
||||
}
|
||||
|
||||
rdcstr EventBrowser::GetEventName(uint32_t eid)
|
||||
{
|
||||
return m_Model->GetEventName(eid);
|
||||
}
|
||||
|
||||
bool EventBrowser::IsAPIEventVisible(uint32_t eid)
|
||||
{
|
||||
return m_FilterModel->mapFromSource(m_Model->GetIndexForEID(eid)).isValid();
|
||||
|
||||
Reference in New Issue
Block a user