[Fix] (MG_Backend/DirectVulkan): support Voxy rendering

Implemented:

- Advertise Voxy-required DirectVulkan extensions without raising the reported OpenGL version.

- Add DirectVulkan compute, indirect draw count, DSA, readback, and buffer state paths needed by Voxy.

Fixed:

- Enable Vulkan shaderInt64 and drawIndirectFirstInstance so Voxy baseInstance-driven LOD draws address the correct section data.

- Fix DirectVulkan synchronization, framebuffer, texture readback, and shader interface handling used by Voxy and Minecraft screenshots.

Tests:

- Add MG_Test coverage for DirectVulkan extension advertising, DSA buffer/texture/framebuffer/vertex-array behavior, persistent mapped readback, and shader/program paths.
This commit is contained in:
2026-06-09 00:37:37 +08:00
parent ab9db43599
commit cf165c0db5
65 changed files with 3724 additions and 239 deletions
@@ -168,6 +168,21 @@ namespace MobileGL::MG_Impl::GLImpl {
MG_State::pGLContext->SetFrontFaceMode(frontFaceMode);
}
void ProvokingVertex_State(GLenum mode) {
ProvokingVertexMode provokingVertexMode = MG_Util::ConvertGLEnumToProvokingVertexMode(mode);
if (provokingVertexMode == ProvokingVertexMode::Unknown) {
MG_State::pGLContext->RecordError(
ErrorCode::InvalidEnum,
MakeUnique<GenericErrorInfo>("MG_Impl/GLImpl", "ProvokingVertex_State",
"Provoking vertex mode enum " +
MG_Util::ConvertProvokingVertexModeToString(provokingVertexMode) +
"(" + MG_Util::ConvertGLEnumToString(mode) + ") is not supported."));
return;
}
MG_State::pGLContext->SetProvokingVertexMode(provokingVertexMode);
}
void Enable_State(GLenum cap) {
CapabilityInput capInput = MG_Util::ConvertGLEnumToCapabilityInput(cap);
if (capInput == CapabilityInput::Unknown) {
@@ -499,6 +514,10 @@ namespace MobileGL::MG_Impl::GLImpl {
FrontFace_State(mode);
}
void ProvokingVertex(GLenum mode) {
ProvokingVertex_State(mode);
}
void Enable(GLenum cap) {
Enable_State(cap);
}