[MG_Backend] (DirectGLES): both client-snapshot wrappers are monolith-only

The indexed wrapper reads the bound VAO to tell a client index array from an
element-buffer offset, and the indirect one reconciles the command buffer's
shadow - both frontend reads, and under a transport the entry points run on the
apply thread where the client owns those bytes (Fatal{RoleViolation}, which the
split lane aborted on).
This commit is contained in:
2026-09-20 21:03:16 -04:00
parent 82f509c535
commit cb64b62b57
@@ -2528,6 +2528,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
Bool SyncClientSideVertexArraysForIndirectFetch(const Uint8* commandBytes, SizeT commandOffset,
GLsizei stride, GLsizei index, Uint8 indexSize,
const SharedPtr<MG_State::GLState::BufferObject>& commandBuffer) {
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) return true;
const Uint8* source = commandBytes;
if (commandBuffer) {
commandBuffer->SyncGpuWrites();
@@ -2556,6 +2557,9 @@ namespace MobileGL::MG_Backend::DirectGLES {
Bool SyncClientSideVertexArraysForIndexedFetch(GLenum type, GLsizei count, const void* indices,
GLsizei instanceCount, GLint baseVertex, GLuint baseInstance) {
if (count <= 0 || instanceCount <= 0) return true;
// MONOLITH ONLY - see SyncClientSideVertexArraysForFetch; this wrapper's own read of
// the bound VAO is the frontend read that must not happen on an apply thread.
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) return true;
const auto& currentVAO = MGB_CTX->GetBoundVertexArray();
if (!currentVAO) return true;
const Uint8 indexSize = static_cast<Uint8>(MG_Util::GetGLTypeSize(type));