MCPcopy Create free account
hub / github.com/baldurk/renderdoc / stageRowMenu

Method stageRowMenu

qrenderdoc/Windows/BufferViewer.cpp:3118–3254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3116}
3117
3118void BufferViewer::stageRowMenu(MeshDataStage stage, QMenu *menu, const QPoint &pos)
3119{
3120 m_CurView = tableForStage(stage);
3121 m_CurFixed = false;
3122
3123 updateExportActionNames();
3124
3125 menu->clear();
3126
3127 menu->setToolTipsVisible(true);
3128
3129 QModelIndex idx = m_CurView->selectionModel()->currentIndex();
3130
3131 const ActionDescription *action = m_Ctx.CurAction();
3132
3133 if(action && (action->flags & ActionFlags::MeshDispatch))
3134 {
3135 if(stage == MeshDataStage::GSOut)
3136 {
3137 const BufferConfiguration &config = m_ModelOut2->getConfig();
3138
3139 auto it = std::upper_bound(config.meshletVertexPrefixCounts.begin(),
3140 config.meshletVertexPrefixCounts.end(), (uint32_t)idx.row());
3141
3142 if(it != config.meshletVertexPrefixCounts.begin())
3143 it--;
3144
3145 size_t meshletIdx = it - config.meshletVertexPrefixCounts.begin();
3146
3147 m_RemoveFilter->setEnabled(m_CurMeshFilter != MeshFilter::None);
3148
3149 menu->addAction(m_RemoveFilter);
3150 menu->addAction(m_FilterMesh);
3151 menu->addAction(m_GotoTask);
3152
3153 const ShaderReflection *shaderDetails =
3154 m_Ctx.CurPipelineState().GetShaderReflection(ShaderStage::Mesh);
3155
3156 m_DebugMeshThread->setEnabled(false);
3157
3158 if(!m_Ctx.APIProps().shaderDebugging)
3159 {
3160 m_DebugMeshThread->setToolTip(tr("This API does not support shader debugging"));
3161 }
3162 else if(!m_Ctx.CurAction() ||
3163 !(m_Ctx.CurAction()->flags & (ActionFlags::Drawcall | ActionFlags::MeshDispatch)))
3164 {
3165 m_DebugMeshThread->setToolTip(tr("No draw call selected"));
3166 }
3167 else if(!shaderDetails)
3168 {
3169 m_DebugMeshThread->setToolTip(tr("No mesh shader bound"));
3170 }
3171 else if(!shaderDetails->debugInfo.debuggable)
3172 {
3173 m_DebugMeshThread->setToolTip(
3174 tr("This shader doesn't support debugging: %1").arg(shaderDetails->debugInfo.debugStatus));
3175 }

Callers

nothing calls this directly

Calls 15

trFunction · 0.50
QStringFunction · 0.50
clearMethod · 0.45
CurActionMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
rowMethod · 0.45
setToolTipMethod · 0.45
argMethod · 0.45
viewportMethod · 0.45
isValidMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected