mirror of https://github.com/AxioDL/metaforce.git
aurora: Build fix & cleanup
This commit is contained in:
parent
71e4fbb6d4
commit
834bc8d183
|
@ -1710,9 +1710,13 @@ void ImGuiConsole::ShowPlayerTransformEditor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiConsole::ShowPipelineProgress() {
|
void ImGuiConsole::ShowPipelineProgress() {
|
||||||
if (aurora::gfx::queuedPipelines == 0) {
|
const u32 queuedPipelines = aurora::gfx::queuedPipelines;
|
||||||
|
if (queuedPipelines == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const u32 createdPipelines = aurora::gfx::createdPipelines;
|
||||||
|
const u32 totalPipelines = queuedPipelines + createdPipelines;
|
||||||
|
|
||||||
const auto* viewport = ImGui::GetMainViewport();
|
const auto* viewport = ImGui::GetMainViewport();
|
||||||
const auto padding = viewport->WorkPos.y + 10.f;
|
const auto padding = viewport->WorkPos.y + 10.f;
|
||||||
const auto halfWidth = viewport->GetWorkCenter().x;
|
const auto halfWidth = viewport->GetWorkCenter().x;
|
||||||
|
@ -1722,10 +1726,8 @@ void ImGuiConsole::ShowPipelineProgress() {
|
||||||
ImGui::Begin("Pipelines", nullptr,
|
ImGui::Begin("Pipelines", nullptr,
|
||||||
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove |
|
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove |
|
||||||
ImGuiWindowFlags_NoSavedSettings);
|
ImGuiWindowFlags_NoSavedSettings);
|
||||||
const u32 totalPipelines = aurora::gfx::queuedPipelines + aurora::gfx::createdPipelines;
|
const auto percent = static_cast<float>(createdPipelines) / static_cast<float>(totalPipelines);
|
||||||
const auto percent = static_cast<float>(aurora::gfx::createdPipelines) / static_cast<float>(totalPipelines);
|
const auto progressStr = fmt::format(FMT_STRING("Processing pipelines: {} / {}"), createdPipelines, totalPipelines);
|
||||||
const auto progressStr =
|
|
||||||
fmt::format(FMT_STRING("Processing pipelines: {} / {}"), aurora::gfx::createdPipelines, totalPipelines);
|
|
||||||
const auto textSize = ImGui::CalcTextSize(progressStr.data(), progressStr.data() + progressStr.size());
|
const auto textSize = ImGui::CalcTextSize(progressStr.data(), progressStr.data() + progressStr.size());
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
ImGui::SameLine(ImGui::GetWindowWidth() / 2.f - textSize.x + textSize.x / 2.f);
|
ImGui::SameLine(ImGui::GetWindowWidth() / 2.f - textSize.x + textSize.x / 2.f);
|
||||||
|
|
|
@ -151,10 +151,10 @@ void initialize(SDL_Window* window) {
|
||||||
{
|
{
|
||||||
// Use "best" supported alignments
|
// Use "best" supported alignments
|
||||||
.minUniformBufferOffsetAlignment = supportedLimits.limits.minUniformBufferOffsetAlignment == 0
|
.minUniformBufferOffsetAlignment = supportedLimits.limits.minUniformBufferOffsetAlignment == 0
|
||||||
? WGPU_LIMIT_U32_UNDEFINED
|
? static_cast<uint32_t>(WGPU_LIMIT_U32_UNDEFINED)
|
||||||
: supportedLimits.limits.minUniformBufferOffsetAlignment,
|
: supportedLimits.limits.minUniformBufferOffsetAlignment,
|
||||||
.minStorageBufferOffsetAlignment = supportedLimits.limits.minStorageBufferOffsetAlignment == 0
|
.minStorageBufferOffsetAlignment = supportedLimits.limits.minStorageBufferOffsetAlignment == 0
|
||||||
? WGPU_LIMIT_U32_UNDEFINED
|
? static_cast<uint32_t>(WGPU_LIMIT_U32_UNDEFINED)
|
||||||
: supportedLimits.limits.minStorageBufferOffsetAlignment,
|
: supportedLimits.limits.minStorageBufferOffsetAlignment,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue