mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-12-02 06:02:15 +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:
1 parent
82f509c535
commit
cb64b62b57
1 file changed
+4
@@ -2528,6 +2528,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
Bool SyncClientSideVertexArraysForIndirectFetch(const Uint8* commandBytes, SizeT commandOffset,
|
Bool SyncClientSideVertexArraysForIndirectFetch(const Uint8* commandBytes, SizeT commandOffset,
|
||||||
GLsizei stride, GLsizei index, Uint8 indexSize,
|
GLsizei stride, GLsizei index, Uint8 indexSize,
|
||||||
const SharedPtr<MG_State::GLState::BufferObject>& commandBuffer) {
|
const SharedPtr<MG_State::GLState::BufferObject>& commandBuffer) {
|
||||||
|
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) return true;
|
||||||
const Uint8* source = commandBytes;
|
const Uint8* source = commandBytes;
|
||||||
if (commandBuffer) {
|
if (commandBuffer) {
|
||||||
commandBuffer->SyncGpuWrites();
|
commandBuffer->SyncGpuWrites();
|
||||||
@@ -2556,6 +2557,9 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
Bool SyncClientSideVertexArraysForIndexedFetch(GLenum type, GLsizei count, const void* indices,
|
Bool SyncClientSideVertexArraysForIndexedFetch(GLenum type, GLsizei count, const void* indices,
|
||||||
GLsizei instanceCount, GLint baseVertex, GLuint baseInstance) {
|
GLsizei instanceCount, GLint baseVertex, GLuint baseInstance) {
|
||||||
if (count <= 0 || instanceCount <= 0) return true;
|
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();
|
const auto& currentVAO = MGB_CTX->GetBoundVertexArray();
|
||||||
if (!currentVAO) return true;
|
if (!currentVAO) return true;
|
||||||
const Uint8 indexSize = static_cast<Uint8>(MG_Util::GetGLTypeSize(type));
|
const Uint8 indexSize = static_cast<Uint8>(MG_Util::GetGLTypeSize(type));
|
||||||
|
|||||||
Reference in new issue
Block a user