[MG_Pipe] preserve image-unit slots and publish named storage-binding programs

This commit is contained in:
2026-09-20 12:41:29 -04:00
parent ec4ca06d1e
commit c3a5d2f58e
3 changed files with 48 additions and 9 deletions
+9 -2
View File
@@ -1297,6 +1297,7 @@ namespace MobileGL::MG_Remote::Client {
// The backend slot's own first line (DirectGLES.cpp:9201), kept here so a null name
// never becomes a zero-size blob - which rule A forbids spelling at all.
if (storageBlockName == nullptr) return;
BeforeReadOnlyVerb();
MG_Pipe::MGPStorageBlockBinding record{};
record.GlName = static_cast<Uint32>(program);
@@ -1305,8 +1306,14 @@ namespace MobileGL::MG_Remote::Client {
if (MG_State::pGLContext != nullptr) {
const auto& programObject = MG_State::pGLContext->GetProgramObject(program);
if (programObject) {
record.ShaderCso = MG_Pipe::MGPipeSlots().FindByLifetimeId(
MG_Pipe::MGPipeKind::ShaderCso, programObject->GetLifetimeId());
// The application may rebind a stage program before it is
// current or attached to a pipeline. A minted slot alone does
// not publish its archive; this verb must follow that birth.
programObject->JoinLinkAndSpirv();
Uint64 bytes = 0;
auto& emitter = MG_Pipe::MGPipeProgramEmitterInstance();
record.ShaderCso = emitter.AcquireShaderCso(*programObject, bytes);
emitter.EmitProgramBindings(*programObject, record.ShaderCso);
}
}
// Size = strlen + 1: THE NUL TRAVELS (contract table 0's block-name row). The