| 3121 | } |
| 3122 | |
| 3123 | void TextureViewer::OnEventChanged(uint32_t eventId) |
| 3124 | { |
| 3125 | bool copy = false, clear = false, compute = false; |
| 3126 | Following::GetActionContext(m_Ctx, copy, clear, compute); |
| 3127 | |
| 3128 | ShaderStage stages[] = { |
| 3129 | ShaderStage::Vertex, ShaderStage::Hull, ShaderStage::Domain, ShaderStage::Geometry, |
| 3130 | ShaderStage::Pixel, ShaderStage::Task, ShaderStage::Mesh, |
| 3131 | }; |
| 3132 | |
| 3133 | QFont font = ui->overlay->font(); |
| 3134 | if(m_Ctx.APIProps().pipelineType == GraphicsAPI::Vulkan && |
| 3135 | m_Ctx.CurVulkanPipelineState()->multisample.rasterSamples > 1) |
| 3136 | { |
| 3137 | font.setItalic(true); |
| 3138 | ui->overlay->setItemText((int)DebugOverlay::QuadOverdrawDraw, tr("Overdraw (N/A on MSAA)")); |
| 3139 | ui->overlay->setItemText((int)DebugOverlay::QuadOverdrawPass, tr("Overdraw (N/A on MSAA)")); |
| 3140 | ui->overlay->setItemData((int)DebugOverlay::QuadOverdrawDraw, font, Qt::FontRole); |
| 3141 | ui->overlay->setItemData((int)DebugOverlay::QuadOverdrawPass, font, Qt::FontRole); |
| 3142 | } |
| 3143 | else |
| 3144 | { |
| 3145 | ui->overlay->setItemText((int)DebugOverlay::QuadOverdrawDraw, tr("Quad Overdraw (Draw)")); |
| 3146 | ui->overlay->setItemText((int)DebugOverlay::QuadOverdrawPass, tr("Quad Overdraw (Pass)")); |
| 3147 | ui->overlay->setItemData((int)DebugOverlay::QuadOverdrawDraw, font, Qt::FontRole); |
| 3148 | ui->overlay->setItemData((int)DebugOverlay::QuadOverdrawPass, font, Qt::FontRole); |
| 3149 | } |
| 3150 | |
| 3151 | int count = 7; |
| 3152 | |
| 3153 | if(compute) |
| 3154 | { |
| 3155 | stages[0] = ShaderStage::Compute; |
| 3156 | count = 1; |
| 3157 | } |
| 3158 | |
| 3159 | for(int i = 0; i < count; i++) |
| 3160 | { |
| 3161 | ShaderStage stage = stages[i]; |
| 3162 | |
| 3163 | m_ReadOnlyResources[(uint32_t)stage] = Following::GetReadOnlyResources(m_Ctx, stage, true); |
| 3164 | m_ReadWriteResources[(uint32_t)stage] = Following::GetReadWriteResources(m_Ctx, stage, true); |
| 3165 | } |
| 3166 | |
| 3167 | UI_UpdateCachedTexture(); |
| 3168 | |
| 3169 | TextureDescription *CurrentTexture = GetCurrentTexture(); |
| 3170 | |
| 3171 | if(!currentTextureIsLocked() || |
| 3172 | (CurrentTexture != NULL && m_TexDisplay.resourceId != CurrentTexture->resourceId)) |
| 3173 | UI_OnTextureSelectionChanged(true); |
| 3174 | |
| 3175 | if(m_Output == NULL) |
| 3176 | return; |
| 3177 | |
| 3178 | UI_CreateThumbnails(); |
| 3179 | |
| 3180 | UI_UpdateTextureDetails(); |
nothing calls this directly
no test coverage detected