mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user