docs: Update RHI test refactoring status

- Mark P0-1 (Shader) and P0-2 (PipelineState) as completed
- Update test coverage matrix
- Add changelog v1.1
This commit is contained in:
2026-03-25 12:30:05 +08:00
parent f808f8d197
commit 0948e0fdbe
13 changed files with 273 additions and 49 deletions

View File

@@ -21,6 +21,103 @@ void ConsolePanel::Render() {
LogSystem::Get().Clear();
}
ImGui::SameLine();
ImGui::SeparatorText("Filter");
ImGui::SameLine();
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 4.0f);
ImGui::PushStyleColor(ImGuiCol_Button, m_showInfo ? ImVec4(0.2f, 0.6f, 0.2f, 1.0f) : ImVec4(0.3f, 0.3f, 0.3f, 1.0f));
if (ImGui::Button("Info")) {
m_showInfo = !m_showInfo;
}
ImGui::PopStyleColor();
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Button, m_showWarning ? ImVec4(0.8f, 0.6f, 0.0f, 1.0f) : ImVec4(0.3f, 0.3f, 0.3f, 1.0f));
if (ImGui::Button("Warn")) {
m_showWarning = !m_showWarning;
}
ImGui::PopStyleColor();
ImGui::SameLine();
ImGui::PushStyleColor(ImGuiCol_Button, m_showError ? ImVec4(0.8f, 0.2f, 0.2f, 1.0f) : ImVec4(0.3f, 0.3f, 0.3f, 1.0f));
if (ImGui::Button("Error")) {
m_showError = !m_showError;
}
ImGui::PopStyleColor();
ImGui::PopStyleVar();
ImGui::Separator();
ImGui::BeginChild("LogScroll", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar);
size_t logIndex = 0;
for (const auto& log : LogSystem::Get().GetLogs()) {
bool shouldShow = false;
switch (log.level) {
case ::XCEngine::Debug::LogLevel::Info:
shouldShow = m_showInfo;
break;
case ::XCEngine::Debug::LogLevel::Warning:
shouldShow = m_showWarning;
break;
case ::XCEngine::Debug::LogLevel::Error:
shouldShow = m_showError;
break;
}
if (!shouldShow) {
continue;
}
ImVec4 color;
const char* prefix;
switch (log.level) {
case ::XCEngine::Debug::LogLevel::Info:
color = ImVec4(0.5f, 0.5f, 0.5f, 1.0f);
prefix = "[INFO] ";
break;
case ::XCEngine::Debug::LogLevel::Warning:
color = ImVec4(1.0f, 0.8f, 0.0f, 1.0f);
prefix = "[WARN] ";
break;
case ::XCEngine::Debug::LogLevel::Error:
color = ImVec4(1.0f, 0.3f, 0.3f, 1.0f);
prefix = "[ERROR]";
break;
}
ImGui::PushID(static_cast<int>(logIndex));
std::string timestampStr = "[" + log.timestamp + "] ";
ImGui::TextColored(ImVec4(0.4f, 0.4f, 0.4f, 1.0f), "%s", timestampStr.c_str());
ImGui::SameLine();
std::string fullMessage = std::string(prefix) + log.message;
ImGui::TextColored(color, "%s", fullMessage.c_str());
if (ImGui::IsItemClicked()) {
ImGui::SetClipboardText(fullMessage.c_str());
}
ImGui::PopID();
logIndex++;
}
if (m_scrollToBottom && !LogSystem::Get().GetLogs().empty()) {
ImGui::SetScrollHereY(1.0f);
m_scrollToBottom = false;
}
ImGui::EndChild();
ImGui::End();
}
ImGui::SameLine();
if (ImGui::Button("Info")) {
LogSystem::Get().AddLog(::XCEngine::Debug::LogLevel::Info, "Test info message");
}