mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 12:52:51 -04:00
Fix build on main for mac/linux (#40)
* fix builds, removing COMPOUND_LITERAL around GXColor use aurora's aurora_get_stats add aurora::gd to libraries linked to fixup linkage/symbol hiding on mac/linux squashed * aurora stat changes * fix --------- Co-authored-by: Jasper St. Pierre <jstpierre@mecheye.net> Co-authored-by: TakaRikka <takarikka@outlook.com>
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
|
||||
#include "fmt/format.h"
|
||||
#include "imgui.h"
|
||||
#include "aurora/gfx.h"
|
||||
|
||||
#include "aurora/gfx.h"
|
||||
#include "imgui.hpp"
|
||||
|
||||
static bool m_frameRate = true;
|
||||
@@ -12,19 +14,6 @@ static bool m_pipelineInfo = true;
|
||||
static bool m_graphicsBackend = true;
|
||||
static int m_debugOverlayCorner = 0; // top-left
|
||||
|
||||
namespace aurora::gfx
|
||||
{
|
||||
extern std::atomic_uint32_t queuedPipelines;
|
||||
extern std::atomic_uint32_t createdPipelines;
|
||||
|
||||
extern size_t g_drawCallCount;
|
||||
extern size_t g_mergedDrawCallCount;
|
||||
extern size_t g_lastVertSize;
|
||||
extern size_t g_lastUniformSize;
|
||||
extern size_t g_lastIndexSize;
|
||||
extern size_t g_lastStorageSize;
|
||||
} // namespace aurora::gfx
|
||||
|
||||
using namespace std::string_literals;
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
@@ -117,6 +106,12 @@ void DuskImguiDebugOverlay(const AuroraInfo *info) {
|
||||
std::string_view backendString = "Unknown"sv;
|
||||
switch (info->backend)
|
||||
{
|
||||
case BACKEND_AUTO:
|
||||
backendString = "Auto"sv;
|
||||
break;
|
||||
case BACKEND_D3D11:
|
||||
backendString = "D3D11"sv;
|
||||
break;
|
||||
case BACKEND_D3D12:
|
||||
backendString = "D3D12"sv;
|
||||
break;
|
||||
@@ -149,26 +144,28 @@ void DuskImguiDebugOverlay(const AuroraInfo *info) {
|
||||
}
|
||||
hasPrevious = true;
|
||||
|
||||
AuroraStats const* stats = aurora_get_stats();
|
||||
|
||||
ImGuiStringViewText(
|
||||
fmt::format(FMT_STRING("Queued pipelines: {}\n"), aurora::gfx::queuedPipelines.load()));
|
||||
fmt::format(FMT_STRING("Queued pipelines: {}\n"), stats->queuedPipelines));
|
||||
ImGuiStringViewText(
|
||||
fmt::format(FMT_STRING("Done pipelines: {}\n"), aurora::gfx::createdPipelines.load()));
|
||||
fmt::format(FMT_STRING("Done pipelines: {}\n"), stats->createdPipelines));
|
||||
ImGuiStringViewText(
|
||||
fmt::format(FMT_STRING("Draw call count: {}\n"), aurora::gfx::g_drawCallCount));
|
||||
fmt::format(FMT_STRING("Draw call count: {}\n"), stats->drawCallCount));
|
||||
ImGuiStringViewText(fmt::format(FMT_STRING("Merged draw calls: {}\n"),
|
||||
aurora::gfx::g_mergedDrawCallCount));
|
||||
stats->mergedDrawCallCount));
|
||||
ImGuiStringViewText(fmt::format(FMT_STRING("Vertex size: {}\n"),
|
||||
BytesToString(aurora::gfx::g_lastVertSize)));
|
||||
BytesToString(stats->lastVertSize)));
|
||||
ImGuiStringViewText(fmt::format(FMT_STRING("Uniform size: {}\n"),
|
||||
BytesToString(aurora::gfx::g_lastUniformSize)));
|
||||
BytesToString(stats->lastUniformSize)));
|
||||
ImGuiStringViewText(fmt::format(FMT_STRING("Index size: {}\n"),
|
||||
BytesToString(aurora::gfx::g_lastIndexSize)));
|
||||
BytesToString(stats->lastIndexSize)));
|
||||
ImGuiStringViewText(fmt::format(FMT_STRING("Storage size: {}\n"),
|
||||
BytesToString(aurora::gfx::g_lastStorageSize)));
|
||||
BytesToString(stats->lastStorageSize)));
|
||||
ImGuiStringViewText(fmt::format(
|
||||
FMT_STRING("Total: {}\n"),
|
||||
BytesToString(aurora::gfx::g_lastVertSize + aurora::gfx::g_lastUniformSize +
|
||||
aurora::gfx::g_lastIndexSize + aurora::gfx::g_lastStorageSize)));
|
||||
BytesToString(stats->lastVertSize + stats->lastUniformSize +
|
||||
stats->lastIndexSize + stats->lastStorageSize)));
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
+1
-3
@@ -1402,9 +1402,7 @@ u16 GXGetNumXfbLines(u16 efbHeight, f32 yScale) {
|
||||
STUB_LOG("GXGetNumXfbLines is a stub");
|
||||
return 0;
|
||||
}
|
||||
void GXGetViewportv(f32* vp) {
|
||||
STUB_LOG("GXGetViewportv is a stub");
|
||||
}
|
||||
|
||||
void GXGetScissor(u32* left, u32* top, u32* wd, u32* ht) {
|
||||
STUB_LOG("GXGetScissor is a stub");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user