From b010b5f0ac52697cbcb462803fb7fe0a88662d1b Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 20 Sep 2026 04:29:28 -0400 Subject: [PATCH] [MG_Impl, MG_Test] (Disaggregated): keep local compute limits off the apply barrier --- MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp | 9 +++++++++ .../Scenarios/MagmaRunAheadScenario.cpp | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp b/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp index dec921e9..9112df2c 100644 --- a/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp +++ b/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp @@ -1179,7 +1179,16 @@ namespace MobileGL::MG_Impl::GLImpl { : GetMinComputeWorkGroupSize(index); GLint backendValue = 0; if (getIntegeri) { +#if MOBILEGL_BUILD_DISAGGREGATED + // Transport's Class A caps mirror answers these two pnames + // locally and emits no record. A fill would wrongly quiesce + // the apply thread before every compute dispatch validation. + if (MG_Config::Transport == MG_Config::TransportMode::Monolith) { +#endif MGP_FILL(GetIntegeri_v); +#if MOBILEGL_BUILD_DISAGGREGATED + } +#endif getIntegeri(target, index, &backendValue); } *data = std::max(backendValue, minimum); diff --git a/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp b/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp index 9d7d6484..23fb5146 100644 --- a/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp +++ b/MobileGL/MG_IntegrationTest/Scenarios/MagmaRunAheadScenario.cpp @@ -234,7 +234,7 @@ void main(){vec2 p[3]=vec2[3](vec2(-1,-1),vec2(0,-1),vec2(-1,1)); for(uint i=0u;i<3u;++i){words[4u*i]=floatBitsToUint(p[i].x);words[4u*i+1u]=floatBitsToUint(p[i].y); words[4u*i+2u]=0u;words[4u*i+3u]=0x3ff00000u;}})"; const char* vs=R"(#version 430 core -layout(location=0) in vec2 position;layout(location=1) in double code;out vec4 v; +layout(location=0) in vec2 position;layout(location=1) in float code;out vec4 v; void main(){gl_Position=vec4(position,0,1);v=vec4(1.0-float(code),float(code),0,1);})"; const char* fs="#version 430 core\nin vec4 v;layout(location=0) out vec4 c;void main(){c=v;}"; const GLuint compute=Link({{GL_COMPUTE_SHADER,cs}}), graphics=Link({{GL_VERTEX_SHADER,vs},{GL_FRAGMENT_SHADER,fs}}); @@ -243,7 +243,7 @@ void main(){gl_Position=vec4(position,0,1);v=vec4(1.0-float(code),float(code),0, std::array vertices{}; const GLuint buffer=NewBuffer(GL_ARRAY_BUFFER,sizeof(vertices),vertices.data()); glVertexAttribPointer(0,2,GL_FLOAT,GL_FALSE,16,nullptr); glEnableVertexAttribArray(0); - glVertexAttribLPointer(1,1,GL_DOUBLE,16,reinterpret_cast(8)); glEnableVertexAttribArray(1); + glVertexAttribPointer(1,1,GL_DOUBLE,GL_FALSE,16,reinterpret_cast(8)); glEnableVertexAttribArray(1); glBindBufferBase(GL_SHADER_STORAGE_BUFFER,0,buffer); HeldApply hold; ASSERT_NO_FATAL_FAILURE(HoldNextBatch()); glUseProgram(compute); glDispatchCompute(1,1,1);