mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 00:11:56 +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{};
|
DynamicTailKey dynamicTailKey{};
|
||||||
};
|
};
|
||||||
// Per Magma session (MagmaSession.h): it shadows the session's own command buffer.
|
// Per Magma session (MagmaSession.h): it shadows the session's own command buffer. Inline,
|
||||||
static SessionLocal<DynamicStateShadow> g_dynamicStateShadow;
|
// 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 ----
|
// ---- 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
|
// 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
|
// `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:
|
// knob drops the extension arm. It does not pretend the extension is missing anywhere else:
|
||||||
// nothing but the arm choice reads it.
|
// nothing but the arm choice reads it. Inline, so the renderer reads the variable once.
|
||||||
static Bool MagmaWireForcedShaderDepthResolve() {
|
inline Bool MagmaWireForcedShaderDepthResolve() {
|
||||||
static const Bool forced = [] {
|
static const Bool forced = [] {
|
||||||
const char* value = std::getenv("MGITEST_MAGMA_FORCE_SHADER_DEPTH_RESOLVE");
|
const char* value = std::getenv("MGITEST_MAGMA_FORCE_SHADER_DEPTH_RESOLVE");
|
||||||
return value && *value && value[0] != '0';
|
return value && *value && value[0] != '0';
|
||||||
|
|||||||
Reference in New Issue
Block a user