mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Refactor] (MG_Backend/DirectVulkan): make the renderer's two file-scope singletons inline
This commit is contained in:
@@ -406,8 +406,9 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
};
|
||||
DynamicTailKey dynamicTailKey{};
|
||||
};
|
||||
// Per Magma session (MagmaSession.h): it shadows the session's own command buffer.
|
||||
static SessionLocal<DynamicStateShadow> g_dynamicStateShadow;
|
||||
// Per Magma session (MagmaSession.h): it shadows the session's own command buffer. Inline,
|
||||
// so every file of the renderer shares the one instance.
|
||||
inline SessionLocal<DynamicStateShadow> g_dynamicStateShadow;
|
||||
|
||||
// ---- D12.3: DynamicTailKey's inputs against the P2 chunk table ----
|
||||
//
|
||||
|
||||
@@ -116,8 +116,8 @@
|
||||
// that exists for the device WITHOUT them, which is where the session used to die at
|
||||
// `Magma:multisample-depth-resolve-capability` - would never execute under any lane. The
|
||||
// knob drops the extension arm. It does not pretend the extension is missing anywhere else:
|
||||
// nothing but the arm choice reads it.
|
||||
static Bool MagmaWireForcedShaderDepthResolve() {
|
||||
// nothing but the arm choice reads it. Inline, so the renderer reads the variable once.
|
||||
inline Bool MagmaWireForcedShaderDepthResolve() {
|
||||
static const Bool forced = [] {
|
||||
const char* value = std::getenv("MGITEST_MAGMA_FORCE_SHADER_DEPTH_RESOLVE");
|
||||
return value && *value && value[0] != '0';
|
||||
|
||||
Reference in New Issue
Block a user